arXiv:2503.04704cs.LGcs.AI2025-03被引 4

提出一种不依赖模型架构与大小的分层熵权量化方法,显著提升压缩效率。

Universality of Layer-Level Entropy-Weighted Quantization Beyond Model Architecture and Size

  • 基于各层熵分布判断可安全量化层,实现跨架构、跨规模的通用量化
  • 在70B模型上降低18%内存使用,保持MMLU精度仅下降0.5%
  • 发现量化反而降低困惑度,暗示精度选择具有正则化效应,适合高效部署场景

我们提出一种新型选择性模型量化方法——熵权量化(EWQ),突破了传统针对特定架构或规模的压缩限制。通过分析Transformer块间的熵分布,EWQ可在不显著影响性能的前提下,确定哪些层可被安全量化,且该方法对模型架构和规模均无依赖。实验表明,相比均匀量化,该方法在1.6B至70B参数模型上均能将内存占用减少最高达18%,同时保持MMLU准确率与未量化模型相差不超过0.5%。令人意外的是,量化后模型困惑度反而下降,说明选择性精度降低可能带来有益的正则化效果。该现象在多种模型族中一致出现,揭示了层级熵与最优精度需求间存在根本关联。此外,我们提出FastEWQ,一种无需加载权重即可快速分析熵分布的方法,利用跨架构与规模下熵分布的普遍特性,在近乎瞬时完成量化决策的同时,仍保持与完整分析80%的分类准确率。结果表明,有效量化策略可独立于具体架构与规模设计,为大模型高效部署开辟新路径。

原文摘要 · Abstract (English)

We present a novel approach to selective model quantization that transcends the limitations of architecture-specific and size-dependent compression methods for Large Language Models (LLMs) using Entropy-Weighted Quantization (EWQ). By analyzing the entropy distribution across transformer blocks, EWQ determines which blocks can be safely quantized without causing significant performance degradation, independent of model architecture or size. Our method outperforms uniform quantization approaches, maintaining Massive Multitask Language Understanding (MMLU) accuracy scores within 0.5% of unquantized models while reducing memory usage by up to 18%. We demonstrate the effectiveness of EWQ across multiple architectures -- from 1.6B to 70B parameters -- and showcase consistent improvements in the quality-compression trade-off regardless of model scale or architectural design. A surprising finding of EWQ is its ability to reduce perplexity compared to unquantized models, suggesting the presence of beneficial regularization through selective precision reduction. This improvement holds across different model families, indicating a fundamental relationship between layer-level entropy and optimal precision requirements. Additionally, we introduce FastEWQ, a rapid method for entropy distribution analysis that eliminates the need for loading model weights. This technique leverages universal characteristics of entropy distribution that persist across various architectures and scales, enabling near-instantaneous quantization decisions while maintaining 80% classification accuracy with full entropy analysis. Our results demonstrate that effective quantization strategies can be developed independently of specific architectural choices or model sizes, opening new possibilities for efficient LLM deployment.

量化大模型熵分析高效部署

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。