Translation
KRONOS
qwen3_5
machine-translation
on-device
african-languages
nigerian-languages
multilingual
qwen3.5
Instructions to use melodyleonard/AfriSLM-2B-2bit-kronos with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KRONOS
How to use melodyleonard/AfriSLM-2B-2bit-kronos with KRONOS:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
AfriSLM-2B Pruned & Context-Calibrated (Kronos q2c / nf3g128)
Pruned, Hadamard-GPTQ quantized, and context-calibrated builds of qvac/TranslatePsy-AfriSLM-2B (Apache-2.0 fine-tune of Qwen/Qwen3.5-2B) compiled in 100% pure Rust for on-device translation in Kronos and the Translate keyboard (iOS & Android).
What Changed vs. Base Checkpoint (5.19 GiB -> 572โ671 MiB .lzfse)
- Structural & BPE Vocabulary Pruning (
prune_vocab,248,320 -> 179,008tokens):- Stripped all
297unused multimodal vision (visual.*) and Multi-Token Prediction (mtp.*) tensors. - Pruned source-code-only BPE merges and ultra-rare high-rank compound tokens while retaining 100% of African tonal/subdot/hooked orthographies (
แบน, แป, แนฃ, แปฅ, แป, ษ, ษ, ฦ, ฦด, ษ, ษ, combining tones,โฆ), East Asian (Chinese Hanzi, Japanese Kanji/Kana, Korean Hangul), Arabic/Persian/Urdu, Devanagari/Bengali, Cyrillic, Greek, Thai, Ethiopic, European/Vietnamese diacritics, and emojis, closed under BPE merge ancestors and padded to a multiple of 64. - Deduplicated tied input/output embeddings (
CACHE_MAGIC_V2K2TQW35B2,embed = Nonesharing unbiased 4-bit Hadamard RTN NF4lm_head), saving ~205 MiB with zero accuracy loss.
- Stripped all
- Differentiable Context + BF16 Teacher-KL Calibration (
train_qwen35_context):- Trained
Layers 19..24(NfSdotMatrixper-group scales, DeltaNet recurrent gates/norms, QKNorm) +final_normin pure Rust against conversational[Background Information]examples (pronoun/addressee/object gender, formal/casual register, polysemy, target-language context, Nigerian Pidgin & Nigerian/African pairs) + exact top-64 KL distillation from the unquantized BF16 teacher across 36 languages, written back in-place into BF16 scales with 0 extra bytes.
- Trained
Model Size Tiers Included
Both .k2tb containers use the self-describing K2TQW35B2 format and support zero-copy mmap execution (kronos_set_zero_copy_weights(1)) on iOS and Android:
| Variant | Precision | Raw .k2tb |
.k2tb.lzfse Download |
tokenizer.json.lzfse |
Total Download | Compression vs 5.19 GiB |
|---|---|---|---|---|---|---|
kronos-q2c.k2tb |
2-bit Gosset E8Q2 MLP + 3-bit NF3 Mixer + 4-bit NF4 tied head | 585.8 MiB (614.2 MB) |
571.5 MiB (599.3 MB) |
2.4 MiB (2.55 MB) |
574.0 MiB |
8.9x smaller |
kronos-nf3g128.k2tb |
3-bit NF3 GPTQ Body + 4-bit NF4 tied head (3.35 bpw) |
693.8 MiB (727.5 MB) |
671.5 MiB (704.1 MB) |
2.4 MiB (2.55 MB) |
673.9 MiB |
7.5x smaller |
Translation Accuracy
Context-Aware Disambiguation (context_ab & 361-Case Multilingual context_eval)
context_ab(19 conversational gender/formality/sense/leakage cases):- Uncalibrated GPTQ baseline:
3/15context used (20.0%). - Calibrated
q2c&nf3g128:10/15context used (66.7%,+233%relative) ยท19/19(100%) leak-free (identical on Metal GPU and ARM64 NEON--cpu).
- Uncalibrated GPTQ baseline:
- Held-Out 361-Case Multilingual
context_eval(nf3g128, 32 languages):- Overall accuracy jumped from
34.2%without context ->40.0%with context (+5.8%), with66/66(100%)no_leakpass rate. - Per-language context gains: Chinese
+36%(36% -> 73%), Japanese+11%(44% -> 56%), French+24%(29% -> 52%), Spanish+19%(33% -> 52%), Italian+18%, Arabic+17%, Turkish+29%, Dutch+57%, Formal register+29%(29% -> 58%), Object gender+13%(67% -> 80%).
- Overall accuracy jumped from
Held-Out FLORES-200 (devtest, English -> Target, chrF++ / BLEU)
| Code | Language | v1 Hy-MT2-1.8B (q2c) |
v2 AfriSLM-2B (q2c, 574 MiB) |
v2 AfriSLM-2B (nf3g128, 674 MiB) |
|---|---|---|---|---|
HA |
Hausa | 8.7 / 1.8 |
42.9 / 16.7 |
51.5 / 25.7 |
ZU |
Zulu | 12.2 / 2.0 |
41.1 / 13.2 |
48.6 / 20.0 |
IG |
Igbo | 14.1 / 2.3 |
34.1 / 12.7 |
41.0 / 17.3 |
YO |
Yoruba | 9.0 / 1.6 |
26.4 / 8.5 |
30.2 / 11.6 |
SW |
Swahili | 34.0 / 9.6 |
48.6 / 21.1 |
56.8 / 29.1 |
AM |
Amharic | 1.0 / 0.5 |
8.4 / 1.9 |
25.3 / 5.9 |
ZH |
Chinese (Simplified) | 42.3 / 42.4 |
32.2 / 31.7 |
37.7 / 37.4 |
ZT |
Chinese (Traditional) | 21.2 / 17.5 |
25.3 / 21.4 |
29.4 / 28.1 |
JA |
Japanese | 45.0 / 46.0 |
24.9 / 22.4 |
30.2 / 28.5 |
FR |
French | 65.0 / 42.3 |
49.5 / 26.7 |
56.1 / 30.7 |
PT |
Portuguese | 66.8 / 45.2 |
51.0 / 26.9 |
55.2 / 30.9 |
SV |
Swedish | 57.0 / 30.8 |
โ | 50.7 / 24.7 |
RU |
Russian | 52.0 / 26.6 |
39.3 / 15.8 |
49.1 / 23.8 |
VI |
Vietnamese | 55.7 / 35.4 |
43.0 / 22.5 |
48.6 / 29.6 |
RO |
Romanian | 53.9 / 28.3 |
โ | 47.3 / 21.0 |
DE |
German | 59.5 / 34.2 |
42.5 / 16.1 |
47.1 / 20.7 |
ES |
Spanish | 53.7 / 27.8 |
44.5 / 17.0 |
45.1 / 17.4 |
AR |
Arabic | 49.0 / 21.0 |
35.3 / 11.4 |
44.4 / 15.8 |
NL |
Dutch | 52.6 / 24.1 |
โ | 44.3 / 17.5 |
TH |
Thai | 57.4 / 58.6 |
โ | 43.5 / 41.9 |
UK |
Ukrainian | 51.0 / 24.0 |
โ | 41.7 / 18.0 |
EL |
Greek | 38.1 / 13.3 |
โ | 41.1 / 14.6 |
HI |
Hindi | 48.4 / 31.5 |
20.5 / 6.0 |
38.2 / 20.4 |
License & Attribution
Licensed under Apache-2.0 (LICENSE.txt, ATTRIBUTIONS.md), derived from qvac/TranslatePsy-AfriSLM-2B by Tether AI Research (Milan Gritta, Patrik Lambert, Jihye Back, Amril Nazir) and Qwen/Qwen3.5-2B.
- Downloads last month
- -