Basics · Target-Tag Steering (>>fr<< vs >>es<< vs >>it<< vs >>pt<< vs >>ro<<) · Missing-Tag Ablation · Apache-2.0
Inside Target-Tag Steering: Control Tokens, Ablation & Cognate Fertility
Xenova/opus-mt-en-ROMANCE (113.11 MB WASM q8, Apache-2.0) has no
separate language-head switch. Instead, its 65,001-piece SentencePiece vocabulary embeds
control tokens like >>fr<< (#14), >>es<< (#16),
>>it<< (#41), >>pt<< (#45), and
>>ro<< (#54) directly in the encoder input. Compare all five tags,
an extended Romance tag, and an untagged ablation side by side.
1. Target-Tag Steering vs Missing-Tag Ablation
Choose an English test probe or write your own sentence to inspect tag steering and ablation:
Compare how valid >>lang<< control tokens steer one shared decoder while omitting the tag collapses target selection.
Total ablation time–
Beam width1
Highest fertility target–
Missing-tag behaviour–
NaN check–
Target-tag steering matrix across FR, ES, IT, PT, RO, extended tag, and untagged ablation
Target
Prefix Tag & SP ID
Live MarianMT Output
Out Pieces / Fertility
Latency
Initialise OPUS-MT EN→Romance above to run the tag-steering ablation.
Inspect the exact SentencePiece subword segmentation of the output or
tagged input for any row in the matrix above, including the leading control
token ID.
Control tag (>>lang<<) Word start (▁) Subword piece (+)
Token breakdown will appear after the ablation finishes.
Encoder Input Pieces (with Control Tag)
Waiting for live ablation…
Decoded Output Pieces
Waiting for live ablation…
3. Inspect Tag-Prepending & Ablation Worker Code
Show the code — romance-core.mjs buildTaggedInput() inline control-tag prependingShow the code — worker.js ablateTags() 5-target + missing-tag ablation passShow the code — worker.js tokenizeSentencePiece() live SentencePiece ID lookup