arXiv:2507.14481cs.CVcs.AI2025-07被引 2

无需数据和微调,提升视觉Transformer量化精度

DFQ-ViT: Data-Free Quantization for Vision Transformers without Fine-tuning

  • 按难度逐步生成合成数据,提升质量
  • 3比特权重量化下性能领先现有方法4.29%
  • 适合边缘设备部署,节能高效

数据无关量化(DFQ)使视觉变换器(ViTs)在不依赖真实数据的情况下实现量化,便于在资源受限设备上部署。现有方法因合成样本未能充分平衡全局与局部特征,导致质量不足。此外,量化模型在推理时中间层激活分布与全精度模型差异显著,造成性能下降。为此,我们提出DFQ-ViT:先按难度递增生成合成样本以提升质量;再引入激活校正矩阵,对齐量化模型与全精度模型的中间层激活分布。大量实验表明,该方法在性能上显著优于现有数据无关量化方法,且与基于真实数据量化的模型相当。例如,DeiT-T在3比特权重量化下性能高出当前最优方法4.29%。本方法无需微调,降低计算开销与部署门槛,符合绿色学习理念,有助于在资源受限环境中实现高效应用。

原文摘要 · Abstract (English)

Data-Free Quantization (DFQ) enables the quantization of Vision Transformers (ViTs) without requiring access to data, allowing for the deployment of ViTs on devices with limited resources. In DFQ, the quantization model must be calibrated using synthetic samples, making the quality of these synthetic samples crucial. Existing methods fail to fully capture and balance the global and local features within the samples, resulting in limited synthetic data quality. Moreover, we have found that during inference, there is a significant difference in the distributions of intermediate layer activations between the quantized and full-precision models. These issues lead to a severe performance degradation of the quantized model. To address these problems, we propose a pipeline for Data-Free Quantization for Vision Transformers (DFQ-ViT). Specifically, we synthesize samples in order of increasing difficulty, effectively enhancing the quality of synthetic data. During the calibration and inference stage, we introduce the activation correction matrix for the quantized model to align the intermediate layer activations with those of the full-precision model. Extensive experiments demonstrate that DFQ-ViT achieves remarkable superiority over existing DFQ methods and its performance is on par with models quantized through real data. For example, the performance of DeiT-T with 3-bit weights quantization is 4.29% higher than the state-of-the-art. Our method eliminates the need for fine-tuning, which not only reduces computational overhead but also lowers the deployment barriers for edge devices. This characteristic aligns with the principles of Green Learning by improving energy efficiency and facilitating real-world applications in resource-constrained environments.

视觉Transformer量化数据无关边缘部署

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