Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

FPTQuant: Function-Preserving Transforms for LLM Quantization

About

Large language models (LLMs) require substantial compute, and thus energy, at inference time. While quantizing weights and activations is effective at improving efficiency, naive quantization of LLMs can significantly degrade performance due to large magnitude outliers. This paper describes FPTQuant, which introduces three novel, lightweight, and expressive function-preserving transforms (FPTs) to facilitate quantization of transformers: (1) a mergeable pre-RoPE transform for queries and keys, (2) a mergeable transform for values, and (3) a cheap, dynamic per-token scaling transform. By leveraging the equivariances and independencies inherent to canonical transformer operation, we designed these FPTs to maintain the model's function while shaping the intermediate activation distributions to be more quantization friendly. FPTQuant requires no custom kernels and adds virtually no overhead during inference. The FPTs are trained both locally to reduce outliers, and end-to-end such that the outputs of the quantized and full-precision models match. FPTQuant enables static INT4 quantization with minimal overhead and shows SOTA speed-up of up to 3.9X over FP. Empirically, FPTQuant has an excellent accuracy-speed trade-off -- it is performing on par or exceeding most prior work and only shows slightly lower accuracy compared to a method that is up to 29% slower.

Boris van Breugel, Yelysei Bondarenko, Paul Whatmough, Markus Nagel• 2025

Related benchmarks

TaskDatasetResultRank
Language ModelingWikiText-2 (test)--
2416
Language ModelingWikiText-2
Perplexity5.12
205
Language ModelingWikiText
Wikitext PPL10.56
151
Zero-shot Common Sense ReasoningCommon Sense Reasoning
Zero-shot Accuracy62.95
148
Commonsense ReasoningSix commonsense reasoning tasks zero-shot
Average Accuracy (Zero-shot)77.51
99
Zero-shot EvaluationZero-shot Tasks Average--
95
Language ModelingWikiText-2
WikiText-2 Score5.35
86
Zero-shot EvaluationBenchmarks 0-shot
0-shot Average Score69.97
33
Zero-shot Task Performance0-shot6 (test)
Average Accuracy (0-shot6)69.81
18
Massive Multitask Language UnderstandingMMLU
MMLU (5-shot)52.62
11
Showing 10 of 11 rows

Other info

Follow for update