BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zheng, Xingyu, Liu, Xianglong, Qin, Haotong, Ma, Xudong, Zhang, Mingyuan, Hao, Haojie, Wang, Jiakai, Zhao, Zixiang, Guo, Jinyang, Magno, Michele
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917907009634304
author Zheng, Xingyu
Liu, Xianglong
Qin, Haotong
Ma, Xudong
Zhang, Mingyuan
Hao, Haojie
Wang, Jiakai
Zhao, Zixiang
Guo, Jinyang
Magno, Michele
author_facet Zheng, Xingyu
Liu, Xianglong
Qin, Haotong
Ma, Xudong
Zhang, Mingyuan
Hao, Haojie
Wang, Jiakai
Zhao, Zixiang
Guo, Jinyang
Magno, Michele
contents With the advancement of diffusion models (DMs) and the substantially increased computational requirements, quantization emerges as a practical solution to obtain compact and efficient low-bit DMs. However, the highly discrete representation leads to severe accuracy degradation, hindering the quantization of diffusion models to ultra-low bit-widths. This paper proposes a novel weight binarization approach for DMs, namely BinaryDM, pushing binarized DMs to be accurate and efficient by improving the representation and optimization. From the representation perspective, we present an Evolvable-Basis Binarizer (EBB) to enable a smooth evolution of DMs from full-precision to accurately binarized. EBB enhances information representation in the initial stage through the flexible combination of multiple binary bases and applies regularization to evolve into efficient single-basis binarization. The evolution only occurs in the head and tail of the DM architecture to retain the stability of training. From the optimization perspective, a Low-rank Representation Mimicking (LRM) is applied to assist the optimization of binarized DMs. The LRM mimics the representations of full-precision DMs in low-rank space, alleviating the direction ambiguity of the optimization process caused by fine-grained alignment. Comprehensive experiments demonstrate that BinaryDM achieves significant accuracy and efficiency gains compared to SOTA quantization methods of DMs under ultra-low bit-widths. With 1-bit weight and 4-bit activation (W1A4), BinaryDM achieves as low as 7.74 FID and saves the performance from collapse (baseline FID 10.87). As the first binarization method for diffusion models, W1A4 BinaryDM achieves impressive 15.2x OPs and 29.2x model size savings, showcasing its substantial potential for edge deployment. The code is available at https://github.com/Xingyu-Zheng/BinaryDM.
format Preprint
id arxiv_https___arxiv_org_abs_2404_05662
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models
Zheng, Xingyu
Liu, Xianglong
Qin, Haotong
Ma, Xudong
Zhang, Mingyuan
Hao, Haojie
Wang, Jiakai
Zhao, Zixiang
Guo, Jinyang
Magno, Michele
Computer Vision and Pattern Recognition
With the advancement of diffusion models (DMs) and the substantially increased computational requirements, quantization emerges as a practical solution to obtain compact and efficient low-bit DMs. However, the highly discrete representation leads to severe accuracy degradation, hindering the quantization of diffusion models to ultra-low bit-widths. This paper proposes a novel weight binarization approach for DMs, namely BinaryDM, pushing binarized DMs to be accurate and efficient by improving the representation and optimization. From the representation perspective, we present an Evolvable-Basis Binarizer (EBB) to enable a smooth evolution of DMs from full-precision to accurately binarized. EBB enhances information representation in the initial stage through the flexible combination of multiple binary bases and applies regularization to evolve into efficient single-basis binarization. The evolution only occurs in the head and tail of the DM architecture to retain the stability of training. From the optimization perspective, a Low-rank Representation Mimicking (LRM) is applied to assist the optimization of binarized DMs. The LRM mimics the representations of full-precision DMs in low-rank space, alleviating the direction ambiguity of the optimization process caused by fine-grained alignment. Comprehensive experiments demonstrate that BinaryDM achieves significant accuracy and efficiency gains compared to SOTA quantization methods of DMs under ultra-low bit-widths. With 1-bit weight and 4-bit activation (W1A4), BinaryDM achieves as low as 7.74 FID and saves the performance from collapse (baseline FID 10.87). As the first binarization method for diffusion models, W1A4 BinaryDM achieves impressive 15.2x OPs and 29.2x model size savings, showcasing its substantial potential for edge deployment. The code is available at https://github.com/Xingyu-Zheng/BinaryDM.
title BinaryDM: Accurate Weight Binarization for Efficient Diffusion Models
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2404.05662