Why might a LoRA that passes every eval check then garble one in five prod requests?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A LoRA adapter passes its full eval harness cleanly but garbles output on roughly one in five production requests after deployment. What is the leading suspect, why does it produce intermittent rather than constant breakage, and how do you prevent the class of bug?
Tokenizer mismatch between training and serving. Eval uses the trained tokenizer; prod loaded a drifted version. Requests that touch a drifted special token break; others do not.
Picture two libraries that both speak the same language but use slightly different catalog numbers for some books. You learned to find books by their numbers in one library. Then you try the same numbers at the other library. Most numbers still point to the right book, so most of the time things work fine. But a few numbers now refer to completely different books, and whenever a request happens to need one of those, you grab the wrong thing and the answer comes out scrambled. That is what happens when the model was trained against one tokenizer and the serving system silently loaded a different one: most requests still work, but the ones that touch the drifted tokens come out as nonsense.
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.
5 min: name the suspect, explain why the failure is intermittent and content-dependent, contrast eval visibility versus prod blindness, then walk through the four-step prevention recipe.
| Diagnostic signal | Tokenizer drift | Weight bug | Serving framework bug |
|---|---|---|---|
| Eval harness | Always clean | May surface | Usually surfaces |
| Production breakage rate | Intermittent, content-dependent | Constant or pattern-correlated | Often constant or load-correlated |
| Repro on a single bad prompt | Yes, reliably | Yes | Often non-deterministic |
| Fix surface | Tokenizer artifact + pinning | Retrain or revert weights | Patch serving stack |
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.
Blaming the model weights, the LoRA rank, or the serving framework when the actual bug lives in the tokenizer. The eval harness cannot see the drift because it uses the trained tokenizer.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.