用1.6比特压缩大模型词嵌入,不降性能还能提速
CARVQ: Corrective Adaptor with Group Residual Vector Quantization for LLM Embedding Compression
- 设计新型校正适配器+分组残差量化,实现1.6比特压缩
- 在多个主流模型上保持低困惑度和高准确率
- 无需专用硬件,适合内存受限的边缘设备部署
大型语言模型通常依赖大量参数进行词嵌入,导致存储需求和内存占用巨大。尤其在边缘设备上部署时,内存成为瓶颈。通过压缩嵌入层可减少内存占用,释放带宽并加速推理。本文提出CARVQ——一种后训练阶段的新型校正适配器结合分组残差向量量化方法。该方法利用线性与非线性映射组合,模仿原始模型嵌入,实现约1.6比特/参数的压缩,且无需支持低比特存储的专用硬件。我们在LLaMA-3.2-1B、LLaMA-3.2-3B、LLaMA-3.2-3B-Instruct、LLaMA-3.1-8B、Qwen2.5-7B、Qwen2.5-Math-7B和Phi-4等预训练模型上测试,评估生成、判别、数学及推理任务表现。结果显示,在多数情况下,CARVQ相比标量量化能以更低平均比特数/参数保持合理困惑度与准确率。本工作贡献了一种兼容当前先进Transformer量化方法的压缩技术,可无缝集成至支持4比特内存的任何硬件中,显著降低内存受限设备的模型内存占用,推动大模型在边缘端高效部署。
原文摘要 · Abstract (English)
Large Language Models (LLMs) typically rely on a large number of parameters for token embedding, leading to substantial storage requirements and memory footprints. In particular, LLMs deployed on edge devices are memory-bound, and reducing the memory footprint by compressing the embedding layer not only frees up the memory bandwidth but also speeds up inference. To address this, we introduce CARVQ, a post-training novel Corrective Adaptor combined with group Residual Vector Quantization. CARVQ relies on the composition of both linear and non-linear maps and mimics the original model embedding to compress to approximately 1.6 bits without requiring specialized hardware to support lower-bit storage. We test our method on pre-trained LLMs such as LLaMA-3.2-1B, LLaMA-3.2-3B, LLaMA-3.2-3B-Instruct, LLaMA-3.1-8B, Qwen2.5-7B, Qwen2.5-Math-7B and Phi-4, evaluating on common generative, discriminative, math and reasoning tasks. We show that in most cases, CARVQ can achieve lower average bitwidth-per-parameter while maintaining reasonable perplexity and accuracy compared to scalar quantization. Our contributions include a novel compression technique that is compatible with state-of-the-art transformer quantization methods and can be seamlessly integrated into any hardware supporting 4-bit memory to reduce the model's memory footprint in memory-constrained devices. This work demonstrates a crucial step toward the efficient deployment of LLMs on edge devices.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。