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.

Runs in browser · WASM translation · zero-pivot FR→ES 130.79 MB q8 WASM (123.21 MB ONNX) Apache-2.0 MarianMT · 74,822 SentencePiece

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.

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

Spanish translation (Live MarianMT · español)

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

Prepare OPUS-MT FR→ES above to translate French directly into Spanish in CPU WebAssembly.

Latency—
Throughput—
In → Out tokens—
Source fertility—
FR accents / ES ¿¡ñ—
NaN count—

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