QingYi-MT-140M
a 142 MB bidirectional translation model
3 min read
QingYi-MT-140M is a compact AI model for bidirectional offline translation between Chinese and English (zh↔en). The author trained it from scratch on Apple Silicon using an asymmetric 12E/2D architecture (a deep 12-layer encoder paired with a lightweight 2-layer decoder) and quantized it to CTranslate2 INT8 (8-bit weight compression with virtually no accuracy loss). Unlike traditional mobile setups that require two separate files—one for each language direction—a single model handles both and takes up just 141.9 MB. It is built for mobile and desktop developers who need fast, offline translation of menus, receipts, street signs, and UI elements without relying on cloud APIs.
Key features
- One file instead of two: A shared 48,000-token SentencePiece vocabulary and three-way weight tying (
src = tgt = lm_head) let you switch translation directions via<2en>and<2zh>tokens without reloading the model into memory. - Resilient to everyday text and OCR noise: The model was fine-tuned on synthetic datasets containing receipts, prices, street signs, slang, and optical character recognition snippets.
- Accurate digit preservation: On the
WMT24 en→zhandIWSLT17 zh→entest sets, it keeps Arabic numerals intact 98.5% and 93.7% of the time respectively, rather than spelling them out as words. - Traditional Chinese support: Before tokenization in the
zh→endirection, built-in OpenCCt2sconversion automatically normalizes traditional characters into simplified Chinese.
What you can do
- Embed into offline Android or iOS apps: Switching to this model in the Saozi app cut the installer package (
.aab) size by more than half, from 465 MB down to 216 MB. - Run on CPU in local services: The lightweight two-layer decoder is engineered for fast autoregressive search (
beam_size=2) on ARMv8 mobile processors and standard CPUs without a GPU. - Translate camera OCR output: Pair it with text recognition to translate receipts, restaurant menus, and app screens while preserving prices and formatting.
Example
import ctranslate2, sentencepiece as spm
sp = spm.SentencePieceProcessor(model_file="spm.model")
translator = ctranslate2.Translator(".", device="cpu")
tokens = ["<2en>"] + sp.encode("少冰三分糖", out_type=str)
res = translator.translate_batch([tokens], beam_size=2, repetition_penalty=1.05, no_repeat_ngram_size=4)
print(sp.decode(res[0].hypotheses[0])) # Less ice, 30% sugar
Read more
DetailsMetrics: Scores 59.04 chrF++ / 36.24 BLEU on
EverydayZh-700 zh→en, outperforming Qwen3.5-0.8B-4bit (46.93 / 20.60) and NLLB-200-600M (42.34 / 19.57); hits 45.84 chrF++ on WMT23 zh→en (within 1.95 chrF++ of Gemini 3.8 Flash).Hardware & size: 140.83M parameters,
model.bin weights file takes 141.9 MB, runs on CPU via CTranslate2 INT8.Limitations: Trails larger models on long speeches (
IWSLT17) and complex proper nouns; rare decimal numbers with magnitude units like 2.5亿 and spaced numbers (400 多万) can suffer from scaling errors.License: MIT (weights, tokenizer, EverydayZh-700 benchmark, and export scripts).










Comments