Blogs / What Soft Capping Is and Where Gemma 2 Uses It

What Soft Capping Is and Where Gemma 2 Uses It

What a Hugging Face post says soft capping is and where Gemma 2 employs it.

  • Learning
  • 1 min read

For: Learners who know what a model's output scores are.

What soft capping is

Soft capping is a technique that prevents logits from growing excessively large without truncating them.[1]

Where Gemma 2 uses it

Gemma 2 employs soft capping for the final layer and for every attention layer.[1]

Logits that growexcessively largea problem the techniqueaddressesSoft cappingprevents this withouttruncating themGemma 2employs it for the finallayer and every attentionlayerpreventsemploys
What does soft capping do?

Sources

  1. Welcome Gemma 2 - Google's new open LLM (huggingface.co · checked )

More articles