Identify the locations where dropout typically sits inside a transformer block
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Three canonical dropout sites: attention weights (post-softmax), FFN output, and residual stream. Norm internals and Q/K/V projections do NOT get dropout.
Think of dropout like a coach who randomly benches a few players every practice so the team can't rely on one star to carry every game. In a transformer block, there are three sensible benches: right after the model decides which earlier words to focus on (so it doesn't get hooked on one specific word-to-word connection), on the output of the per-word processing layer (so each word learns sturdier features), and on the shared bus that carries information between blocks (so no single layer becomes load-bearing). Don't bench players inside the rescaling step itself (that ruins the whole point of stabilizing the signal), and don't bench the players that build the focus scores in the first place (that just adds useless noise). In modern frontier LLMs, dropout is often turned off during pretraining because the data is so vast the model is under-fit anyway.
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.
6 min: name the three canonical sites, explain the regularization role of each, justify why norm internals and Q/K/V projections are excluded, and discuss modern pretraining-vs-fine-tuning practice.
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.
Placing dropout inside the RMSNorm computation. The norm exists to stabilize activation statistics; injecting dropout there defeats its purpose. Same with Q/K/V projections; dropout there destabilizes the attention dot product.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.