PTQ4ADM: Post-Training Quantization for Efficient Text Conditional Audio Diffusion Models

Jayneel Vora, Aditya Krishnan, Nader Bouacida, Prabhu Rv Shankar, Prasant Mohapatra

TL;DR

PTQ4ADM introduces a post-training quantization framework specifically designed for text-conditional audio diffusion models, shrinking model sizes by up to 70% with negligible impact on audio quality. By leveraging LLM-driven prompt augmentation and activation-aware calibration, it enables efficient on-device deployment without the need for costly retraining.

What Problem Does This Paper Address?

Audio Diffusion Models (ADMs) like AudioLDM and Tango excel at generating high-quality, contextually accurate audio from text prompts. However, their massive memory footprints and the computational cost of iterative denoising steps make them impractical for resource-constrained environments like mobile devices, gaming consoles, or AR/VR headsets.

Post-Training Quantization (PTQ) is a popular compression technique that converts full-precision weights and activations into lower bitwidths (e.g., 4-bit or 8-bit) without retraining. Unfortunately, naively applying PTQ to diffusion models severely degrades audio quality. Because diffusion models generate data iteratively, quantization noise accumulates across dozens of denoising steps, leading to distorted audio and a loss of semantic fidelity. This paper addresses how to effectively quantize text-conditional ADMs while preserving their synthesis quality.

Methods

The authors introduce PTQ4ADM, a framework consisting of two main components designed to create a robust calibration set for quantization:

  1. Coverage-Driven Prompt Augmentation: Quantized models need a calibration dataset to determine the optimal scaling factors for low-bit representations. To ensure the calibration set covers diverse audio characteristics, the authors use a frozen GPT-3.5-turbo model to iteratively augment a small set of initial prompts. This process ensures full coverage of various audio modalities (e.g., speech, music, environmental sounds) and acoustic aspects (e.g., pitch, loudness, reverberation) while filtering out redundant prompts.
  2. Activation-Aware Calibration Sampling Algorithm: Instead of uniformly sampling intermediate features across random timesteps, this algorithm prioritizes layers and timesteps with the highest activation variance. By focusing calibration on these highly sensitive regions where quantization errors are most likely to propagate, the framework significantly stabilizes the quantized model's performance.
Figure 1: A diagrammatical representation of the generation of the intermediate for the calibration set using the PTQ4ADM framework.

Datasets

The framework was evaluated using text prompts from AudioCaps, a premier dataset for text-to-audio evaluation. The authors used 100 sampled prompts from AudioCaps and expanded them into 700 enhanced prompts via their prompt augmentation module to calibrate three state-of-the-art ADMs: TANGO, Make-An-Audio, and AudioLDM-L.

Key Insights and Ideas

  • Prompt-Dependent Activation Variance: The authors discovered that activation distributions within ADM backbone networks vary wildly depending on the complexity of the text prompt. A simple prompt (like a continuous alarm) yields a tight activation range, whereas a complex, abstract prompt results in highly volatile activations. This highlights why a diverse, LLM-augmented calibration set is mandatory for stable quantization.
Figure 2: Activation distributions within the TimestepEmbedSequential block, located in the input layers of the Make-An-Audio diffusion model, for two distinct prompts: (1) a single, continuous alarm beep, and (2) a surreal, dissonant melody characterized by mechanical grinding, sporadic bursts of static, and alien-like vocalizations.
  • Layer Sensitivity Matters: Not all layers handle quantization equally. Sensitivity analysis showed that the initial and final convolutional layers of the U-Net backbone are highly susceptible to precision loss. By keeping sensitive components (like attention layers) at full precision (FP16) and aggressively quantizing non-sensitive convolutional and fully connected layers, the authors achieved an optimal balance between compression and fidelity.

Key Results

PTQ4ADM demonstrates that extreme quantization is viable for complex audio generation tasks:

  • Substantial Size Reduction: The framework successfully compressed the U-Net backbones of TANGO, AudioLDM-L, and Make-An-Audio down to 4-bit weights and 8-bit activations (4W8A), yielding a model size reduction of 62% to 70%.
  • Minimal Quality Degradation: Across all tested models, the 4W8A configuration resulted in less than a 5% increase in Fréchet Distance (FD) scores compared to the full-precision baselines. For example, TANGO's FD score only shifted from 24.52 (Full Precision) to 25.18 (4W8A) while achieving a 68% size reduction.
  • Perceptual Fidelity: In Mean Opinion Score (MOS) evaluations with expert human listeners, the quantized models maintained comparable perceptual quality to full-precision models, with some listeners occasionally preferring the quantized outputs.
Table 1: Main results for quantization across Tango, Make-An-Audio, and AudioLDM. Only non-sensitive layers are quantized and calibrated. Attention layers are at full precision. One hundred sampled prompts with 700 enhanced prompts were created for calibration.

Limitations and Future Work

While PTQ4ADM delivers impressive compression ratios, the authors note that extreme quantization (4W8A) can still introduce noticeable perceptual degradation when generating highly complex acoustic scenes or intricate musical compositions.

Additionally, the current framework applies static bitwidths across non-sensitive layers. The authors suggest that future work should explore adaptive quantization—dynamically adjusting bitwidths per layer or timestep—and incorporate perceptual loss functions during calibration to further refine audio fidelity in ultra-low-bitwidth deployments.

Summary updated

BibTeX
@misc{vora2024ptq,
  author = {Jayneel Vora and Aditya Krishnan and Nader Bouacida and Prabhu RV Shankar and Prasant Mohapatra},
  title = {{PTQ4ADM: Post-Training Quantization for Efficient Text Conditional Audio Diffusion Models}},
  year = {2024},
  eprint = {2409.13894},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.13894},
}
Figure