Instructions to use UnimeType/Transliteration-2.0-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use UnimeType/Transliteration-2.0-4B with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("UnimeType/Transliteration-2.0-4B") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use UnimeType/Transliteration-2.0-4B with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "UnimeType/Transliteration-2.0-4B"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "UnimeType/Transliteration-2.0-4B" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use UnimeType/Transliteration-2.0-4B with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "UnimeType/Transliteration-2.0-4B"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "UnimeType/Transliteration-2.0-4B" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "UnimeType/Transliteration-2.0-4B", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use UnimeType/Transliteration-2.0-4B with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "UnimeType/Transliteration-2.0-4B"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default UnimeType/Transliteration-2.0-4B
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use UnimeType/Transliteration-2.0-4B with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "UnimeType/Transliteration-2.0-4B"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "UnimeType/Transliteration-2.0-4B" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Download README.md from UnimeType/Transliteration-2.0-4B: direct link, hf CLI and curl.
- Browser
- Download file 8.93 kB
-
https://huggingface.co/UnimeType/Transliteration-2.0-4B/resolve/main/README.md
- Command line
-
hf download hf://UnimeType/Transliteration-2.0-4B/README.md
-
curl -L -o README.md https://huggingface.co/UnimeType/Transliteration-2.0-4B/resolve/main/README.md
license: apache-2.0
base_model:
- Qwen/Qwen3.5-4B
library_name: mlx
pipeline_tag: text-generation
language:
- en
- zh
- ja
- hi
- ar
tags:
- mlx
- transliteration
- pinyin
- romaji
- hinglish
- arabizi
- ime
- qwen3.5
- v2.1
UnimeType Transliteration 2.0 4B — v2.1 (Long-Sentence Upgrade · MLX 6-bit)
Current Release:
v2.1(2.0-v4Multi-Clause Long-Sentence Upgrade) · Protocol:unimetype-convert-short-v3(100% drop-in compatible with allTransliteration-2.0clients)
UnimeType Transliteration 2.0 4B (v2.1) is a specialized multilingual input-method transliteration model built on Qwen/Qwen3.5-4B. It converts Chinese Pinyin, Japanese Romaji, Romanized Hindi / Hinglish, and Arabic Arabizi into their native scripts across both short phrases and multi-clause long sentences (60–240+ chars) while preserving English technical terms, @handles, URLs, code spans, JSON literals, numbers, line breaks, and emoji in place.
- 🚀 Launch Interactive Playground Space → (Test 25 verified multi-clause & edge presets or run live WebAssembly inference in your browser)
- ⌨️ Download the UnimeType Keyboard App → (Type in-place across macOS, Windows, Linux, iOS, Android & ChromeOS — no copy-paste or manual JSON wrapping needed)
- 📖 Technical Report & LM Studio Setup Guide →
Quickstart: unimetype-convert-short-v3 JSON Protocol (LM Studio / llama.cpp / mlx_lm)
Important for LM Studio / Ollama / GGUF Users: This model is a deterministic IME transliteration engine, not a general chat bot. Pass a single-line compact JSON object as the
usermessage (with empty System Prompt andtemperature: 0.0), or use the UnimeType Keyboard App which formats requests and replaces text in-place automatically.
| Language | user Message JSON (content) |
Direct assistant Output |
|---|---|---|
Chinese Pinyin (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 Romaji (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 Hinglish (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 Arabizi (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 |
curl http://127.0.0.1:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "UnimeType/Transliteration-2.0-4B",
"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\"}"
}
]
}'
What's New in v2.1 (Long-Sentence Upgrade)
- Multi-Clause Long-Sentence Mastery (
v2.0→v2.1): Trained on a balanced curriculum where 67.2% of training inputs are multi-clause sentences (60–240chars,2–5clauses,max_seq_len=1024) covering spaced, phrase-grouped, and unspaced romanization, bilingual technical code-switching, protected placeholders, multiline layouts, andAnother(reconvert) cycling:0.8B(v2.0→v2.1): Multi-clause strict pass up 13× (0.6% → 8.1%), long-sentence character accuracy69.2% → 76.5%(ja+11.9%,ar+9.2%), and standard 414-case benchmark up from66.4%(275/414) to72.7%(301/414), surpassingDeepSeek V4.1 Flash(70.5%).4B(v2.0→v2.1): Multi-clause strict pass up from20.0%(32/160) to28.8%(46/160,29.4%normalized), long-sentence character accuracy90.4% → 93.21%(all 4 languages>90.9%), contract violations cut by-76.9%(13 → 3), and standard 414-case benchmark up from87.4%(362/414) to88.4%(366/414) (ja61.5% → 76.9%).
- Unconditional Non-Thinking Generation Template: Ships with an unconditional non-thinking
chat_template.jinja(<|im_start|>assistant\n<think>\n\n</think>\n\n) across all formats (MLX 6-bit,BF16 Safetensors, andGGUF), preventingThinking Process:token waste or truncation in LM Studio,mlx-lm, andllama.cpp.
Evaluation Benchmarks (v2.0 vs v2.1)
1. Multi-Clause Long-Sentence Benchmark (160 cases · 2–5 clauses, 60–240 chars)
| Language / Metric | v2.0 (0.8B before) |
v2.1 (0.8B now) |
v2.0 (4B before) |
v2.1 (4B now) |
|---|---|---|---|---|
| Overall Strict Pass (160 cases) | 1 / 160 (0.6%) | 12 / 160 (7.5%) | 32 / 160 (20.0%) | 46 / 160 (28.7%) |
| Overall Normalized Pass (160 cases) | 1 / 160 (0.6%) | 12 / 160 (7.5%) | 33 / 160 (20.6%) | 47 / 160 (29.4%) |
| Mean Character Accuracy (160 cases) | 69.2% | 76.49% | 90.4% | 93.21% |
Chinese Pinyin (zh, 40 cases) |
0 / 40 (0.0% · 61.7% char) | 1 / 40 (2.5%) · 66.7% char | 6 / 40 (15.0% · 92.6% char) | 9 / 40 (22.5%) · 92.6% char |
Japanese Romaji (ja, 40 cases) |
0 / 40 (0.0% · 51.7% char) | 0 / 40 (0.0%) · 63.7% char | 6 / 40 (15.0% · 86.0% char) | 9 / 40 (22.5%) · 91.0% char |
Hindi Hinglish (hi, 40 cases) |
1 / 40 (2.5% · 91.9% char) | 11 / 40 (27.5%) · 94.8% char | 20 / 40 (50.0% · 96.7% char) | 25 / 40 (62.5%) · 98.1% char |
Arabic Arabizi (ar, 40 cases) |
0 / 40 (0.0% · 71.6% char) | 0 / 40 (0.0%) · 80.8% char | 0 / 40 (0.0% · 86.4% char) | 3 / 40 (7.5%) · 91.2% char |
2. Standard 414-Case Short-Sentence & Edge-Case Benchmark
| Slice / Metric | v1.0 (Transliteration-4B) |
DeepSeek V4.1 Flash | v2.1 (Transliteration-2.0-0.8B) |
v2.1 (Transliteration-2.0-4B) |
|---|---|---|---|---|
| Overall Strict Pass (414 cases) | 230 / 414 (55.6%) | 292 / 414 (70.5%) | 301 / 414 (72.7%) | 366 / 414 (88.4%) |
| Overall Expanded Pass (414 cases) | 242 / 414 (58.5%) | 297 / 414 (71.7%) | 301 / 414 (72.7%) | 366 / 414 (88.4%) |
Chinese Pinyin (zh) |
151 / 207 (72.9%) | 171 / 207 (82.6%) | 168 / 207 (81.2%) | 195 / 207 (94.2%) |
Japanese Romaji (ja) |
15 / 52 (28.8%) | 37 / 52 (71.2%) | 22 / 52 (42.3%) | 40 / 52 (76.9%) |
Hindi / Hinglish (hi) |
41 / 71 (57.7%) | 49 / 71 (69.0%) | 51 / 71 (71.8%) | 61 / 71 (85.9%) |
Arabic Arabizi (ar) |
23 / 84 (27.4%) | 35 / 84 (41.7%) | 60 / 84 (71.4%) | 70 / 84 (83.3%) |
Version History & Reproducible Revisions
This repository tracks the latest 2.x release on main while preserving immutable Git tags for every milestone:
v2.1(default /main): Multi-clause long-sentence upgrade (2.0-v4,max_seq_len=1024).huggingface-cli download UnimeType/Transliteration-2.0-4B --revision v2.1v2.0: Initial short-protocol release (2.0-v3,max_seq_len=640).huggingface-cli download UnimeType/Transliteration-2.0-4B --revision v2.0