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

Inside 6+6 MarianMT DA→EN: Beam 1/2/4, Compounds & æ/ø/å 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 58,930-piece SentencePiece segments Danish compound nouns (Speciallægepraksisplanlægningsstabiliseringsperiode, arbejdsløshedsunderstøttelse) and æ/ø/å diacritics, and contrast live Danish→English minimal pairs.

1 · OPUS-MT DA→EN worker (106.87 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 Danish 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 V2 reordering changes relative to Beam 1 (Greedy).

Select a Danish benchmark sentence

Prepare OPUS-MT DA→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 Danish Compound-Noun & æ/ø/å Explorer

Inspect how the 58,930-piece vocabulary segments long Danish fused compounds, preserves æ/ø/å letters, and resolves capitalized vs lowercase proper nouns (Øresundsbroen vs øresundsbroen) — plus live isolated English translations.

Prepare OPUS-MT DA→EN above to tokenize and translate Danish compounds & diacritics.

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

4 · Live Compound, Postnominal Definite, V2 Inversion & æ/ø/å Minimal Pairs

Contrast paired Danish inputs to watch MarianMT unpack fused compounds into English noun phrases, expand postnominal definite suffixes (-et/-en/-ene), restore SVO order from V2 inversion, and resolve æ/ø/å minimal pairs.

Danish 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-da-en → Xenova/opus-mt-da-en (106.87 MB q8 ONNX, Apache-2.0).