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.

Runs in browser · WASM translation 107.47 MB q8 ONNX Apache-2.0 MarianMT · 59,514 SentencePiece

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.

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

French translation (Live MarianMT)

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

Prepare OPUS-MT EN→FR above to translate English locally in CPU WebAssembly.

Latency—
Throughput—
In → Out tokens—
Source fertility—
FR orthography—
NaN count—

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