atlas

Research map / Architectures and efficiency / Quantization

Optimizing Large Language Model Training Using FP4 Quantization

ICML 2025 · Architectures and efficiency › Quantization · approach: Ultra-low-bit LLM quantization · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes the first FP4 (E2M1) pretraining framework for LLMs, combining a differentiable gradient estimator for weights and outlier clamping-and-compensation for activations, simulated on H100 FP8 tensor cores and evaluated on LLaMA models up to 13B trained on 100B tokens.

Problem

Training LLMs in 4-bit floating point is hard because of large quantization errors, a limited dynamic range, and activation outliers; no prior FP4 pretraining framework for LLMs existed.

Approach

Replace the straight-through estimator in the backward pass with a differentiable gradient estimator (DGE) derived from a smooth power-based approximation of the E2M1 quantizer, and handle activation outliers by quantile clamping plus a sparse high-precision compensation matrix, combined with vector-wise scaling and mixed-precision training.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train with FP4 instead of BF16LLaMA 2 1.3B · DCLM, 100B tokenstraining loss: 2.49 -> 2.55Hurt
Train with FP4 instead of BF16LLaMA 2 7B · DCLM, 100B tokenstraining loss: 2.07 -> 2.17Hurt
Train with FP4 instead of BF16LLaMA 2 13B · DCLM, 100B tokenstraining loss: 1.88 -> 1.97Hurt
Train with FP4 instead of BF16LLaMA 2 models · Zero-shot average, 1.3B / 7B / 13Baccuracy: 53.23 -> 53.13; 53.87 -> 54.42; 54.44 -> 54.95Mixed
Train with FP4 instead of BF16LLaMA 2 models · Perplexity average, 1.3B / 7B / 13Bperplexity: 37.38 -> 36.86; 35.06 -> 35.62; 33.69 -> 33.99Mixed
Add activation clamping (ablation)FP4 activation quantization · LLaMA 1.3B activation tensors, 30,000 iterationscosine similarity: 92.19% -> 98.83%Helped
Add sparse outlier compensation after clamping (ablation)FP4 activation quantization · LLaMA 1.3B activation tensors, quantile 99.9cosine similarity: 98.83% -> 99.61%Helped
Lower compensation quantile from 99.9 to 99 (ablation)FP4 activation quantization · LLaMA 1.3B activation tensorscosine similarity: 99.61% -> 100%Helped
Lower compensation quantile from 99.9 to 97 (ablation)FP4 activation quantization · LLaMA 1.3B activation tensorscosine similarity: 99.61% -> 100%Helped
Use DGE for weight-only 4-bit quantization instead of direct quantization (ablation)W4A8 training · LLaMA 1.3B, DCLM subset, 10B tokenstraining lossHelped
Use direct FP4 activation quantization without OCC (ablation)W8A4 training · LLaMA 1.3B, DCLM subset, 10B tokenstraining lossHurt
Add OCC to FP4 activation quantization (ablation)W8A4 training · LLaMA 1.3B, DCLM subset, 10B tokenstraining lossHelped

Surprising findings

Limitations

Experimental setup

Datasets: DCLM

Benchmarks: Arc-C Arc-E BoolQ HellaSwag LogiQA PiQA SciQ OpenbookQA Lambada Pile 10k Wikitext

Metrics: training loss zero-shot accuracy perplexity cosine similarity MSE SNR

Baselines: BF16 mixed-precision training MS-AMP FP8 Transformer Engine FP8 directly-casted W4A4 FP4

Builds on: Straight-Through Estimator MS-AMP Transformer Engine FP8 LLaMA 2

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy