translation · MarianMT English→French · q8 · WASM · 107.47 MB · Apache-2.0
OPUS-MT EN→FR — English-to-French MarianMT Studio
University of Helsinki's 6+6 MarianMT encoder-decoder
(Helsinki-NLP/opus-mt-en-fr,
quantized to 107.47 MB ONNX in
Xenova/opus-mt-en-fr)
translates English documentation, microcopy, legal clauses, and essays into accented French entirely
inside a local Web Worker — inspecting SentencePiece fertility, elisions, and French typographic spacing on-device.
1 · On-device model (107.47 MB q8 WASM · encoder 50.09 MB + decoder 57.38 MB)
2 · Live English → French Translator
Pick a domain preset, type or paste English text (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:
French translation (Live MarianMT)
Waiting for runPrepare OPUS-MT EN→FR above to translate English locally in CPU WebAssembly.
3 · See Inside: SentencePiece Fertility & French Typographic Spacing
Inspect how MarianMT's shared 59,514-piece SentencePiece vocabulary splits English words,
how French output grows (char expansion %), and whether French orthography produces elisions
(l', d', qu'), accents (é, è, ç, œ),
and spaced punctuation (« … », !, ?).
French orthography and typographic spacing diagnostics appear after translation.
| # | English segment | French translation | Tokens (in→out) | Latency |
|---|---|---|---|---|
| Run a translation above to inspect sentence-by-sentence alignment. | ||||
French Output Per-Word SentencePiece Fertility (59,514 vocab)
Run a translation to inspect French word fertility.
English Source SentencePiece Token Sequence
Run a translation to inspect real MarianTokenizer SentencePiece subwords.
4 · Why It Matters & At a Glance
Private local English→French translation enables zero-egress product localization, subtitle translation, sensitive document drafting, and instant bilingual QA workflows without cloud translation API keys.
| Upstream model |
Helsinki-NLP/opus-mt-en-fr
|
|---|---|
| Browser ONNX repo |
Xenova/opus-mt-en-fr
(encoder_model_quantized.onnx 50.09 MB + decoder_model_merged_quantized.onnx 57.38 MB = 107.47 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, Swish FFN=2048, max_length=512, vocab_size=59514) |
| Special tokens | pad=<pad> (59513), eos=</s> (0), unk=<unk> · decoder_start_token_id=59513 |
| License | Apache-2.0 (University of Helsinki) |
Show the code — Off-thread MarianMT translation & TextStreamer
Show the code — English sentence splitter preserving abbreviations & decimals
Show the code — French elision, accent & typographic spacing analyzer
Live Beam 1 vs 2 vs 4 speed-vs-fluency benchmark and Formal vous vs Informal tu + Subjunctive Agreement Lab.
Practical · Multi-File .SRT, CSV & TXT BatchTranslate English subtitles, UI localization CSVs, and documents locally with mid-batch Cancel and i18n/SRT/CSV exports.
Wild · UI Expansion, Faux-Amis & Gender Lab6 live stress probes: UI button inflation %, faux-amis traps, gender ambiguity, idioms, acronyms, and passive voice.
Multi-Model · EN→FR→EN Round-Trip VerifierChain OPUS-MT EN→FR (107.47 MB) into OPUS-MT FR→EN (107.5 MB) to measure BLEU, chrF, and word-overlap drift.