Efficiënte kwantiseringsstrategieën voor latente diffusiemodellen
Efficient Quantization Strategies for Latent Diffusion Models
December 9, 2023
Auteurs: Yuewei Yang, Xiaoliang Dai, Jialiang Wang, Peizhao Zhang, Hongbo Zhang
cs.AI
Samenvatting
Latent Diffusion Models (LDMs) vangen de dynamische evolutie van latente variabelen over tijd op, waarbij patronen en multimodaliteit worden gecombineerd in een generatief systeem. Ondanks de vaardigheid van LDM in diverse toepassingen, zoals tekst-naar-beeldgeneratie, mogelijk gemaakt door robuuste tekstencoders en een variational autoencoder, dwingt de kritieke noodzaak om grote generatieve modellen op edge-apparaten te implementeren tot een zoektocht naar compactere maar effectieve alternatieven. Post Training Quantization (PTQ), een methode om de operationele grootte van deep learning-modellen te comprimeren, stuit op uitdagingen wanneer deze wordt toegepast op LDM vanwege temporele en structurele complexiteiten. Deze studie stelt een kwantiseringsstrategie voor die LDMs efficiënt kwantiseert, waarbij het Signaal-naar-Kwantiseringsruisverhouding (SQNR) wordt gebruikt als een cruciale evaluatiemetric. Door de kwantiseringsafwijking te behandelen als relatieve ruis en gevoelige delen van een model te identificeren, stellen we een efficiënte kwantiseringsaanpak voor die zowel globale als lokale strategieën omvat. Het globale kwantiseringsproces vermindert relatieve kwantiseringsruis door hogere-precisie kwantisering te initiëren op gevoelige blokken, terwijl lokale behandelingen specifieke uitdagingen aanpakken in kwantiseringsgevoelige en tijdsgevoelige modules. De resultaten van onze experimenten tonen aan dat de implementatie van zowel globale als lokale behandelingen resulteert in een zeer efficiënte en effectieve Post Training Quantization (PTQ) van LDMs.
English
Latent Diffusion Models (LDMs) capture the dynamic evolution of latent
variables over time, blending patterns and multimodality in a generative
system. Despite the proficiency of LDM in various applications, such as
text-to-image generation, facilitated by robust text encoders and a variational
autoencoder, the critical need to deploy large generative models on edge
devices compels a search for more compact yet effective alternatives. Post
Training Quantization (PTQ), a method to compress the operational size of deep
learning models, encounters challenges when applied to LDM due to temporal and
structural complexities. This study proposes a quantization strategy that
efficiently quantize LDMs, leveraging Signal-to-Quantization-Noise Ratio (SQNR)
as a pivotal metric for evaluation. By treating the quantization discrepancy as
relative noise and identifying sensitive part(s) of a model, we propose an
efficient quantization approach encompassing both global and local strategies.
The global quantization process mitigates relative quantization noise by
initiating higher-precision quantization on sensitive blocks, while local
treatments address specific challenges in quantization-sensitive and
time-sensitive modules. The outcomes of our experiments reveal that the
implementation of both global and local treatments yields a highly efficient
and effective Post Training Quantization (PTQ) of LDMs.