arXiv:cs.LG· Tianqi Chen, Zhe Li, Weixiang Xu, Zeyu Zhu, Dong Li, Lu Tian, Emad Barsoum, Peisong Wang, Jian Cheng·· 13 小时前
TernaryLLM:面向大语言模型的三值化量化方法
TernaryLLM: Ternarized Large Language Model
AI 导读
研究提出 TernaryLLM,通过可学习缩放与偏移的 Dual Learnable Ternarization(DLT)和 Outlier-Friendly Feature Knowledge Distillation(OFF)解决权重与激活值离群点问题。在 LLaMA-3 上,W1.58A16 配置的困惑度在 C4 上比此前最优的 W2A16 方法低 5.8,零样本任务平均准确率高 8.2%。
正文
Abstract:Large language models (LLMs) have achieved remarkable performance on Natural Language Processing (NLP) tasks, but they are hindered by high computational costs and memory requirements. Ternarization, an extreme form of quantization, offers a solution by reducing memory usage and enabling energy-efficient floating-point additions. However, applying ternarization to LLMs faces challenges stemming from outliers in both weights and activations. In this work, observing asymmetric outliers and non-zero means in weights, we introduce Dual Learnable Ternarization (DLT), which enables both scales and shifts to be learnable. We also propose Outlier-Friendly Feature Knowledge Distillation (OFF) to recover the information lost in extremely low-bit quantization. The proposed OFF can incorporate semantic information and is insensitive to outliers. At the core of OFF is maximizing the mutual information between features in ternarized and floating-point models using cosine similarity. Extensive experiments demonstrate that our TernaryLLM surpasses previous low-bit quantization methods on the standard text generation and zero-shot benchmarks for different LLM families. Specifically, for one of the most powerful open-source models, LLaMA-3, our approach (W1.58A16) outperforms the previous state-of-the-art method (W2A16) by 5.8 in terms of perplexity on C4 and by 8.2% in terms of average accuracy on zero-shot tasks.
| Subjects: | Machine Learning (cs.LG) |
| Cite as: | arXiv:2406.07177 [cs.LG] |
| (or arXiv:2406.07177v2 [cs.LG] for this version) | |
| https://doi.org/10.48550/arXiv.2406.07177 arXiv-issued DOI via DataCite |
|
| Journal reference: | Machine Intelligence Research (2026) |
| Related DOI: | https://doi.org/10.1007/s11633-026-1665-6
DOI(s) linking to related resources |
Submission history
From: Chen Tianqi [view email]
[v1]
Tue, 11 Jun 2024 11:40:12 UTC (674 KB)
[v2]
Fri, 9 Oct 2026 06:58:39 UTC (675 KB)
来源:arXiv:cs.LG · arxiv.org