use case · basics · inside 6+6 MarianMT IT→EN · q8 WASM · 128.92 MB ONNX · Apache-2.0

Inside 6+6 MarianMT IT→EN: Beam 1/2/4, Length Penalty & Enclitics Lab

Compare Beam 1 (Greedy) vs Beam 2 vs Beam 4 speed-vs-fluency with live length_penalty tuning on the 6+6 MarianMT encoder-decoder, inspect how 80,379-piece SentencePiece segments Italian enclitic pronouns (glielo, dammelo) and elided articles (nell', dell'), and contrast live Italian→English minimal pairs.

1 · OPUS-MT IT→EN worker (128.92 MB q8 ONNX · auto-inits from cache)

2 · Live Beam 1 vs Beam 2 vs Beam 4 & Length Penalty Benchmark

Each beam width runs sequentially in the same WASM worker on your Italian sentence using the chosen length_penalty (0.5 favors compact outputs; 2.0 favors fuller English clauses). Highlighted English tokens in Beam 2 and Beam 4 mark word-choice or reordering changes relative to Beam 1 (Greedy).

Select an Italian benchmark sentence

Prepare OPUS-MT IT→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 Source Subwords (MarianTokenizer)

Run Beam comparison to inspect SentencePiece source subwords.

3 · Live SentencePiece Enclitic Pronouns, Elided Articles & Accents Explorer

Inspect how the 80,379-piece vocabulary tokenizes Italian double enclitics (glielo, dammelo), articulated/elided prepositions (nell'ufficio, dell'università), and accented forms — plus live isolated English translations.

Prepare OPUS-MT IT→EN above to tokenize and translate Italian enclitics & elisions.

Italian word Kind · Morphology gloss Live SentencePiece pieces Live English ms
Click Tokenize & Translate Probes once the model is ready.

4 · Live Enclitic, Pro-Drop, Subjunctive & Lei/tu Minimal Pairs

Contrast paired Italian inputs to watch MarianMT unpack enclitic clusters into English prepositional phrases, recover dropped subject pronouns, and adapt modality across subjunctive vs indicative and formal Lei vs casual tu.

Italian Morphology Minimal Pairs

Linguistic note: —

Select a minimal pair and click Run Morphology Pair Probe once the model is ready.

Variant A

—

Tokens: — · Latency: —

Variant B

—

Tokens: — · Latency: —

Show the code — Off-thread Beam 1 vs Beam 2 vs Beam 4 & length_penalty comparison
Show the code — Deterministic LCS word-diff comparator

Model: Helsinki-NLP/opus-mt-it-en → Xenova/opus-mt-it-en (128.92 MB q8 ONNX, Apache-2.0).