use case · basics · MarianMT decoding, bidi numbers & >>ara<< control-tag ablation · q8 WASM · 117.60 MB

Inside MarianMT EN→AR: Beam Search & Bidi / Control-Tag Ablation

Measure how num_beams (1 vs 2 vs 4) and max_new_tokens reshape Arabic SVO→VSO syntax and latency, then run live paired ablations on bidi mixed numbers & Latin acronyms and >>ara<< vs untagged steering with length and fertility telemetry.

1 · Opus-MT EN→AR worker (117.60 MB q8 WASM · Apache-2.0)

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

Curated English sentences for Arabic decoding comparison

Prepare Opus-MT EN→AR above to compare greedy vs beam-search Arabic decoding live.

Source SentencePiece—
Beam-2 diff vs B1—
Beam-4 diff vs B1—
NaN count—

Beam 1 (Greedy)

—
في انتظار المقارنة…

Beam 2 (2-way)

—
في انتظار المقارنة…

Beam 4 (4-way)

—
في انتظار المقارنة…

Shared Source SentencePiece Subwords

Run Beam comparison to inspect SentencePiece tokens.

3 · Bidi Mixed Numbers, Latin Acronyms & >>ara<< Control-Tag Ablation

Measure how Latin acronyms (HTTPS, TLS 1.3, WASM), decimal figures (33.5%, 117.60 MB), and omitting >>ara<< affect SentencePiece fertility, character expansion, and Arabic lexical fidelity.

Select an ablation probe above to compare Arm A vs Arm B live.
—
في انتظار التجربة…
—
في انتظار التجربة…

Ready to run bidi & control-tag ablation once the model loads.

Arm A tokens · fert.—
Arm B tokens · fert.—
Token delta (B − A)—
Arabic overlap—
Bidi Latin / Digits (B)—
NaN count—

4 · Inspect Beam Comparison & Paired Ablation Code

Show the code — Off-main-thread Beam 1 vs Beam 2 vs Beam 4 pass
Show the code — Paired Bidi & >>ara<< control-tag ablation