translation · MarianMT English→Russian (Cyrillic) · q8 · WASM · 110.56 MB · Apache-2.0
Opus-MT English → Russian
University of Helsinki's dedicated 6+6 MarianMT encoder-decoder
(Helsinki-NLP/opus-mt-en-ru,
quantized to 110.56 MB INT8 ONNX in
Xenova/opus-mt-en-ru)
translates English prose into Russian Cyrillic completely off the main thread on CPU WebAssembly —
generating inflected Russian cases, aspectual verbs, and UTF-8 Cyrillic subwords with zero server egress.
1 · On-device model (110.56 MB q8 WASM · encoder 51.63 MB + decoder 58.93 MB)
2 · Live English → Russian (Cyrillic) MarianMT Studio
Pick a domain preset, type or paste English text (even with Ctrl/Cmd+V anywhere on the page),
or drop/upload a .txt, .md, .srt, or .csv file.
Inference runs off the main thread in a dedicated module Web Worker.
.txt, .md, .srt, or .csv file here, paste via clipboard, or choose a file:
Russian translation (Русский)
Waiting for runPrepare Opus-MT EN→RU above to translate English to Russian locally in CPU WebAssembly.
3 · See Inside MarianTokenizer: Cyrillic Byte/Token Fertility & Sentence Alignment
MarianMT caps each pass at 512 tokens across a shared 62,518-entry SentencePiece
vocabulary. In UTF-8, Cyrillic letters occupy 2 bytes each while Russian inflectional endings split into subword
suffixes — compare English source fertility (inTokens / enWords) against Russian Cyrillic fertility
(outTokens / ruWords) and UTF-8 byte expansion below.
| # | English segment | Russian translation (Русский) | Tokens (in→out) | Latency |
|---|---|---|---|---|
| Run a translation above to inspect sentence-by-sentence alignment. | ||||
Russian Cyrillic SentencePiece Output Pieces (кириллица · UTF-8 Fertility)
Run a translation to inspect real Cyrillic SentencePiece output tokens.
English SentencePiece Source Pieces (MarianTokenizer · 62,518 vocab)
Run a translation to inspect real English SentencePiece source tokens.
4 · Why It Matters & At a Glance
Private local English→Russian translation keeps product localization, legal notices, customer support replies, and video subtitles inside the visitor's browser — zero API billing, zero cloud retention, and full offline replay once the 110.56 MB checkpoint is cached.
| Upstream model |
Helsinki-NLP/opus-mt-en-ru
|
|---|---|
| Browser ONNX repo |
Xenova/opus-mt-en-ru
(encoder_model_quantized.onnx 51.63 MB + decoder_model_merged_quantized.onnx 58.93 MB = 110.56 MB q8)
|
| 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, max_length=512, vocab_size=62518) |
| Special tokens | pad=<pad> (62517), eos=</s> (0), unk=<unk> · source_lang="en", target_lang="ru" |
| License | Apache-2.0 (University of Helsinki) |
Show the code — Off-thread MarianMT EN→RU translation & TextStreamer
Show the code — English sentence splitter preserving abbreviations & quotes
Benchmark Beam 1 vs 2 vs 4 speed-vs-fluency plus live Formal (Вы) vs Informal (ты) register & case inflection contrasts.
Practical · Multi-File .SRT, CSV & i18n BatchBatch-translate multiple .srt, .csv, or .txt files with English-column detection, mid-batch cancel, and sanitized i18n JSON/CSV/SRT exports.
Wild · UI Inflation, Gender & Loanword Stress LabMeasure Cyrillic UI button length inflation %, ambiguous 'you', genderless English actors, false friends, passive voice & idioms live.
Multi-Model · EN→RU→EN Round-Trip Drift AuditorChain Opus-MT EN→RU (110.56 MB) into Opus-MT RU→EN (110.56 MB, ~221 MB total) to audit back-translation semantic consistency offline.