← All models

translation Β· text Β· WASM Β· ~115 MB

OPUS-MT Dutch β†’ English β€” one small model, one direction

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.

At a glance

ModelXenova/opus-mt-nl-en (ONNX mirror of Helsinki-NLP/opus-mt-nl-en)
Task / pipelinetranslation (sequence-to-sequence)
ArchitectureMarianMT β€” a compact Transformer encoder-decoder; one model per language pair (no language codes)
DirectionDutch β†’ English only (the pair is baked into the weights)
Quantizationq8 (8-bit) ONNX
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~115 MB (~54 MB encoder + ~61 MB decoder), cached after first load
LicenseApache-2.0 (Helsinki-NLP OPUS-MT); mirror republished by Xenova
Web APIsWebAssembly, Web Workers β€” all Baseline widely available

Run it

Type or pick Dutch, translate to English. The model loads automatically when cached; greedy decoding streams the English live as it is generated.

Translation (English)

See inside β€” tokens in, chunks out, speed measured

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.

Pair
–
Tokens in
–
Tokens out
–
Speed
–
This model
~115 MB
one pair
NLLB-200 (distilled)
~600 MB
200 languages

Why it matters

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.

Use cases

Basics

Translate Dutch phrases and watch the English stream in, with token and speed readouts.

Practical

Batch-translate a table of Dutch UI strings to English in one fast pass.

Wild

Round-trip a sentence Dutch β†’ English β†’ Dutch with two OPUS-MT models and measure the drift.

How the API works

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.

References