arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.03267cs.LGcs.AI
收藏

PT²-LLM:大语言模型的后训练三元化

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

Shanghai Jiao Tong University(上海交通大学);ETH Zürich(苏黎世联邦理工学院);Tencent Hunyuan(腾讯文言)

Xianglong Yan, Chengzhu Bao, Zhiteng Li, Tianao Zhang, Kaicheng Yang, Haotong Qin, Ruobing Xie, Xingwu Sun, Yulun Zhang

AI总结:

PT²-LLM通过后训练三元化技术,在降低内存成本的同时提升大语言模型的推理速度和效率。

摘要:

大语言模型(LLMs)在多样任务上展现了令人印象深刻的能力,但其庞大的内存和计算需求限制了部署。三元化作为一种有前途的压缩技术,能够提供显著的尺寸减少和高计算效率。然而,在后训练量化(PTQ)设置中,其潜力仍未被充分探索,原因在于训练免费的参数优化挑战以及异常值和分散权重带来的量化难度。为了解决这些问题,我们提出了PT²-LLM,一种专为LLMs设计的后训练三元化框架。其核心是一个不对称三元量化器,配备了两阶段细化流程:(1)迭代三元拟合(ITF),通过交替最优三元网格构造和灵活的舍入来最小化量化误差;(2)激活感知网格对齐(AGA),进一步细化三元网格以更好地匹配全精度输出。此外,我们提出了一种插拔式的结构相似性基于重排(SSR)策略,利用列间结构相似性来减轻量化难度并缓解异常值影响,进一步提升整体性能。广泛的实验表明,PT²-LLM在内存成本更低的情况下,与最先进的(SOTA)2位PTQ方法具有竞争性的性能,同时加速了prefill和解码过程,实现了端到端的速度提升。代码和模型将在https://github.com/XIANGLONGYAN/PT2-LLM上提供。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑