use case · basics · inside 6+6 MarianMT EN→ZH · q8 WASM · 113.11 MB · Apache-2.0
Inside MarianMT EN→ZH: Beam 1 vs 2 vs 4 & Hanzi Sensitivity Lab
Run the same English sentence sequentially through Beam 1 (Greedy),
Beam 2, and Beam 4 on-device with character-level Hanzi diffing,
and probe how MarianMT synthesizes Chinese measure words (量词),
aspect particles (了 / 过), and
formal vs casual register (您 vs 你).
1 · Opus-MT EN→ZH worker (113.11 MB q8 WASM · auto-inits from cache)
2 · Live Beam 1 vs Beam 2 vs Beam 4 Benchmark
Prepare Opus-MT EN→ZH above to compare Beam 1 vs Beam 2 vs Beam 4 live on CPU WASM.
Beam 2 · Hanzi Diff vs Beam 1
Beam 4 · Hanzi Diff vs Beam 1
Measured Decoding Latency & Throughput (Beam 1 / 2 / 4)
3 · Live Hanzi Measure Word, Aspect Particle (了/过) & 您 vs 你 Sensitivity Lab
English omits classifiers, marks tense via verb endings, and uses one pronoun (you).
Run each 3-item sensitivity group live to inspect how MarianMT injects Chinese measure words, aspect
markers (了, 过, 正在), and polite 您 vs casual 你.
—
Prepare Opus-MT EN→ZH above to probe measure words, aspect particles, and 您 vs 你 register live.
| Probe | English prompt | Live Chinese (Hanzi) output | Detected markers | ms |
|---|---|---|---|---|
| Click "Run 3-Probe Sensitivity Group" above to inspect live Hanzi output. | ||||
Real SentencePiece Subwords (MarianTokenizer · 65,001 vocab)
Run a beam comparison above to inspect real SentencePiece subwords and IDs.
Show the code — In-worker Beam 1 vs Beam 2 vs Beam 4 comparison
Show the code — SentencePiece English subword fertility telemetry
Weights: Helsinki-NLP/opus-mt-en-zh → Xenova/opus-mt-en-zh (113.11 MB q8 ONNX),
licensed under Apache-2.0.