arXiv:2506.23025cs.LGcs.AI2025-06被引 1

用三值量化降低大模型内存占用,提升推理速度。

Spectra 1.1: Scaling Laws and Efficient Inference for Ternary Language Models

  • 通过三值量化结合训练感知,大幅减少模型内存需求。
  • 在1.2万亿词数据上训练的Spectra-1.1模型,数据量越大性能越优。
  • 新打包方案与GPU核使推理速度最高提升5倍,适合资源受限场景。

大型语言模型在科研与工业应用中日益普及,但其推理效率仍是关键挑战。随着现代GPU算力持续提升,内存带宽和容量未同步增长,成为推理瓶颈。为此,我们研究了采用量化感知训练的三值语言模型(TriLM),显著降低内存需求。通过规模定律分析发现,TriLM在增加训练数据时比扩大参数量更受益。基于此,我们推出Spectra-1.1,一个在最多1.2万亿词数据上训练的开放三值模型系列,展现持续的性能提升。此外,我们提出2比特与1.6比特的三值权重打包方案,在多种CPU架构上实现加速推理;并基于2比特打包开发了名为TriRun的GPU内核,相比浮点基线实现最高5倍的端到端推理加速。为促进三值模型研究,我们将开源Spectra-1.1及TriRun推理内核。本工作为高效大模型构建与部署奠定基础,提供宝贵研究资源。

原文摘要 · Abstract (English)

Large language models (LLMs) are increasingly used across research and industry applications, yet their inference efficiency remains a significant challenge. As the computational power of modern GPU architectures continuously improves, their memory bandwidth and capacity have not scaled proportionally, creating a critical bottleneck during inference. To address this, we investigate ternary language models (TriLMs) that employ quantization-aware training to significantly reduce memory requirements. We first analyze the scalability of TriLMs by conducting a scaling law analysis, revealing that TriLMs benefit more from increasing training data than from scaling model parameters. Based on this observation, we introduce Spectra-1.1, an open suite of TriLMs trained on up to 1.2 trillion tokens, demonstrating sustained performance gains at scale. Furthermore, to improve inference efficiency, we propose novel 2-bit and 1.6-bit packing schemes for ternary weights, which demonstrate accelerated inference across various CPU architectures. Also, building on the 2-bit packing, we develop a GPU kernel called TriRun that accelerates end-to-end model inference by up to 5 times compared to floating-point baselines. To encourage further exploration and development of TriLMs, we will release the Spectra-1.1 suite and TriRun inference kernels. Overall, our work lays the foundation for building and deploying efficient LLMs, providing a valuable resource for the research community.

三值量化推理加速高效模型GPU优化

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