arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2104.09987stat.MLcs.AIcs.LG
收藏

基于伪量化噪声的可微模型压缩

Differentiable Model Compression via Pseudo Quantization Noise

Meta AI

Alexandre Défossez, Yossi Adi, Gabriel Synnaeve

摘要:

我们提出了DiffQ,一种用于模型压缩的可微分方法,用于在没有梯度近似的情况下量化模型参数(例如,直接通过估计)。我们建议在训练过程中向模型参数添加独立的伪量化噪声,以近似量化算子的效果。DiffQ相对于未量化权重和所使用的比特数都是可微的。给定量化模型大小和准确性之间的单个超参数平衡,DiffQ优化了端到端训练中每个权重或权重组使用的比特数。我们的实验验证,我们的方法是有竞争力的STE为基础的量化技术的几个基准和架构的图像分类,语言建模和音频源分离。例如,在ImageNet数据集上,DiffQ将12层基于transformer的模型压缩了8倍以上(平均每个权重的精度低于4位),模型精度损失了0.3%。代码可在github.com/facebookresearch/diffq上获得。

英文摘要:

We propose DiffQ a differentiable method for model compression for quantizing model parameters without gradient approximations (e.g., Straight Through Estimator). We suggest adding independent pseudo quantization noise to model parameters during training to approximate the effect of a quantization operator. DiffQ is differentiable both with respect to the unquantized weights and the number of bits used. Given a single hyper-parameter balancing between the quantized model size and accuracy, DiffQ optimizes the number of bits used per individual weight or groups of weights, in end-to-end training. We experimentally verify that our method is competitive with STE based quantization techniques on several benchmarks and architectures for image classification, language modeling, and audio source separation. For instance, on the ImageNet dataset, DiffQ compresses a 12 layers transformer-based model by more than a factor of 8, (lower than 4 bits precision per weight on average), with a loss of 0.3% in model accuracy. Code is available at github.com/facebookresearch/diffq.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑