losdwind's picture
docs: link official GitHub toolkit (UnimeType/transliteration) and Smoke-60 local benchmark
f388de0 verified
|
Raw History Blame Contribute Delete
13.1 kB
---
license: apache-2.0
base_model:
- Qwen/Qwen3.5-9B
library_name: mlx
pipeline_tag: text-generation
language:
- en
- zh
- ja
- hi
- ar
- ru
- el
- vi
- es
- fr
- pt
- de
- it
tags:
- mlx
- transliteration
- ime
- input-method
- pinyin
- romaji
- hinglish
- arabizi
- cyrillic
- greeklish
- vietnamese
- qwen3.5
- v2.6
---
# UnimeType Transliteration 2.0 9B — v2.6 (12-Language Offline IME Engine · MLX 6-bit)
> **Current Release**: **`v2.6`** (`dataset_v5.1` · 12 Languages / 13 Modes + Blind-Typing Typo Recovery) · **Protocol**: `unimetype-convert-short-v3` (`0` system-prompt tokens, 100% drop-in compatible with all `Transliteration-2.0` clients)
**[UnimeType](https://unimetype.com/?utm_source=huggingface&utm_medium=referral&utm_campaign=transliteration_2_6)** gives you **one keyboard for all your languages — no switching keyboards across apps or mid-sentence**. Keep a clean ASCII layout for single-key shortcuts in Figma or Blender, LaTeX commands in Overleaf, WASD controls in games, Terminal/IDE workflows, and switching between Slack, Mail, WhatsApp, WeChat, or LINE, then convert romanized text in-place only when you want native script.
**UnimeType Transliteration 2.0 9B (`v2.6`)** is a deterministic on-device input-method transliteration engine fine-tuned from unquantized BF16 [`Qwen/Qwen3.5-9B`](https://huggingface.co/Qwen/Qwen3.5-9B). It converts romanized or ASCII-typed input across **12 languages (13 output modes)** — **Chinese Pinyin**, **Japanese Romaji** (`natural` & `kana`), **Hindi Hinglish**, **Arabic Arabizi**, **Russian**, **Greek**, **Vietnamese**, **Spanish**, **French**, **Portuguese**, **German**, and **Italian** — while keeping inline English terms, `@handles`, URLs, code spans, file paths, numbers, and line breaks untouched.
- **[🛠️ Local Inference Toolkit, Ollama Modelfiles & Short-v3 Spec (GitHub) →](https://github.com/UnimeType/transliteration)** (One-command Ollama, LM Studio, Apple Silicon `mlx-lm` & `llama.cpp` launchers + `Smoke-60` local eval)
- **[🚀 Launch Interactive Playground Space →](https://huggingface.co/spaces/UnimeType/Transliteration-Playground)** (Inspect multi-clause presets or run live in-browser WebAssembly inference)
- **[⌨️ Download the UnimeType Keyboard App →](https://unimetype.com/download?utm_source=huggingface&utm_medium=referral&utm_campaign=transliteration_2_6)** (One keyboard across macOS, Windows, Linux, iOS, Android & ChromeOS — zero keyboard switching across apps or mid-sentence)
- **[📖 Evaluation Methodology & Local LM Studio Setup Guide →](https://unimetype.com/blog/how-we-evaluate-transliteration-models?utm_source=huggingface&utm_medium=referral&utm_campaign=transliteration_2_6)**
---
## Official `v2.6` Model Family (`0.8B` · `4B` · `9B`)
| Tier & Footprint | Apple Silicon (`MLX 6-bit`) | PyTorch / vLLM (`BF16 Safetensors`) | `llama.cpp` / LM Studio / Ollama (`GGUF`) |
| --- | --- | --- | --- |
| **0.8B** · Ultra-light mobile & browser WASM (`~0.5–0.7 GB`) | [MLX 6-bit](https://huggingface.co/UnimeType/Transliteration-2.0-0.8B) | [BF16 Safetensors](https://huggingface.co/UnimeType/Transliteration-2.0-0.8B-Safetensors) | [GGUF Q4_K_M & Q8_0](https://huggingface.co/UnimeType/Transliteration-2.0-0.8B-GGUF) |
| **4B** · Balanced everyday desktop IME (`~2.6–3.5 GB`) | [MLX 6-bit](https://huggingface.co/UnimeType/Transliteration-2.0-4B) | [BF16 Safetensors](https://huggingface.co/UnimeType/Transliteration-2.0-4B-Safetensors) | [GGUF Q4_K_M & Q8_0](https://huggingface.co/UnimeType/Transliteration-2.0-4B-GGUF) |
| **9B** · Flagship offline accuracy (`~5.6–7.4 GB`, beats cloud on Core-5) | **[MLX 6-bit (this repo)](https://huggingface.co/UnimeType/Transliteration-2.0-9B)** | [BF16 Safetensors](https://huggingface.co/UnimeType/Transliteration-2.0-9B-Safetensors) | [GGUF Q4_K_M & Q8_0](https://huggingface.co/UnimeType/Transliteration-2.0-9B-GGUF) |
---
## What's New in `v2.6`
1. **12 Languages / 13 Output Modes with Zero System Prompt**: Expands from 4 languages (`zh`, `ja`, `hi`, `ar`) to **12 languages** (`chinese`, `japanese` `natural` & `kana`, `hindi`, `arabic`, `russian`, `greek`, `vietnamese`, `spanish`, `french`, `portuguese`, `german`, `italian`) using a single-line compact JSON user message and an empty system prompt (`0` prompt-prefix overhead).
2. **New `9B` Flagship Offline Tier Surpasses Cloud on Core Benchmarks**: `Transliteration-2.0-9B` reaches **`92.09%`** strict accuracy on the `708`-case `v4`-aligned suite (`+1.27 pp` ahead of `DeepSeek V4.1 Flash` with a ~2,800-token production system prompt) and **`90.94%`** on `Core-5` (`+0.64 pp` ahead of cloud), while matching cloud accuracy on `Dogfood-30` (`76.7%`) and `OOD-Unseen-20` probe repair (`90.0%`, `18/20`).
3. **Blind-Typing Adjacent-Key Typo Repair & Glossary Precision**: Recovers realistic fast-typing transpositions (e.g., `shujuuk` → `数据库`, `yanchanghiu` → `演唱会`, `yanuhuo` → `验货`), honors dynamic `lexicon` contact/brand entries without false-positive homophone hijacking, and cleanly emits `UNIMETYPE_NO_ALTERNATIVE` when closed-set `reconvert` alternatives are exhausted.
4. **Unconditional Non-Thinking Chat Template**: Ships with `<|im_start|>assistant\n<think>\n\n</think>\n\n` baked into `chat_template.jinja` across MLX, Safetensors, and GGUF so LM Studio, `mlx-lm`, and `llama.cpp` emit converted text on the very first token with zero reasoning-token latency.
---
## Quickstart: `unimetype-convert-short-v3` Compact JSON Protocol
> **Usage Note**: This checkpoint is a specialized **IME conversion engine**, not an open-ended chatbot. Send a compact JSON object as the `user` message with **empty System Prompt** and **`temperature: 0`**, or pair LM Studio / Ollama directly with the **[UnimeType Keyboard App](https://unimetype.com/download?utm_source=huggingface&utm_medium=referral&utm_campaign=transliteration_2_6)** for system-wide Caps Lock / Convert key replacement in any app.
| Scenario (`1 Native Language + English`) | `user` Message JSON (`content`) | Direct `assistant` Output |
| --- | --- | --- |
| **Chinese + English (`zh`)** | `{"operation":"convert","input":"qing xian zai staging huanjing pao yi bian suoyou unit test, queren API latency meiyou shenggao zhi hou, women zai anpai production deploy","enabled_languages":["chinese","english"],"primary_language":"chinese"}` | `请先在 staging 环境跑一遍所有 unit test, 确认 API latency 没有升高之后, 我们再安排 production deploy` |
| **Japanese + English (`ja`)** | `{"operation":"convert","input":"staging kankyou de atarashii API endpoint no dousa wo kakunin shite kara, mondai ga nakereba ban-gohan no ato ni production deploy shimasu","enabled_languages":["english","japanese"],"primary_language":"japanese","japanese_output_style":"natural"}` | `staging 環境で新しい API endpoint の動作を確認してから, 問題がなければ晩ご飯の後に production deploy します` |
| **Hindi + English (`hi`)** | `{"operation":"convert","input":"maine GitHub par naya PR open kar diya hai, aap ek baar code review kar lijiye, phir hum shaam ko staging server par deploy karenge","enabled_languages":["english","hindi"],"primary_language":"hindi"}` | `मैंने GitHub पर नया PR open कर दिया है, आप एक बार code review कर लीजिए, फिर हम शाम को staging server पर deploy करेंगे` |
| **Arabic + English (`ar`)** | `{"operation":"convert","input":"ana 7a2a3od fel office l7ad el sa3a 8 3ashan a5allas el deployment, law 3andak ay update eb3atli 3ala Slack aw WhatsApp","enabled_languages":["arabic","english"],"primary_language":"arabic"}` | `أنا هقعد في ال office لحد الساعة 8 عشان أخلص ال deployment, لو عندك أي update ابعتلي على Slack أو WhatsApp` |
| **Russian + English (`ru`)** | `{"operation":"convert","input":"pozhaluista prover novyi Docker build na staging pered tem kak my nachnem release","enabled_languages":["english","russian"],"primary_language":"russian"}` | `пожалуйста проверь новый Docker build на staging перед тем как мы начнем release` |
| **German + English (`de`)** | `{"operation":"convert","input":"koennen wir das API Gateway fuer den neuen Docker Container heute noch ueberpruefen","enabled_languages":["english","german"],"primary_language":"german"}` | `können wir das API Gateway für den neuen Docker Container heute noch überprüfen` |
```bash
curl http://127.0.0.1:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "UnimeType/Transliteration-2.0-9B",
"temperature": 0,
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "{\"operation\":\"convert\",\"input\":\"mingtian 3pm he @alex review auth-service de PR #412, ranhou deploy dao staging\",\"enabled_languages\":[\"chinese\",\"english\"],\"primary_language\":\"chinese\"}"
}
]
}'
```
---
## Evaluation Benchmarks (`v2.6`)
### 1. Held-Out Multi-Suite Benchmark: Offline `v2.6` (`0.8B / 4B / 9B`) vs. Cloud `DeepSeek V4.1 Flash`
All offline `v2.6` models run with **`0` system-prompt tokens** (`system_prompt = ""`, compact JSON input, `temperature = 0`), compared head-to-head against UnimeType's production cloud baseline (**`deepseek-v4.1-flash`** paired with the full ~2,800-token `v30` production system prompt and boundary guards). Zero sentence or OOD probe overlap (`0.00%`) exists between training data and any evaluation suite.
| Model / Tier | System Prompt Overhead | `708` Shared (`v4`-Aligned) | Core-5 (`773` Cases) | 12-Language / 13-Mode (`1,573` Cases) | `Dogfood-30` Real Pain Points (Exact / Tolerant) | Zero-Overlap `OOD-Unseen-20` (Exact / Tolerant / **Probe Repair**) |
| --- | --- | ---: | ---: | ---: | ---: | ---: |
| **`DeepSeek V4.1 Flash` (Cloud Baseline)** | ~2,800 tok (`v30`) | **90.82%** (643/708) | **90.30%** (698/773) | **93.20%** (1466/1573) | **53.3% / 76.7%** (23/30) | **45% / 75% / 90%** (18/20) |
| **`Transliteration-2.0-0.8B` (`v2.6`)** | **0 tok** (short JSON) | **72.32%** (512/708) | **71.15%** (550/773) | **69.99%** (1101/1573) | **36.7% / 36.7%** (11/30) | **25% / 25% / 45%** (9/20) |
| **`Transliteration-2.0-4B` (`v2.6`)** | **0 tok** (short JSON) | **89.12%** (631/708) | **87.45%** (676/773) | **88.11%** (1386/1573) | **50.0% / 56.7%** (17/30) | **35% / 35% / 75%** (15/20) |
| **`Transliteration-2.0-9B` (`v2.6`)** | **0 tok** (short JSON) | **92.09%** (`+1.27 pp` vs cloud) | **90.94%** (`+0.64 pp` vs cloud) | **91.54%** (1440/1573) | **73.3% / 76.7%** (`= cloud`) | **55% / 60% / 90%** (18/20, `= cloud`) |
> **Reproducible Local Benchmark (`Smoke-60`)**: Run the open 60-case real-world blind-typing suite (`eval/smoke_60.jsonl`) on your own hardware via **[github.com/UnimeType/transliteration](https://github.com/UnimeType/transliteration)** — both `4B` (`P50 376 ms`) and `9B` (`P50 722 ms`) achieve **100.0% (`99/99`) protected-span preservation** (`URL`, `@handle`, `#issue`, hex colors, CLI flags, file paths, and LaTeX `\cite{}`) and **100% pass** on closed-set `reconvert` exhaustion (`UNIMETYPE_NO_ALTERNATIVE`).
### 2. Per-Language Strict Accuracy Across All 12 Languages / 13 Modes (`1,573` Held-Out Cases)
| Language / Output Mode | Cases | `DeepSeek V4.1 Flash` (Cloud) | `v2.6` `0.8B` | `v2.6` `4B` | `v2.6` `9B` |
| --- | ---: | ---: | ---: | ---: | ---: |
| **Chinese Pinyin (`chinese`)** | 261 | 88.1% | 75.9% | **91.2%** | **93.5%** |
| **Japanese Kanji-Kana (`japanese:natural`)** | 139 | **95.7%** | 60.4% | 85.6% | 87.0% |
| **Japanese Kana-Only (`japanese:kana`)** | 100 | **90.0%** | 66.0% | 75.0% | 86.0% |
| **Hindi Hinglish (`hindi`)** | 135 | 91.1% | 80.7% | **94.8%** | **99.3%** |
| **Arabic Arabizi (`arabic`)** | 138 | **88.4%** | 67.4% | 84.1% | 85.5% |
| **Russian Translit (`russian`)** | 100 | **98.0%** | 52.0% | 88.0% | 91.0% |
| **Greek Greeklish (`greek`)** | 100 | **85.0%** | 49.0% | 77.0% | **85.0%** |
| **Vietnamese Telex / ASCII (`vietnamese`)** | 100 | **97.0%** | 43.0% | 84.0% | 88.0% |
| **Spanish ASCII (`spanish`)** | 100 | **96.0%** | 71.0% | 85.0% | 93.0% |
| **French ASCII (`french`)** | 100 | **95.0%** | 77.0% | 92.0% | 87.0% |
| **Portuguese ASCII (`portuguese`)** | 100 | **99.0%** | 88.0% | 97.0% | **99.0%** |
| **German ASCII / Umlaut (`german`)** | 100 | 99.0% | 88.0% | 96.0% | **100.0%** |
| **Italian ASCII (`italian`)** | 100 | **99.0%** | 83.0% | 91.0% | 94.0% |
---
## Version History & Reproducible Revisions
This repository tracks the latest `2.x` release on `main` while preserving immutable Git tags for every milestone:
- **`v2.6` (default / `main`)**: Initial public release of the **`9B`** flagship offline tier (`dataset_v5.1`), supporting 12 languages / 13 output modes with `92.09%` accuracy on the `708`-case `v4`-aligned suite and `90.94%` on `Core-5` (`773` cases).
```bash
huggingface-cli download UnimeType/Transliteration-2.0-9B --revision v2.6
```