arXiv:2510.03267cs.LGcs.AI2025-10中稿 · ICLR被引 2

提出一种无需训练的三值化方法,显著压缩大模型体积并加速推理。

PT$^2$-LLM: Post-Training Ternarization for Large Language Models

  • 设计两阶段优化框架,动态调整三值量化网格以降低误差。
  • 在多个基准上实现媲美顶尖2比特方法的性能,内存占用更低。
  • 适合追求高效部署的大模型应用,如边缘设备或实时服务。

大型语言模型(LLMs)在多种任务中表现优异,但其巨大的内存和计算需求限制了实际部署。三值化作为一种有前景的压缩技术,可实现显著的模型缩小与高计算效率。然而,由于免训练参数优化困难以及异常值和分散权重带来的量化挑战,其在后训练量化(PTQ)场景中的潜力尚未被充分探索。为此,我们提出 PT²-LLM,一种专为 LLMs 设计的后训练三值化框架。核心是一个带有两阶段精炼流水线的非对称三值量化器:(1) 迭代三值拟合(ITF),通过交替构建最优三值网格与灵活舍入来最小化量化误差;(2) 激活感知网格对齐(AGA),进一步优化三值网格以更匹配全精度输出。此外,我们提出一种即插即用的基于结构相似性的重排策略(SSR),利用列间结构相似性缓解量化难度与异常值影响,提升整体性能。大量实验表明,PT²-LLM 在内存开销更低的情况下,性能可媲美当前最优的2比特后训练量化方法,并同时加速预填充与解码过程,实现端到端提速。代码与模型将公开于 https://github.com/XIANGLONGYAN/PT2-LLM。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have shown impressive capabilities across diverse tasks, but their large memory and compute demands hinder deployment. Ternarization has gained attention as a promising compression technique, delivering substantial size reduction and high computational efficiency. However, its potential in the post-training quantization (PTQ) setting remains underexplored, due to the challenge of training-free parameter optimization and the quantization difficulty posed by outliers and dispersed weights. To address these issues, we propose PT$^2$-LLM, a post-training ternarization framework tailored for LLMs. At its core is an Asymmetric Ternary Quantizer equipped with a two-stage refinement pipeline: (1) Iterative Ternary Fitting (ITF), which alternates between optimal ternary grid construction and flexible rounding to minimize quantization error, and (2) Activation-aware Grid Alignment (AGA), which further refines the ternary grid to better match full-precision outputs. In addition, we propose a plug-and-play Structural Similarity-based Reordering (SSR) strategy that leverages inter-column structural similarity to ease quantization and mitigate outlier effects, further enhancing overall performance. Extensive experiments demonstrate that PT$^2$-LLM delivers competitive performance against state-of-the-art (SOTA) 2-bit PTQ methods with lower memory cost, while also accelerating both prefill and decoding to achieve end-to-end speedup. The code and models will be available at https://github.com/XIANGLONGYAN/PT2-LLM.

大模型压缩三值化后训练量化推理加速

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