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.

Runs in browser · WASM translation 118.35 MB q8 first visit (112.26 MB ONNX) Apache-2.0 MarianMT · 64,172 SentencePiece · 200+ sources

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.

8 multi-script presets (grounded in live WASM output)
Drop a .txt, .md, .srt, or .csv file here, paste via clipboard, or choose a file:
IT · Latin

English translation (Live MarianMT)

Waiting for run
Prepare OPUS-MT Multilingual→EN above and click Translate to run real on-device MarianMT inference.

Prepare OPUS-MT Multilingual→EN above to translate 200+ languages into English in CPU WebAssembly.

Latency—
Throughput—
In → Out tokens–
Source fertility—
Detected / unk#2—
NaN count—

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).

Sentence-by-sentence Multilingual → English alignment and detected script/language guess
# 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 ।)