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.

Runs in browser · WASM translation 110.56 MB q8 ONNX Apache-2.0 MarianMT · 62,518 SentencePiece

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.

5 English domain presets
Drop a .txt, .md, .srt, or .csv file here, paste via clipboard, or choose a file:
0 chars

Russian translation (Русский)

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

Prepare Opus-MT EN→RU above to translate English to Russian locally in CPU WebAssembly.

Latency—
Throughput—
EN → RU tokens—
EN / RU fertility—
Cyrillic UTF-8 bytes—
NaN count—

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