translation Β· text Β· WASM Β· ~115 MB
The multilingual demos (M2M100, NLLB-200) cover every language with one big model. Helsinki-NLP's OPUS-MT family takes the opposite bet: a dedicated bilingual model per pair. This is the Dutch β English member β ~115 MB, quick to load, and trained on the real OPUS DutchβEnglish parallel corpus. Type Dutch, watch the English stream in, all on-device.
| Model | Xenova/opus-mt-nl-en (ONNX mirror of Helsinki-NLP/opus-mt-nl-en) |
|---|---|
| Task / pipeline | translation (sequence-to-sequence) |
| Architecture | MarianMT β a compact Transformer encoder-decoder; one model per language pair (no language codes) |
| Direction | Dutch β English only (the pair is baked into the weights) |
| Quantization | q8 (8-bit) ONNX |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~115 MB (~54 MB encoder + ~61 MB decoder), cached after first load |
| License | Apache-2.0 (Helsinki-NLP OPUS-MT); mirror republished by Xenova |
| Web APIs | WebAssembly, Web Workers β all Baseline widely available |
Type or pick Dutch, translate to English. The model loads automatically when cached; greedy decoding streams the English live as it is generated.
The encoder reads your Dutch as SentencePiece tokens; the decoder then writes English one token at a
time. The stream you watched arrives in word-sized chunks (the
TextStreamer flushes at whitespace boundaries β chunks, not subword tokens). Below are the
exact token counts and the measured decode speed from your last run β a dedicated pair model decodes
short sentences in well under a second on WASM.
Dutch is a top-20 web language, and a huge share of Dutch content β government portals, news, support docs, reviews β never gets translated because server translation costs money and leaks data. A dedicated 115 MB pair model makes Dutch β English a client-side feature: no API key, no upload, works offline after one download.
The pair is its own model; the pipeline call needs no language codes:
import { pipeline } from "@huggingface/transformers";
const translate = await pipeline(
"translation",
"Xenova/opus-mt-nl-en",
); // downloads + caches ~115 MB once β this pair only
const out = await translate("Hoi, hoe gaat het met je?");
// β [{ translation_text: "Hi, how are you?" }]
There's no src_lang/tgt_lang β the direction is baked into the weights. This
page streams output chunks via a TextStreamer inside a Web Worker so the UI stays
responsive, and the shared model loader auto-initialises the model from cache on return visits.