Hugging Face Blog

Memory-efficient Diffusion Transformers with Quanto and Diffusers

arXiv Machine Learning
Nov 6

The Quantization Benefits of Residual-Free Transformers

The paper investigates how residual connections in transformers affect the distribution of activations, making them heavy‑tailed and more difficult to quantize accurately. By comparing standard residual transformers with residual‑free variants, the authors show that residuals increase quantization error and accuracy loss at low precision, while residual‑free models maintain near‑Gaussian activations and better robustness to low‑bit quantization. They further demonstrate that residual‑free transformers can be trained effectively using orthogonal initialization, spectral or second‑order optimization, and depth‑aware scaling of attention temperature, achieving comparable full‑precision performance with improved quantization friendliness.

By Yiping Ji, Mahalakshmi Sabanayagam, Peyman Moghadam, Hemanth Saratchandran, Simon Lucey
arXiv Machine Learning
Jul 24

KroQuant: Kronecker-Structured Block Transforms for Efficient Post-Training Quantization of Diffusion Transformers

arXiv:2607. 21446v1 Announce Type: new Abstract: Post-training quantization (PTQ) of diffusion transformers (DiTs) to W4A4 severely degrades output quality, because activations entering each linear layer contain outliers that 4-bit formats cannot represent.

By Yann Bouquet, Alireza Khodamoradi, Kristof Denolf, Mathieu Salzmann