use case · basics · inside 6+6 MarianMT EN→FR · q8 WASM · 107.47 MB · Apache-2.0

Inside 6+6 MarianMT EN→FR: Beam 1/2/4 & vous/tu + Subjunctive Lab

Compare Beam 1 (Greedy) vs Beam 2 vs Beam 4 speed-vs-fluency side-by-side on the same 6+6 MarianMT encoder-decoder, then probe how English politeness and modal triggers steer French vous vs tu register and subjunctive agreement.

1 · OPUS-MT EN→FR worker (107.47 MB q8 WASM · auto-inits from cache)

2 · Live Beam 1 vs Beam 2 vs Beam 4 Speed-vs-Fluency Benchmark

Each beam width runs sequentially in the same WASM worker on your English sentence. Highlighted French tokens in Beam 2 and Beam 4 mark lexical or agreement changes relative to Beam 1 (Greedy).

Select an English benchmark sentence

Prepare OPUS-MT EN→FR 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 Formal (vous) vs Informal (tu) Register & Subjunctive Agreement Lab

English has a single you and almost no subjunctive morphology. Contrast paired English inputs to observe how OPUS-MT EN→FR chooses vous vs tu pronouns and switches between indicative and French subjunctive forms (il faut que… soit / fasse).

Register & Subjunctive Minimal Pairs

Linguistic note: —

Select a minimal pair and click Run Live Register & Subjunctive Comparison 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 comparison
Show the code — Deterministic LCS word-diff comparator

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