How does byte-level BPE guarantee no unknown tokens, and what is the cost of that guarantee?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Byte-level BPE seeds its vocabulary with all 256 byte values, so any UTF-8 string is representable and never emits [UNK]: but rare scripts fall back to long byte sequences.
Imagine a set of alphabet stamps with one stamp for every possible ink dot, all 256 of them. Because every picture is just dots, you can stamp out absolutely any image, even one you have never seen, by placing dots one at a time. You will never be stuck saying 'I don't have a stamp for that'. Byte-level tokenizers work the same way. Every piece of text is ultimately bytes, and the tokenizer keeps a stamp for all 256 of them. So it can spell out any text on Earth and never hits an unknown. The catch: for rare languages it has no shortcut stamps, so it places dots one by one, and the result is a very long, slow to write sequence.
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.
2 min: 256-byte base + every UTF-8 string representable + no [UNK] + byte fallback cost + non-Latin sequence-length and fairness slope.
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.
Believing byte fallback means no cost. The OOV problem is gone, but rare scripts pay for it in long token sequences and a shrunken context budget.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.