use case · basics · inside MarianMT RU→EN · q8 WASM · 110.56 MB · CC-BY-4.0

Inside MarianMT RU→EN: Beam 1 vs 2 vs 4, ё/е & Case Word-Order Lab

Probe how MarianMT decodes Russian in-browser: compare Beam 1 (Greedy) vs Beam 2 vs Beam 4 side-by-side with live word diffs and latency charts, then test ё vs е minimal pairs and SVO vs OVS grammatical case word order live on CPU WebAssembly.

1 · Opus-MT RU→EN worker (110.56 MB q8 WASM · auto-inits from cache)

2 · Live Side-by-Side Beam 1 vs Beam 2 vs Beam 4 Word-Diff

Each beam width runs sequentially in the same WASM worker on your exact Russian text. Highlighted English tokens in Beam 2 and Beam 4 mark phrasing differences relative to Beam 1 (Greedy).

Select a Russian test sentence

Prepare Opus-MT RU→EN above to run live Beam 1 vs Beam 2 vs Beam 4 decoding.

Beam 1 (Greedy baseline)

—

Latency: — · Tokens: —

Beam 2 (diff vs Beam 1)

—

Latency: — · Overlap: —

Beam 4 (diff vs Beam 1)

—

Latency: — · Overlap: —

Measured Beam Search Latency & Throughput (CPU WASM)

Real SentencePiece Cyrillic Subwords (MarianTokenizer)

Run Beam comparison to inspect SentencePiece Cyrillic subwords.

3 · Live ё vs е Diacritic Minimal-Pair Ablation

In Russian orthography, ё is often written as е in everyday print. Test how explicit ё vs unmarked е shifts MarianMT's English output on minimal pairs.

Minimal-pair probes (with ё vs with е)

Linguistic note: —

Select a minimal pair and click Run Live ё vs е Comparison once the model is ready.

Variant A · With explicit ё

—

Tokens: — · Latency: —

Variant B · With е (ё omitted)

—

Tokens: — · Latency: —

4 · Live Free Word-Order Ablation (SVO vs OVS Grammatical Cases)

Russian encodes subject vs object via nominal case endings rather than strict word order. Swap Subject-Verb-Object (SVO) to Object-Verb-Subject (OVS) using identical Russian words and watch MarianMT preserve who acts on whom.

Case word-order probes (SVO vs OVS)

Case grammar note: —

Click Run Live SVO vs OVS Comparison once the model is ready.

Canonical SVO Order

—

Tokens: — · Latency: —

Topicalized OVS Order (same case endings)

—

Tokens: — · Latency: —

Show the code — Off-thread Beam 1 vs Beam 2 vs Beam 4 comparison

Model: Helsinki-NLP/opus-mt-ru-en → Xenova/opus-mt-ru-en (110.56 MB q8 ONNX, CC-BY-4.0).