通过训练后扩展模型,用少量新增参数提升4位量化模型性能。
Improving Quantization with Post-Training Model Expansion
- 训练后选择性扩展模型规模,不需重新训练
- 4位量化下相对基准模型降低9%困惑度差距,仅增5%参数
- 适合追求低精度推理效率的模型部署场景
模型规模一直是决定其性能和成本的关键因素。传统训练后优化如量化和剪枝主要致力于压缩预训练模型以降低推理开销,同时保持性能。然而,近期研究提出一种反直觉策略:在训练后适度扩展模型,通过增加规模来提升量化后的模型质量。例如,实现4位权值与激活量化时,常需引入在线哈达玛旋转以缓解不一致性,或对敏感权重保留高精度计算。若无法满足应用需求,通常只能放宽量化约束。本文证明,在量化协同设计空间中,训练后模型扩展是可行且有效的,并提供理论支持。我们展示了可逐步、有选择地扩展预训练大语言模型(如Llama3 1B)的规模,在不进行端到端重训练的情况下提升模型质量。具体而言,在将权重与激活量化至4位时,相比QuaRot和SpinQuant,平均将困惑度差距减少9%,仅增加5%参数量,仍比BF16参考模型减少3.8%总体体积。
原文摘要 · Abstract (English)
The size of a model has been a strong predictor of its quality, as well as its cost. As such, the trade-off between model cost and quality has been well-studied. Post-training optimizations like quantization and pruning have typically focused on reducing the overall volume of pre-trained models to reduce inference costs while maintaining model quality. However, recent advancements have introduced optimization techniques that, interestingly, expand models post-training, increasing model size to improve quality when reducing volume. For instance, to enable 4-bit weight and activation quantization, incoherence processing often necessitates inserting online Hadamard rotations in the compute graph, and preserving highly sensitive weights often calls for additional higher precision computations. However, if application requirements cannot be met, the prevailing solution is to relax quantization constraints. In contrast, we demonstrate post-training model expansion is a viable strategy to improve model quality within a quantization co-design space, and provide theoretical justification. We show it is possible to progressively and selectively expand the size of a pre-trained large language model (LLM) to improve model quality without end-to-end retraining. In particular, when quantizing the weights and activations to 4 bits for Llama3 1B, we reduce the gap to full-precision perplexity by an average of 9% relative to both QuaRot and SpinQuant with only 5% more parameters, which is still a 3.8% reduction in volume relative to a BF16 reference model.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。