TWLA: Achieving Ternary Weights and Low-Bit Activations for LLMs via Post-Training Quantization
作者: Zhixiong Zhao, Zukang Xu, Zhixuan Chen, Xing Hu, Zhe Jiang, Dawei Yang
分类: cs.LG, cs.AI
发布日期: 2026-06-12
💡 一句话要点
提出TWLA框架以实现LLMs的三元权重和低比特激活
🎯 匹配领域: 支柱八:物理动画 (Physics-based Animation) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 后训练量化 三元化 激活量化 大型语言模型 推理加速 模型压缩 深度学习
📋 核心要点
- 现有方法在处理重尾激活分布时表现不佳,导致激活保持高精度,限制了推理加速。
- TWLA框架通过后训练量化实现三元权重和低比特激活,包含E2M-ATQ、KOTMS和ILA-AMP三个核心组件。
- 实验结果表明,TWLA在W1.58A4下保持高精度,同时显著提升推理速度,展示了其有效性。
📝 摘要(中文)
大型语言模型(LLMs)在语言处理能力上表现出色,但其内存和计算成本限制了部署。三元化作为一种有前景的压缩技术,能够显著减少模型大小和推理复杂度。然而,现有方法在处理重尾激活分布时存在困难,导致激活保持高精度,从而限制了端到端推理加速。为了解决这一问题,本文提出了TWLA,一个后训练量化(PTQ)框架,能够实现1.58比特的权重压缩和4比特的激活量化,同时保持高精度。TWLA包括三个组件:E2M-ATQ、KOTMS和ILA-AMP,经过广泛实验验证,TWLA在W1.58A4下保持高精度,同时显著加速推理。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在推理时由于重尾激活分布导致的高精度激活问题,现有方法无法有效压缩激活,限制了推理加速。
核心思路:TWLA框架通过后训练量化实现三元权重和低比特激活,采用多阶段优化和共享旋转策略,旨在减少激活的高精度需求,从而加速推理。
技术框架:TWLA由三个主要模块组成:E2M-ATQ用于权重三元化,KOTMS用于激活分布的重塑,ILA-AMP用于激活量化的精度优化。整体流程包括初始化、优化和量化三个阶段。
关键创新:E2M-ATQ通过欧几里得到流形的优化过程,显著降低了层输出误差;KOTMS通过克罗内克结构的正交旋转,重塑权重分布并抑制激活异常值;ILA-AMP则引入相邻层的二阶交互成本,优化激活量化的分配。
关键设计:在E2M-ATQ中,采用两阶段优化策略,首先进行欧几里得初始化,然后进行流形重定位;KOTMS利用共享旋转来统计抑制激活异常;ILA-AMP则关注层间差异,确保激活量化的均衡性。
🖼️ 关键图片
📊 实验亮点
TWLA在W1.58A4配置下保持高精度,同时实现了显著的推理加速,实验结果显示其在压缩比和推理速度上的提升幅度超过了现有方法,展示了其在实际应用中的优势。
🎯 应用场景
TWLA框架在大型语言模型的部署中具有广泛的应用潜力,尤其是在资源受限的环境中,如移动设备和边缘计算。通过显著降低内存和计算需求,TWLA能够使得高性能的语言模型在更多实际场景中得以应用,推动智能助手、自动翻译等领域的发展。
📄 摘要(原文)
Large language models (LLMs) exhibit exceptional general language processing capabilities, but their memory and compute costs hinder deployment. Ternarization has emerged as a promising compression technique, offering significant reductions in model size and inference complexity. However, existing methods struggle with heavy-tailed activation distributions and therefore keep activations in high precision, fundamentally limiting end-to-end inference acceleration. To overcome this limitation, we propose TWLA, a post-training quantization (PTQ) framework that achieves 1.58-bit weight compression and 4-bit activation quantization while maintaining high accuracy. TWLA comprises three components: (1) Euclidean-to-Manifold Asymmetric Ternary Quantizer (E2M-ATQ) minimizes layer-output error under weight ternarization via a two-stage optimization from Euclidean initialization to manifold relocation; (2) Kronecker Orthogonal Tri-Modal Shaping (KOTMS) applies a Kronecker-structured orthogonal rotation to reshape weights into ternary-friendly tri-modal distributions, while the shared rotation statistically suppresses activation outliers; and (3) Inter-Layer Aware Activation Mixed Precision (ILA-AMP) explicitly introduces adjacent-layer second-order interaction costs in bit allocation and jointly optimizes for the layer-wise disparity of activation quantization gains induced by the shared orthogonal transform, preventing cascades triggered by a few weak layers. Extensive experiments demonstrate that TWLA maintains high accuracy under W1.58A4, while delivering significant inference acceleration. The code is available at <this https URL.