Instructions to use yibie/Index-Translate-2B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use yibie/Index-Translate-2B-MLX-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download yibie/Index-Translate-2B-MLX-4bit --local-dir Index-Translate-2B-MLX-4bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Index-Translate-2B-MLX (4bit)
MLX conversion of IndexTeam/Index-Translate-2B for Apple Silicon โ a 2B multilingual translation model (150 languages) built on Qwen3.5, supporting translation instructions about terminology, formatting, style, structure, context and output length.
This repo: 4-bit, group size 64 (4.503 bits/weight) ยท 1.0 GB on disk ยท ~1.68 GB peak RAM ยท ~221 tok/s decode.
Available variants
| Variant | Disk | Peak RAM | Decode (long output) | Notes |
|---|---|---|---|---|
-bf16 |
3.5 GB | 4.39 GB | ~97 tok/s | reference, unquantized |
-8bit |
1.9 GB | 2.63 GB | ~155 tok/s | bit-identical output to bf16 in our tests |
-6bit |
1.4 GB | 2.16 GB | ~175 tok/s | best size/quality trade-off |
-4bit-gs32 |
1.1 GB | 1.81 GB | ~205 tok/s | group size 32 |
-4bit |
1.0 GB | 1.68 GB | ~221 tok/s | group size 64 |
Quick start
pip install "mlx-lm>=0.31.3" # qwen3_5 support was added in 0.31.3
The prompt template matters. This model was trained with one fixed translation instruction and greedy decoding. Use it verbatim, and pass
enable_thinking=False(otherwise the template emits athinkblock):
from mlx_lm import load, generate
model, tok = load("yibie/Index-Translate-2B-MLX-8bit")
text, target = "ไฝ ๅฅฝ๏ผไธ็ใไปๅคฉๅคฉๆฐไธ้ใ", "่ฑ่ฏญ" # ่ฑ่ฏญ / ไธญๆ / ๆฅ่ฏญ / ๅพท่ฏญ / ...
prompt = tok.apply_chat_template(
[{"role": "user", "content":
f"่ฏทๅฐไปฅไธๆๆฌ็ฟป่ฏไธบ{target}๏ผ็ดๆฅ่พๅบ็ฟป่ฏ็ปๆ๏ผไธ่ฆ่ฟ่กไปปไฝ่งฃ้ใ\n\n{text}"}],
add_generation_prompt=True, tokenize=False, enable_thinking=False)
print(generate(model, tok, prompt=prompt, max_tokens=1024, verbose=False))
OpenAI-compatible server (works with the official client):
mlx_lm.server --model yibie/Index-Translate-2B-MLX-8bit --port 8000
python inference/llm/translate.py "ไฝ ๅฅฝ๏ผไธ็" --target en \
--model yibie/Index-Translate-2B-MLX-8bit --base-url http://127.0.0.1:8000/v1
LM Studio
Works out of the box โ LM Studio's MLX runtime 1.11.0 bundles mlx-lm==0.31.3,
detects the architecture as qwen3_5, and loads this repo in 8 s / 1.9 GiB.
Search the model inside LM Studio, or drop the folder into
`/.lmstudio/models//Index-Translate-2B-MLX-8bit/`.
Conversion notes
- Converted with
mlx_lm.convertfrom the original checkpoint (model.safetensors, sha2562f499211fe35โฆ4c0b60, verified after download). - Vision tower (โ663 MB) and MTP head (โ122 MB) were dropped. This is a
text-translation model, and mlx-lm's
qwen3_5implementation is text-only. All 320/320 text tensors are preserved;lm_headis tied to the embedding matrix (tie_word_embeddings: true), matching the source. - The source checkpoint stores its RMSNorm weights zero-centred (
w - 1). mlx-lm'sqwen3_5sanitizer adds 1.0 back to exactly the affected tensors (input_layernorm,post_attention_layernorm,q_norm,k_norm, final norm) and leaveslinear_attn.norm.weightalone (it is a plain ~0.92 scale). We verified the loaded weights land at the expected ~1.0-centred distribution, and that the conversions reproduce the source model's translations. - The chat template is shipped both as
chat_template.jinja(mlx-lm) and inline intokenizer_config.json(other runtimes such as LM Studio).
- Quantization: affine 4-bit, group size 64 (4.503 bits/weight,
mlx_lm.convert -q --q-bits 4 --q-group-size 64) - Base architecture:
model_type: qwen3_5, 24 layers (18 Gated DeltaNet linear-attention + 6 full-attention), hidden 2048, head_dim 256 - Requires
mlx-lm >= 0.31.3; LM Studio MLX runtime >= 1.11.0 - Source model license: Apache-2.0
- Downloads last month
- 74
4-bit
Model tree for yibie/Index-Translate-2B-MLX-4bit
Base model
IndexTeam/Index-Translate-2B