Attention

QK-Norm

Normalizes queries and keys right before attention so their dot products can’t blow up.

First page of Query-Key Normalization for TransformersIntroduced inOct 2020Query-Key Normalization for TransformersHenry et al. · arXiv 2010.04245 ↗
QK-Norm: normalize before comparingQ and K are normalized onto the unit circle · only the angle mattersQKq·k = 47.3 · saturatesq·k = 0.8 · stabledot products can’t blow up

QK-Norm applies RMSNorm to the query and key vectors just before they are compared. Without it, query-key dot products can grow so large during training that attention saturates onto a single token and destabilizes the loss. It became standard in recent models (Qwen3+, Gemma) because it lets them train at higher learning rates with almost no extra compute.

Adoption over time

Share of new models that have included QK-Norm ops over time.

43%2022202320242025202643%20222023202420252026

See it in real models

Open any of these on hfviewer to find this block in the interactive architecture graph.

Qwen/Qwen3-0.6B architecture graphQwen/Qwen3-0.6Btext-generation · ↓ 29.9M · ♡ 2kOpen in visualizer Comfy-Org/MiniMax-H3 architecture graphComfy-Org/MiniMax-H3↓ 23.3M · ♡ 2kOpen in visualizer Qwen/Qwen3-4B architecture graphQwen/Qwen3-4Btext-generation · ↓ 11.6M · ♡ 761Open in visualizer Qwen/Qwen3-8B architecture graphQwen/Qwen3-8Btext-generation · ↓ 9.4M · ♡ 2kOpen in visualizer Qwen/Qwen3-Embedding-0.6B architecture graphQwen/Qwen3-Embedding-0.6Bfeature-extraction · ↓ 8.7M · ♡ 1kOpen in visualizer Qwen/Qwen3.5-9B architecture graphQwen/Qwen3.5-9Bimage-text-to-text · ↓ 8.6M · ♡ 2kOpen in visualizer google/gemma-4-31B-it architecture graphgoogle/gemma-4-31B-itimage-text-to-text · ↓ 8.3M · ♡ 4kOpen in visualizer Qwen/Qwen3-14B architecture graphQwen/Qwen3-14Btext-generation · ↓ 7.7M · ♡ 507Open in visualizer Qwen/Qwen3.8-27B architecture graphQwen/Qwen3.8-27Bimage-text-to-text · ↓ 7.5M · ♡ 19kOpen in visualizer Qwen/Qwen3.8-27B-FP8 architecture graphQwen/Qwen3.8-27B-FP8image-text-to-text · ↓ 6.9M · ♡ 846Open in visualizer Qwen/Qwen3-VL-8B-Instruct architecture graphQwen/Qwen3-VL-8B-Instructimage-text-to-text · ↓ 6.6M · ♡ 1kOpen in visualizer zai-org/GLM-5.3-Flash architecture graphzai-org/GLM-5.3-Flashimage-text-to-text · ↓ 6.4M · ♡ 3kOpen in visualizer

View 2,594 catalog matches for QK-Norm →

Related concepts

hfviewer renders the full architecture of 12,800+ Hugging Face models as interactive graphs. Hover any block to see what it does, with this model’s real numbers.

Browse all model graphs →