Spot the failure mode: a tokenizer trained with NFC normalization is deployed with an NFKC preprocessing pipeline.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Click any words you think contain an error. Click again to unmark.
Training on NFC and serving with NFKC is a silent bug: NFKC folds compatibility characters that NFC keeps, so identical-looking text tokenizes to different IDs at inference.
Imagine you learned to read using a textbook where every word was spelled the long way, like 'f-i-r-e'. Then someone hands you a new book where some words use fancy joined-up letters you have never practiced. You can still sound it out, but you stumble, because it does not match how you learned. That is what happens here. The tokenizer was trained with one spelling cleanup rule (NFC) and then handed text cleaned with a stricter rule (NFKC) that rewrites ligatures, shrunk-down characters, and circled numbers. The text looks the same to a person, but the underlying letters differ, so the model stumbles on exactly those characters and nobody sees an error message.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: NFC vs NFKC compatibility step + why training direction matters + silent failure + Japanese/math/PDF hotspots + pin and snapshot fix.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming any two valid Unicode normalization forms are interchangeable; NFKC rewrites compatibility characters that NFC preserves, so token IDs and model behavior diverge silently.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.