DilateQuant: Accurate and Efficient Diffusion Quantization via Weight Dilation

Xuewen Liu, Zhikai Li, Minhao Jiang, Mengjuan Chen, Jianquan Li +1 more
9/22/2024
cs.CVcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Model quantization is a promising method for accelerating and compressing diffusion models. Nevertheless, since post-training quantization (PTQ) fails catastrophically at low-bit cases, quantization-aware training (QAT) is essential. Unfortunately, the wide range and time-varying activations in diffusion models sharply increase the complexity of quantization, making existing QAT methods inefficient. Equivalent scaling can effectively reduce activation range, but previous methods remain the overall quantization error unchanged. More critically, these methods significantly disrupt the original weight distribution, resulting in poor weight initialization and challenging convergence during QAT training. In this paper, we propose a novel QAT framework for diffusion models, called DilateQuant. Specifically, we propose Weight Dilation (WD) that maximally dilates the unsaturated in-channel weights to a constrained range through equivalent scaling. WD decreases the activation range while preserving the original weight range, which steadily reduces the quantization error and ensures model convergence. To further enhance accuracy and efficiency, we design a Temporal Parallel Quantizer (TPQ) to address the time-varying activations and introduce a Block-wise Knowledge Distillation (BKD) to reduce resource consumption in training. Extensive experiments demonstrate that DilateQuant significantly outperforms existing methods in terms of accuracy and efficiency. Code is available at http://github.com/BienLuky/DilateQuant .

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liu2024dilatequant,
  title  = {DilateQuant: Accurate and Efficient Diffusion Quantization via Weight Dilation},
  author = {Xuewen Liu and Zhikai Li and Minhao Jiang and Mengjuan Chen and Jianquan Li and Qingyi Gu},
  year   = {2024},
  eprint = {2409.14307},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.14307v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.14307.svg)](https://codeofpaper.com/paper/2409.14307)

Discussion