Norms & blocks

Logit softcapping

Squashes attention or output logits through a scaled tanh so no single value can run away.

First page of Gemma 2: Improving Open Language Models at a Practical SizePopularized inJul 2024Gemma 2: Improving Open Language Models at a Practical SizeGemma Team, Google · arXiv 2408.00118 ↗
Logit softcapping: nothing runs awaylogits pass through a scaled tanh · big values level off below a fixed capraw logitstanhcapped

Softcapping bounds logits to a fixed range by passing them through tanh scaled by a cap value. Gemma-2 popularized it for both attention scores and final output logits as a training stabilizer. Extreme logits otherwise cause saturation and loss spikes. Newer models often replace it with QK-Norm, but you will still find it in several current architectures.

Adoption over time

Share of new models that have included logit softcapping over time.

2%202220232024202520262%20222023202420252026

See it in real models

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

google/gemma-4-31B-it architecture graphgoogle/gemma-4-31B-itimage-text-to-text · ↓ 8.3M · ♡ 4kOpen in visualizer google/gemma-4-26B-A4B-it architecture graphgoogle/gemma-4-26B-A4B-itimage-text-to-text · ↓ 6.0M · ♡ 2kOpen in visualizer google/gemma-4-12B-it architecture graphgoogle/gemma-4-12B-itany-to-any · ↓ 1.7M · ♡ 2kOpen in visualizer meta-models/Muse-Glimmer-30B architecture graphmeta-models/Muse-Glimmer-30Bimage-text-to-text · ↓ 282k · ♡ 2kOpen in visualizer RedHatAI/Muse-Glimmer-30B-FP8-block architecture graphRedHatAI/Muse-Glimmer-30B-FP8-blockimage-text-to-text · ↓ 46k · ♡ 12Open in visualizer nvidia/Muse-Glimmer-30B-NVFP4 architecture graphnvidia/Muse-Glimmer-30B-NVFP4image-text-to-text · ↓ 25k · ♡ 15Open in visualizer RadixArk/Muse-Glimmer-NVFP4 architecture graphRadixArk/Muse-Glimmer-NVFP4image-text-to-text · ↓ 23k · ♡ 9Open in visualizer mlx-community/Inkling-2-Mini-oQ4e-mtp architecture graphmlx-community/Inkling-2-Mini-oQ4e-mtpimage-text-to-text · ↓ 11k · ♡ 32Open in visualizer RedHatAI/Muse-Glimmer-30B-INT4 architecture graphRedHatAI/Muse-Glimmer-30B-INT4image-text-to-text · ↓ 10k · ♡ 8Open in visualizer RedHatAI/Muse-Glimmer-30B-W4A16 architecture graphRedHatAI/Muse-Glimmer-30B-W4A16image-text-to-text · ↓ 10k · ♡ 8Open in visualizer AtomicChat/Inkling-2-Mini-Uncensored-GGUF architecture graphAtomicChat/Inkling-2-Mini-Uncensored-GGUFimage-text-to-text · ↓ 10k · ♡ 256Open in visualizer Zyphra/ZONOS3-Mini architecture graphZyphra/ZONOS3-Minitext-to-speech · ↓ 9k · ♡ 223Open in visualizer

View 47 catalog matches for Logit softcapping →

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 →