2024-12-23 · 专家 · 机器学习

MixLLM: LLM Quantization with Global Mixed-precision between Output-features and Highly-efficient System Design

MixLLM通过全局混合精度量化输出特征,实现了高精度和高效系统设计,有效压缩了LLMs。

更新于 2024-12-23。作者:Zhen Zheng、Xiaonan Song、Chuanjie Liu。

中文摘要

量化已成为将大型语言模型(LLM)压缩至更小尺寸的最有效方法之一。然而,现有的量化解决方案仍存在不可忽视的精度下降或系统效率低下的局限性。在本文中,我们对一般量化原则及其对精度、内存消耗和系统效率的影响进行了全面分析。我们提出了MixLLM,它探索了基于输出特征混合精度量化的新优化空间,基于不同输出特征在模型中重要性不同的洞察。MixLLM识别出在全局视图下具有高显著性的输出特征,而不是在每一层内部,有效地将更大的位宽分配给最需要它的输出特征,以实现良好的精度并降低内存消耗。我们提出了算法-系统协同设计的量化配置最佳点,从而实现高精度和系统效率。为了解决系统挑战,我们设计了分两步的解量化方案,以便轻松快速地将int8 Tensor Core数据类型进行转换,显著减少解量化的开销,并提出了软件管道,以最佳方式重叠内存访问、解量化和矩阵乘法。大量实验表明,仅增加10%的比特数,PPL的增加可以从SOTA的约0.5降至Llama 3.1 70B的0.2以内,而MMLU-Pro的平均提升超过三个流行模型的SOTA 0.93。除了卓越的精度外,MixLLM还实现了最先进的系统效率。

英文摘要

Quantization has become one of the most effective methodologies to compress LLMs into smaller size. However, the existing quantization solutions still show limitations of either non-negligible accuracy drop or system inefficiency. In this paper, we make a comprehensive analysis of the general quantization principles on their effect to the triangle of accuracy, memory consumption and system efficiency. We propose MixLLM that explores the new optimization space of mixed-precision quantization between output features based on the insight that different output features matter differently in the model. MixLLM identifies the output features with high salience in the global view rather than within each single layer, effectively assigning the larger bit-width to output features that need it most to achieve good accuracy with low memory consumption. We present the sweet spot of quantization configuration of algorithm-system co-design that leads to high accuracy and system efficiency. To address the system challenge, we design the two-step dequantization to make use of the int8 Tensor Core easily and fast data type conversion to reduce dequantization overhead significantly, and present the software pipeline to overlap the memory access, dequantization and the MatMul to the best. Extensive experiments show that with only 10% more bits, the PPL increasement can be reduced from about 0.5 in SOTA to within 0.2 for Llama 3.1 70B, while on average MMLU-Pro improves by 0.93 over the SOTA of three popular models. In addition to its superior accuracy, MixLLM also achieves state-of-the-art system efficiency.

解读

一句话总结

MixLLM通过全局混合精度量化输出特征,实现了高精度和高效系统设计,有效压缩了LLMs。

问题1:这篇论文想要解决什么具体问题?

• 问题背景:LLMs在精度和系统效率之间存在权衡,现有量化方法要么导致精度下降,要么系统效率低下。 • 现有方案不足:现有量化方法要么专注于解决内存消耗问题,导致精度下降;要么提高系统效率,但精度下降较大。 • 研究目标:提出MixLLM,在保证高精度的情况下,提高系统效率。

问题2:论文的核心创新点是什么?

• 技术创新:全局混合精度量化输出特征,根据输出特征的重要性分配不同的位宽。 • 方法改进:全局识别高显著性输出特征,而非层内识别;采用两步反量化以利用int8 Tensor Core,并优化软件流水线。 • 优势:在保证高精度的情况下,提高了系统效率。

问题3:实验结果如何验证了方法的有效性?

• 关键实验:在Wikitext2和C4数据集上评估了困惑度,以及在下游任务上的性能。 • 性能提升:MixLLM在困惑度上优于现有4位量化算法,在MMLU-Pro任务上平均提高了0.93。 • 对比结果:与GPTQ和AWQ相比,MixLLM在困惑度上具有优势;与SmoothQuant和QoQ相比,MixLLM在相同位宽下具有更高的精度。

问题4:这个研究的实际应用价值是什么?

• 应用场景:LLMs的部署和优化。 • 实施建议:采用MixLLM进行LLMs的量化,以提高效率和精度。 • 局限与展望:MixLLM主要针对GPU环境,未来可探索在其他硬件平台上的应用。

来源

机器可读索引:llms.txt