179 questions
No questions match those filters.
← All questions
LLM FoundationsMedium· Transformer Architecture· Normalization· Training Stability
Where does the LayerNorm go in a modern transformer blo...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansIn modern transformer architectures, LayerNorm is placed before the sub-block, a configuration known as pre-norm. This approach is preferred because it maintains the residual stream as a clean gradient highway. By ensuring the gradient does not have to pass through the normalization layer at every step, it avoids the instability issues associated with post-norm architectures, effectively removing the requirement for complex warmup schedules during training.