Skip to content
Query Feedz
  • News
  • Business
    • Digital Marketing
      • Marketing & Sales
      • SEO
      • Content Marketing
      • AEO and GEO
    • Startups
      • Founder Stories
      • Funding & VC
      • Product & Growth
    • Money
      • Investing
      • Markets & Economy
      • Saving & Budgeting
  • AI & Technology
    • Technology
      • Consumer Tech
      • CRM
      • Cyber Security
      • Software Engineering
      • WordPress
      • Hardware
    • Artificial IntelligenceAI Glossary
      • LLMs
      • Machine Learning
      • AI Fundamentals
      • Generative AI
      • Deep Learning
    • AI Use Cases
      • Automation
      • Content
      • Customer Support
      • Finance
      • Marketing
      • View All
  • Tools & Software
  • Account
    • Submit Guest Post
    • Submit a tool
    • My listing
  • Contact
QueryFeedz
  • News
  • Business
    • Digital Marketing
      • Marketing & Sales
      • SEO
      • Content Marketing
      • AEO and GEO
    • Startups
      • Founder Stories
      • Funding & VC
      • Product & Growth
    • Money
      • Investing
      • Markets & Economy
      • Saving & Budgeting
  • AI & Technology
    • Technology
      • Consumer Tech
      • CRM
      • Cyber Security
      • Software Engineering
      • WordPress
      • Hardware
    • Artificial IntelligenceAI Glossary
      • LLMs
      • Machine Learning
      • AI Fundamentals
      • Generative AI
      • Deep Learning
    • AI Use Cases
      • Automation
      • Content
      • Customer Support
      • Finance
      • Marketing
      • View All
  • Tools & Software
  • Account
    • Submit Guest Post
    • Submit a tool
    • My listing
  • Contact
QueryFeedz
  1. Home /
  2. AI Glossaries /
  3. LLMs /
  4. What is Gradient Clipping?
LLMs

What is Gradient Clipping?

Updated September 26, 2026 Read 3 min

Gradient clipping limits how large gradients can be before they update a model's weights. It prevents exploding gradients and the sudden loss spikes that can destabilise or ruin a training run.

Contents 11
  1. 01Key takeaways
  2. 02Gradient clipping explained in simple terms
  3. 03Clipping by norm vs by value
  4. 04A worked example
  5. 05Why exploding gradients happen
  6. 06Typical settings
  7. 07Where it fits in training
  8. 08Limitations
  9. 09Common Use Cases
  10. 10Frequently Asked Questions
  11. 11Related Terms

Gradient clipping limits how large gradients can become before they are used to update a model’s weights. If the gradients in a step exceed a threshold, they are scaled down. This prevents exploding gradients, where one unusual batch produces an enormous update that destabilises or destroys a training run. It is standard practice in LLM training.

Key takeaways

  • Clipping by global norm is the most common method, with a threshold often set to 1.0.
  • It caps the size of updates without changing their direction.
  • It protects long, expensive training runs from single bad batches.
  • It addresses exploding gradients, not vanishing gradients.
  • Frequent clipping can signal other problems, such as too high a learning rate.

Gradient clipping explained in simple terms

Think of a speed limiter on a truck. It does not change the direction of travel, only the maximum speed. Without it, one steep downhill stretch could send the truck out of control. Gradient clipping is the limiter: no matter how extreme one batch is, the update stays within a safe size.

Clipping by norm vs by value

MethodWhat it doesEffect
Clip by global normComputes the overall gradient magnitude across all parameters and scales everything down if it exceeds the thresholdPreserves direction; standard for LLMs
Clip by valueCaps each individual gradient element at a maximumSimpler, but can distort the update direction

A worked example

Suppose the clipping threshold is 1.0 and a step produces a global gradient norm of 4.0.

  • Scaling factor: 1.0 ÷ 4.0 = 0.25.
  • Every gradient is multiplied by 0.25, giving a new norm of exactly 1.0.
  • The direction of the update is unchanged; only its size is reduced.

If another step has a norm of 0.6, it is below the threshold and passes through untouched.

Why exploding gradients happen

  • Unusual or corrupted training examples.
  • Very deep networks multiplying signals across many layers.
  • Recurrent models multiplying through many time steps.
  • Learning rates that are too high.
  • Numerical issues in low-precision training.

In large LLM runs, a single loss spike can undo hours of progress, so teams combine clipping with warmup, careful initialisation and monitoring, and sometimes restart from an earlier checkpoint when spikes occur.

Typical settings

  • Threshold 1.0: the common default for transformer training.
  • 0.5: used when training is unstable.
  • 5.0 or higher: a loose safety net that rarely triggers.

Monitoring the gradient norm over time is useful. If clipping happens on almost every step, the learning rate is probably too high or the data contains problems. If it never happens, the threshold may be too loose to protect anything.

Where it fits in training

Clipping is applied after backpropagation computes gradients and after gradient accumulation averages them, but before the optimiser step. In mixed-precision training, gradients are unscaled first so the threshold applies to true values.

Limitations

  • Does not help with vanishing gradients.
  • Can mask deeper problems with data or hyperparameters.
  • Too aggressive clipping slows learning.
  • Adds a small computational cost each step.

Common Use Cases

01

LLM pretraining

Protect long runs from loss spikes caused by unusual batches.

02

Recurrent model training

Prevent exploding gradients in RNNs and LSTMs.

03

Fine-tuning stability

Keep updates controlled when adapting large models.

04

Mixed-precision training

Guard against numerical instability at lower precision.

05

Training diagnostics

Monitor gradient norms to spot data or learning rate problems.

06

Reinforcement learning

Stabilise updates in RLHF and related training.

Frequently Asked Questions

Limiting the size of gradients before a weight update, to prevent exploding gradients and unstable training.

A global norm of 1.0 is a common default for transformer training.

Clipping by norm scales all gradients together and preserves direction. Clipping by value caps each element and can change direction.

No. It only limits large gradients. Vanishing gradients need architectural fixes such as residual connections and suitable activations.

Often yes. It can indicate the learning rate is too high or the data contains problematic examples.

Related Terms

  • Gradient Descent
  • Backpropagation
  • Learning Rate
  • Gradient Accumulation
  • Model Checkpoint
  • Pretraining

Related AI Terms

What is an Attention Head?An attention head is a single attention unit inside a transformer layer, with its own query, key and…What is Prefix Tuning?Prefix tuning is a parameter-efficient fine-tuning method that learns trainable vectors inserted into the attention keys and values…What is an Attention Mechanism?An attention mechanism is a technique that lets a neural network focus on the most relevant parts of…What is Self-Attention?Self-attention is a mechanism where each position in a sequence attends to every other position in the same…What is Multi-Head Attention?Multi-head attention runs several attention operations in parallel, each with its own learned projections, so a model can…What is RoPE (Rotary Positional Embedding)?RoPE (rotary positional embedding) encodes a token's position by rotating its query and key vectors by an angle…

Contents

  1. 01Key takeaways
  2. 02Gradient clipping explained in simple terms
  3. 03Clipping by norm vs by value
  4. 04A worked example
  5. 05Why exploding gradients happen
  6. 06Typical settings
  7. 07Where it fits in training
  8. 08Limitations
  9. 09Common Use Cases
  10. 10Frequently Asked Questions
  11. 11Related Terms

AI Topic

  • LLMs

Related Terms

  • What is an Attention Head?
  • What is Prefix Tuning?
  • What is an Attention Mechanism?
  • What is Self-Attention?
  • What is Multi-Head Attention?
  • What is RoPE (Rotary Positional Embedding)?

Quick Navigation

  • Common Use Cases
  • Frequently Asked Questions
  • Related Terms
  • Back to top

Details

Updated
September 26, 2026
Read
3 min
  • Forum
  • Submit a tool
  • Submit Guest Post
  • List Your Startup
  • Privacy Policy
  • Editorial Policy
  • Account
  • Contact
  • AI Productivity
  • AI Video
  • AI Coding
  • AI Chatbots
  • Sales
  • AI Business
  • View All Tools

Subscribe our Newsletter

Get weekly exclusive content - No spam.

Copyright © 2026 -  Query Feedz

Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}