translation · English→Spanish MarianMT · q8 · WASM · 113.11 MB · Apache-2.0

Opus-MT English → Spanish

University of Helsinki's OPUS-MT EN→ES (Helsinki-NLP/opus-mt-en-es, quantized to 113.11 MB INT8 ONNX in Xenova/opus-mt-en-es) is a dedicated 6+6 MarianMT encoder-decoder neural translator converting English into Spanish with grammatical gender agreement, subjunctive mood, and Spanish diacritics (á é í ó ú ü ñ ¿ ¡) — running 100% locally in CPU WebAssembly with zero cloud APIs.

Runs in browser · WASM translation 113.11 MB q8 ONNX Apache-2.0 MarianMT · 65,001 SentencePiece

1 · On-device model (113.11 MB q8 WASM · encoder 52.90 MB + decoder 60.21 MB)

2 · Live English → Spanish MarianMT Studio

Pick one of 5 domain presets, type or paste English text, or drop/upload a .txt, .md, .srt, or .csv file below.

Curated English domain presets (Release Note, E-Commerce, Legal, Medical & Dialogue)
Drop a .txt, .md, .srt, or .csv file anywhere here, paste via Ctrl/Cmd+V, or choose a local file:
0 chars

Spanish translation (Español)

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

Prepare Opus-MT EN→ES above to translate English prose into Spanish locally in CPU WebAssembly.

Latency—
Throughput—
Src → Tgt tokens—
SentencePiece fertility—
ES expansion %—
Backend · dtypeWASM · q8
NaN count—

3 · Sentence Alignment, Spanish Output Inspector & SentencePiece Subwords

Inspect sentence-by-sentence English→Spanish alignment, Spanish diacritic & inverted punctuation counts (áéíóúüñ ¿¡), and real MarianTokenizer subwords inside the 65,001-token vocabulary.

English words0
Spanish words0
Spanish diacritics0
Inverted ¿ / ¡0
Content SP pieces0
Sentence-by-sentence English to Spanish translation alignment
# English segment Spanish translation Tokens (in→out) Latency
Run a translation above to inspect sentence-by-sentence alignment.

Real SentencePiece Subword Pieces (MarianTokenizer · 65,001 vocab)

Run a translation to inspect real MarianTokenizer subwords and fertility.

Waiting for first on-device run.

4 · At a Glance, Show the Code & Use-Case Ladder

Upstream model Helsinki-NLP/opus-mt-en-es (Tatoeba eng→spa: BLEU 54.9 · chr-F 0.721)
Browser ONNX repo Xenova/opus-mt-en-es (encoder_model_quantized.onnx 52.90 MB + decoder_model_merged_quantized.onnx 60.21 MB = 113.11 MB q8)
Pipeline task & runtime translation · @huggingface/transformers@3.7.5 (shared pin in lib/webai.js) · CPU WASM
Architecture MarianMTModel (6 encoder + 6 decoder layers, d_model=512, 8 heads, ffn=2048, swish, max_length=512, vocab_size=65001)
Special tokens pad=<pad> (65000, also decoder_start_token_id), eos=</s> (0), unk=<unk> · eng→spa baked into weights
License Apache-2.0 (University of Helsinki Language Technology Research Group)
Show the code — Real Transformers.js MarianMT inference, streaming & NaN check
Show the code — English sentence segmentation for 512-token safety