Index-Translate-2B mobile GGUF
Text-only GGUF quantizations of IndexTeam/Index-Translate-2B
for on-device translation with llama.cpp (Android/iOS). The vision tower is not included. Every file keeps the
1-layer MTP block, so llama.cpp's MTP draft mode works if you want it (it did not speed up CPU decoding in our tests).
[Image blocked: Quality vs size: COMET-22 against file size for every variant]
Which file
The Q6_K, Q4_K_M, Q4_0 and Q3_K_M files use an importance matrix computed on about 1,400 translation prompts in the official prompt
format (FLORES-200 dev sentences, 52 languages, no overlap with the test set). The output head (tied with the
embeddings) stays at q6_K in Q4_K_M / Q6_K and q8_0 in Q8_0.
Q2_K-QAT comes from quantization-aware training rather than plain rounding. All 24 transformer layers were trained
against the exact llama.cpp Q2_K format (per-block 4-bit scales and mins, 2-bit weights, straight-through estimator,
learned scales), with KL distillation from the BF16 model's full-vocabulary logits. Training data was 250k
translation prompts in the official prompt formats (FLORES-200 dev and OPUS-100 validation sentences, 52 languages,
plain, constrained and JSON variants), answered greedily by the BF16 model. That is about 38M tokens, one epoch, and the
embeddings were kept frozen. The trained weights convert to Q2_K bit-exactly (except fp16 scale rounding on
0.002% of weights). The MTP block and output head are q4_K, the DeltaNet alpha/beta projections are q8_0. For
comparison, plain post-training Q2_K at the same layout and size (with imatrix) scores 81.3 COMET / 42.7 chrF++, and
IQ2_M (0.90 GB) scores 83.5 / 45.7. Q2_K-QAT gets 85.8 / 47.7.
Known weaknesses of Q2_K-QAT: lower-resource and Indic/Thai targets lose the most (en-hi, en-bn, en-th about -5
COMET). In one of the 12 constraint checks it translated {name}/{count} placeholders. If your app relies on
placeholders or glossary terms, use Q4_K_M or protect the placeholders before translating.
Prompt format
Use the chat template shipped in the GGUF, with thinking disabled (the template's empty <think> block), and greedy
decoding. Plain translation prompt (as used by the original model):
Example: llama-cli -m Index-Translate-2B-Q4_K_M.gguf -t 4 --temp 0 -cnv
Evaluation
FLORES-200 devtest, first 200 sentences per direction, 20 directions. Greedy decoding with the same prompts for every
variant, run with llama.cpp. COMET is Unbabel/wmt22-comet-da. chrF++ uses word bigrams, which penalizes Chinese and
Japanese targets because they have no spaces, so character-only chrF is shown as well. BF16 is the unquantized GGUF.
Its outputs match the original transformers model (COMET 87.98, chrF++ 50.77 under the same setup).
Constraint checks are 12 prompts covering glossary terms, JSON value-only translation, placeholders and markdown.
[Image blocked: COMET change vs BF16 for every variant and direction]
[Image blocked: Per-direction COMET change for Q4_K_M and Q2_K-QAT]
COMET-22 (wmt22-comet-da, x100)
chrF++
chrF (character n-grams only)
| constraint checks (12) | 12 | 11 | 11 | 12 | 11 | 11 | 9 |
Runaway generations (hit the 1,024-token limit) out of 4,012 prompts: BF16 0, Q8_0 0, Q6_K 1, Q4_K_M 2, Q4_0 1,
Q3_K_M 0, Q2_K-QAT 5 (IQ2_M 22, plain Q2_K 40). Set a max-token limit proportional to input length in apps.
Size and speed
Decode on a phone is mostly limited by memory bandwidth. "Bytes per token" counts the weights read for each generated
token: the full body plus the full 248k-row output head. The MTP block is excluded.
[Image blocked: Decode speed: bandwidth estimate and measured CPU speed]
The estimates are upper bounds. Measured CPU numbers are lower because the Gated DeltaNet recurrence and K-quant
dequantization are partly compute-bound at 4 threads. The VM numbers are medians of 3 interleaved rounds on a shared
host and have roughly ±10% noise. Compare them within a column, not across columns.
The output head accounts for 33% (Q4_K_M) to 39% (Q2_K-QAT) of the bytes per token. Restricting the head to the
tokens a target language can use (an experimental runtime patch that computes logits only for a token subset) measured
+34% decode speed for Q4_K_M and +44% for Q2_K-QAT with a 16k-token subset on the same VM. It needs a modified runtime,
and it changes 0-2% of outputs for non-Latin targets, so it is not part of these files.
Acknowledgements
Huge thanks to Hugging Face for generously sponsoring the compute used for this project 🤗
License
Apache-2.0, same as the base model.