arXiv:2506.19697cs.LGcs.AI2025-06ACL被引 13

通过训练策略预防量化异常,实现大模型4比特高效部署。

Outlier-Safe Pre-Training for Robust 4-Bit Quantization of Large Language Models

  • 提出OSP训练方法,从源头避免激活值异常产生
  • 1.4B模型在万亿级数据上训练,4比特量化后平均得分35.7
  • 适合追求低精度部署效率的AI工程师与研究者

大型语言模型(LLMs)中的极端激活值异常严重降低量化性能,阻碍其在设备端的高效部署。尽管通道级操作和自适应梯度缩放被认定为成因,但实际缓解仍具挑战。本文提出异常安全预训练(OSP),一种主动防止异常产生的实用方案,而非依赖事后修正。OSP结合三项创新:(1) Muon优化器,消除特权基底同时保持训练效率;(2) 单尺度RMSNorm,抑制通道级放大;(3) 可学习嵌入投影,重分布源自嵌入矩阵的激活幅度。我们在1万亿个标记上训练了一个14亿参数模型,这是首个无异常的生产级大规模语言模型。在激进的4比特量化下,该模型在10个基准测试中平均得分为35.7(对比Adam训练模型的26.5),仅增加2%训练开销。显著地,OSP模型的超额峰度接近零(0.04),远低于标准模型的极端值(1818.56),从根本上改变了大模型量化行为。本工作表明,异常并非大模型固有属性,而是训练策略的结果,为更高效的模型部署铺平道路。源代码与预训练权重已公开于https://github.com/dmis-lab/Outlier-Safe-Pre-Training。

原文摘要 · Abstract (English)

Extreme activation outliers in Large Language Models (LLMs) critically degrade quantization performance, hindering efficient on-device deployment. While channel-wise operations and adaptive gradient scaling are recognized causes, practical mitigation remains challenging. We introduce Outlier-Safe Pre-Training (OSP), a practical guideline that proactively prevents outlier formation rather than relying on post-hoc mitigation. OSP combines three key innovations: (1) the Muon optimizer, eliminating privileged bases while maintaining training efficiency; (2) Single-Scale RMSNorm, preventing channel-wise amplification; and (3) a learnable embedding projection, redistributing activation magnitudes originating from embedding matrices. We validate OSP by training a 1.4B-parameter model on 1 trillion tokens, which is the first production-scale LLM trained without such outliers. Under aggressive 4-bit quantization, our OSP model achieves a 35.7 average score across 10 benchmarks (compared to 26.5 for an Adam-trained model), with only a 2% training overhead. Remarkably, OSP models exhibit near-zero excess kurtosis (0.04) compared to extreme values (1818.56) in standard models, fundamentally altering LLM quantization behavior. Our work demonstrates that outliers are not inherent to LLMs but are consequences of training strategies, paving the way for more efficient LLM deployment. The source code and pretrained checkpoints are available at https://github.com/dmis-lab/Outlier-Safe-Pre-Training.

量化大模型训练优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。