179 questions
No questions match those filters.
← All questions
LLM FoundationsMedium· Attention Mechanism· Normalization
What does QK-norm actually do to the attention distribu...
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 plansQK-norm bounds pre-softmax attention logits to O(1/√dk). This prevents the attention mechanism from collapsing into a one-hot distribution over long training durations, which maintains the model’s ability to attend to multiple tokens. The cost of this implementation is two additional RMSNorm calls per attention layer, which is considered negligible compared to the computational cost of the surrounding projections.