WMT Translation
Tests how well a model translates news sentences between English and French, German or Romanian, scored by overlap with human translations.
At a glance
What it tests
WMT is the annual shared task for machine translation; its test sets are the standard yardstick. BLEU measures n-gram overlap with reference translations, and 'supervised SOTA' means systems trained on millions of parallel sentence pairs.
GPT-2's experiment was almost a stunt: its training data was English-only (with some French text that slipped in), and prompting 'english sentence = french sentence' pairs got 11.5 BLEU on Fr→En — worse than unsupervised MT, but non-zero. GPT-3 pushed this much further: 39.2 BLEU Fr→En few-shot beat the supervised SOTA, and De→En and Ro→En did the same, while translation *into* the other languages lagged because the model is mostly English.
The lesson that stuck: a big enough English model learns other languages as a side effect, and it is much better at reading them than writing them.
Examples
Items from the dataset (or representative items where the originals are not freely redistributable).
Reported results
Scores reported on this benchmark, with the evaluation setting each one used.
| Setting | Reported | Context |
|---|---|---|
| Zero-shot with example pairs in context; English-only training data | Fr→En 11.5 BLEUEn→Fr 5 BLEU | Unsupervised SOTA 33.5; the paper found only 10 MB of French in WebText |
| Few-shot (64 examples) | Fr→En 39.2En→Fr 32.6De→En 40.6En→De 29.7Ro→En 39.5En→Ro 21.0 | Supervised SOTA: 35.0 / 45.6 / 40.2 / 41.2 / 39.9 / 38.5; GPT-3 beat it on all three X→En directions |
State of the art
Figures as tabulated in GPT-3 Table 3.4. These test sets are no longer the research frontier (WMT moves on yearly; COMET has replaced BLEU), so later numbers are sparse. Source: arxiv.org ↗ · checked October 2026.
Quickstart
Load the benchmark and score a Hugging Face causal LM on it in a few lines.
pip install -U datasets transformers evaluate lm-eval sacrebleu rouge-score scikit-learn
translation (dict with 'en' and 'fr' / 'de' / 'ro'). WMT16 configs: `wmt/wmt16`, 'de-en' and 'ro-en'.
from datasets import load_dataset ds = load_dataset("wmt/wmt14", "fr-en", split="test") print(ds) # columns: translation (dict with 'en' and 'fr' / 'de' / 'ro') print(ds[0])
Two helpers cover every benchmark in this collection: loglik for anything multiple-choice (score each option, pick the highest) and generate for anything free-form. Swap MODEL for whatever you are evaluating.
import torch from transformers import AutoTokenizer, AutoModelForCausalLM MODEL = "gpt2" # or "Qwen/Qwen2.5-1.5B", "meta-llama/Llama-3.2-1B", … tok = AutoTokenizer.from_pretrained(MODEL); model = AutoModelForCausalLM.from_pretrained(MODEL, torch_dtype=torch.bfloat16).eval().to("cuda") @torch.no_grad() def loglik(context, continuation): """Sum of log-probs of `continuation` tokens given `context` — the standard multiple-choice scorer.""" ids = tok(context + continuation, return_tensors="pt").input_ids.to(model.device) n_ctx = len(tok(context).input_ids) logp = model(ids).logits.log_softmax(-1)[0, :-1] return logp.gather(1, ids[0, 1:, None])[n_ctx - 1:].sum().item() @torch.no_grad() def generate(prompt, max_new_tokens=32, stop=None): ids = tok(prompt, return_tensors="pt").input_ids.to(model.device) out = model.generate(ids, max_new_tokens=max_new_tokens, do_sample=False, pad_token_id=tok.eos_token_id) text = tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True) return text.split(stop)[0] if stop else text
import sacrebleu src, tgt = "fr", "en" # direction: fr -> en FEW = "".join(f"French: {ex['translation']['fr']} = English: {ex['translation']['en']}\n" for ex in ds.select(range(5))) hyps, refs = [], [] for ex in ds.select(range(5, 505)): out = generate(FEW + f"French: {ex['translation'][src]} = English:", max_new_tokens=96, stop="\n") hyps.append(out.strip()); refs.append(ex["translation"][tgt]) print(sacrebleu.corpus_bleu(hyps, [refs])) # report the signature too
Task name(s): wmt14-en-fr, wmt14-fr-en, wmt16-en-de, wmt16-de-en, wmt16-en-ro, wmt16-ro-en. The harness reproduces the GPT-3 prompt formats and reports the standard metric.
lm_eval --model hf --model_args pretrained=gpt2,dtype=bfloat16 \
--tasks wmt14-en-fr --num_fewshot 0 --batch_size auto --output_path results/Pitfalls
- Use SacreBLEU and report its signature; multi-bleu numbers are 1–2 points different.
- Translation *into* English is much easier for English-centric LLMs; report both directions.
- The test sets are tiny news sets from 2014/2016 — contamination is likely for web-trained models.
References
- WMT16 findingshttps://aclanthology.org/W16-2301/
- SacreBLEUhttps://github.com/mjpost/sacrebleu
- Hugging Face (wmt14)https://huggingface.co/datasets/wmt/wmt14