translation · Direct MarianMT French→Spanish (Zero-Pivot) · q8 · WASM · 130.79 MB · Apache-2.0
OPUS-MT FR→ES — Direct French-to-Spanish Zero-Pivot Studio
University of Helsinki's 6+6 MarianMT encoder-decoder
(Helsinki-NLP/opus-mt-fr-es,
quantized to 130.79 MB first visit / 123.21 MB q8 ONNX weights in
Xenova/opus-mt-fr-es)
translates French directly into Spanish without pivoting through English — preserving grammatical gender,
formal vous→usted register, French diacritics (é è ê ç œ à ù),
and Spanish inverted punctuation (¿ ¡ ñ) inside a local Web Worker.
1 · On-device model (130.79 MB q8 WASM · encoder 57.93 MB + decoder 65.28 MB + tokenizer 7.58 MB)
2 · Live Direct French → Spanish Translator
Pick a curated French register preset, type or paste French text (Ctrl/Cmd+V anywhere on the page),
or drop/upload a .txt, .md, .srt, .csv, or .json file.
Inference runs off the main thread in a dedicated module Web Worker.
.txt, .md, .srt, .csv, or .json file here, paste via clipboard, or choose a file:
Spanish translation (Live MarianMT · español)
Waiting for runPrepare OPUS-MT FR→ES above to translate French directly into Spanish in CPU WebAssembly.
3 · See Inside: SentencePiece ▁ Subwords, French Diacritics & Spanish ¿ ¡ ñ
Inspect how MarianMT's shared 74,822-piece FR/ES SentencePiece vocabulary encodes French diacritics
(é è ê ç œ à ù), elisions (l', d', qu'), and guillemets
(« »), then emits Spanish inverted marks (¿, ¡) and ñ
directly without passing through English.
French diacritic, elision, register, and Spanish inverted-punctuation diagnostics appear after translation.
| # | French segment | Spanish translation | Tokens (in→out) | Latency |
|---|---|---|---|---|
| Run a translation above to inspect sentence-by-sentence FR→ES alignment. | ||||
French Source Per-Word SentencePiece Fertility (74,822 vocab)
Run a translation to inspect per-word SentencePiece fertility.
French Source SentencePiece ▁ Token Sequence
Run a translation to inspect real MarianTokenizer SentencePiece subwords.
4 · Why Zero-Pivot FR→ES Matters & At a Glance
Pivoting French → English → Spanish discards grammatical gender, collapses formal vous and
informal tu into English you, and doubles latency. Running
Helsinki-NLP/opus-mt-fr-es directly in the browser unlocks zero-egress European legal/compliance
translation, bilingual customer-support localization, and offline film subtitling across the Francophone and
Hispanophone worlds.
| Upstream model |
Helsinki-NLP/opus-mt-fr-es
|
|---|---|
| Browser ONNX repo |
Xenova/opus-mt-fr-es
(encoder_model_quantized.onnx 57.93 MB + decoder_model_merged_quantized.onnx 65.28 MB = 123.21 MB q8 ONNX; 130.79 MB first visit incl. tokenizer.json 7.58 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=74822) |
| Special tokens | pad=<pad> (74821), eos=</s> (0), unk=<unk> · decoder_start_token_id=74821 · config default num_beams=4 |
| Upstream benchmarks | Tatoeba FR→ES: 53.2 BLEU (0.709 chr-F) · newstest2011: 38.3 BLEU (0.622 chr-F) · newstest2012: 38.1 BLEU (0.619 chr-F) |
| License | Apache-2.0 (University of Helsinki) |
Show the code — Off-thread MarianMT FR→ES translation & TextStreamer
Show the code — French sentence splitter preserving M., Mme., p.ex. & guillemets
Show the code — French diacritics (é è ê ç œ à ù) & Spanish ¿ ¡ ñ detector
Live Beam 1 vs 2 vs 4 + length_penalty benchmark, 10 FR→ES cognate/faux-ami fertility probes, and vous/tu & gender ablations.
Practical · .SRT, .CSV, .JSON & .TXT WorkbenchBatch-translate French subtitles, ragged CSVs, i18n JSON bundles, and docs with FR→ES glossary coverage, Cancel, and safe exports.
Wild · Idioms, Québécois, Code-Switching & Faux Amis6 live FR→ES stress probes (idioms, Quebec lexicon, double negation, trilingual code-switching, 512-token clip) + 8-term faux-amis grader.
Multi-Model · FR→ES → ES→EN Semantic Fidelity RelayChain OPUS-MT FR→ES (130.79 MB) into OPUS-MT ES→EN (119.38 MB) to audit meaning retention, faux amis, and € parity across two hops.