translation · Many-to-One Multilingual→English · q8 · WASM · 118.35 MB (112.26 MB ONNX) · Apache-2.0
OPUS-MT Multilingual→EN — Many-to-One Global MarianMT Studio
University of Helsinki's single 6+6 MarianMT encoder-decoder
(Helsinki-NLP/opus-mt-mul-en,
quantized to 112.26 MB ONNX weights / 118.35 MB first visit incl. 6.09 MB tokenizer in
Xenova/opus-mt-mul-en)
translates 200+ source language codes across Latin, Cyrillic, Kana/Han, Arabic, and Devanagari
into English inside a local Web Worker — with zero >>lang<< prefix tokens.
1 · On-device model (118.35 MB q8 · encoder 52.48 MB + decoder 59.79 MB + tokenizer 6.09 MB)
2 · Live Multi-Script → English Translator (IT · RU · JA · ZH · UK · FR · ES · AR)
Pick a preset across 8 languages and 4 scripts, paste text anywhere on the page (Ctrl/Cmd+V),
or drop/upload a .txt, .md, .srt, or .csv file.
vocab.json contains 0 >>lang<< control tokens, so raw source text enters directly.
.txt, .md, .srt, or .csv file here, paste via clipboard, or choose a file:
English translation (Live MarianMT)
Waiting for runPrepare OPUS-MT Multilingual→EN above to translate 200+ languages into English in CPU WebAssembly.
3 · See Inside: 64,172-Piece Shared SentencePiece, Script Fertility & unk_id=2
Inspect how one 64,172-token SentencePiece vocabulary segments Latin, Cyrillic, CJK, and Arabic inputs,
and highlights any OOV fallback to unk_id=2 ("." in vocab.json).
| # | Detected | Source segment | English translation | Tokens (in→out) | Latency |
|---|---|---|---|---|---|
| Run a translation above to inspect sentence-by-sentence alignment. | |||||
Source Per-Word SentencePiece Fertility (64,172 vocab)
Run a translation to inspect source word fertility.
Source SentencePiece Token Sequence
Run a translation to inspect real MarianTokenizer SentencePiece subwords.
4 · Why It Matters & At a Glance
One cached 118.35 MB checkpoint translates dozens of scripts without loading separate per-pair models —
ideal for first-pass localization, global subtitle drafts, and cross-lingual triage before routing into an English classifier.
It also reveals the real trade-off of cramming 200+ languages into a single 64,172-piece vocabulary.
| Upstream model |
Helsinki-NLP/opus-mt-mul-en
|
|---|---|
| Browser ONNX repo |
Xenova/opus-mt-mul-en
(encoder_model_quantized.onnx 52.48 MB + decoder_model_merged_quantized.onnx 59.79 MB = 112.26 MB q8 ONNX; 118.35 MB first visit incl. tokenizer.json 6.09 MB + configs)
|
| Pipeline task & runtime | translation · shared @huggingface/transformers@3.7.5 via lib/webai.js · CPU wasm |
| Architecture | MarianMTModel (6 encoder + 6 decoder layers, d_model=512, 8 attention heads, Swish FFN=2048, max_length=512, vocab_size=64172) |
| Special tokens | pad=<pad> (64171), eos=</s> (0), unk=<unk> (1, though tokenizer.json sets unk_id=2 ".") · decoder_start_token_id=64171 · 0 >>lang<< tokens · config num_beams=6 |
| License | Apache-2.0 (Helsinki-NLP) |
Show the code — Off-thread MarianMT translation & TextStreamer
Show the code — Multi-script Unicode & Latin lexical language detector
Show the code — Multi-script sentence splitter (Latin, CJK 。!?, Arabic ؟, Devanagari ।)
Compare Beam 1 / Beam 4 / Beam 6 + no_repeat_ngram_size + length_penalty, and probe raw vs stray >>lang<< tags.
Practical · Global .SRT, .CSV & Glossary BatchBatch-translate multi-script subtitles, support CSVs, and docs with mid-batch Cancel and SRT/CSV/TMX/MD/JSON exports.
Wild · unk_id=2, Script-Switch & Capacity Stress Lab6 live probes: OOV unk_id=2 ('.') leakage, 3-script mixing, repetition loops, stray >>deu<< noise, and numeric parity.
Multi-Model · Multilingual→EN→DeBERTa TriageChain OPUS-MT Multilingual→EN (118.35 MB) into DeBERTa-v3 Zero-Shot (87.25 MB) for global ticket routing (~206 MB total).