用词频规律快速选数据,让模型压缩又快又准
Frequency Matters: Fast Model-Agnostic Data Curation for Pruning and Quantization
- 基于词频分布规律筛选校准数据,不依赖具体模型
- 在多种剪枝任务中表现优于随机采样,效果接近顶尖方法
- 速度比现有方法快240倍,适合大规模模型使用
训练后模型压缩对提升大语言模型的可移植性至关重要,同时保持其性能。尽管已有多种压缩方法,但针对剪枝和量化选择最优校准数据的研究仍不足。校准数据的选择是保持模型内、跨任务能力的关键。本文提出一种无需模型依赖的数据筛选策略ZipCal,通过最大化词汇多样性来匹配齐普夫幂律。实验表明,该方法在多个剪枝基准上优于标准均匀随机采样,且在下游任务性能上与依赖模型困惑度的先进方法相当。后者对大规模模型和数据集成本过高,而ZipCal因具有线性复杂度,平均快约240倍。代码与实验已公开于https://github.com/FrancescoMonaco/ZipCal。
原文摘要 · Abstract (English)
Post-training model compression is essential for enhancing the portability of Large Language Models (LLMs) while preserving their performance. While several compression approaches have been proposed, less emphasis has been placed on selecting the most suitable set of data (the so-called \emph{calibration data}) for finding the compressed model configuration. The choice of calibration data is a critical step in preserving model capabilities both intra- and inter-tasks. In this work, we address the challenge of identifying high-performance calibration sets for both pruning and quantization by analyzing intrinsic data properties rather than model-specific signals. We introduce ZipCal, a model-agnostic data curation strategy that maximizes lexical diversity based on Zipfian power laws. Experiments demonstrate that our method outperforms standard uniform random sampling across various pruning benchmarks. Notably, it also performs on par, in terms of downstream performance, with a state-of-the-art method that relies on model perplexity. The latter becomes prohibitively expensive for large-scale models and datasets, while ZipCal is on average $\sim$240$\times$ faster due to its tractable linear complexity. We make the code and the experiments available at https://github.com/FrancescoMonaco/ZipCal.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。