TreeQ: 通过树结构混合精度搜索推动扩散变换器的量化边界
TreeQ: Pushing the Quantization Boundary of Diffusion Transformer via Tree-Structured Mixed-Precision Search
AI总结:
TreeQ通过树结构混合精度搜索方法,首次在DiT模型上实现接近无损的4位PTQ性能,解决了DiT量化中的关键挑战。
摘要:
扩散变换器(DiTs)已作为一种高度可扩展且有效的图像生成骨干网络出现,其在可扩展性和性能上均优于U-Net架构。然而,由于其高计算和内存需求,实际部署仍面临挑战。混合精度量化(MPQ)旨在推动量化的极限,已显示出在将U-Net量化推进到亚4位设置的同时显著减少计算和内存开销的显著成功。然而,其在DiT架构中的应用仍然有限且未被充分探索。在本工作中,我们提出了TreeQ,一个统一的框架,解决DiT量化中的关键挑战。首先,为了解决搜索效率低和代理不一致的问题,我们引入了树结构搜索(TSS)。这种针对DiT的特定方法利用架构的线性特性,在O(n)时间内遍历解决方案空间,同时通过基于比较的剪枝提高目标精度。其次,为统一优化目标,我们提出了环境噪声引导(ENG),利用单个超参数对后训练量化(PTQ)和量化感知训练(QAT)配置进行对齐。第三,为缓解超低比特制度中的信息瓶颈,我们设计了通用君主分支(GMB)。这种结构稀疏分支防止不可逆的信息损失,从而实现更精细的细节生成。通过广泛的实验,我们的TreeQ框架在DiT-XL/2上展示了最先进的性能,在W3A3和W4A4 PTQ/PEFT设置下。值得注意的是,我们的工作是首次在DiT模型上实现接近无损的4位PTQ性能。代码和模型将在https://github.com/racoonykc/TreeQ上提供。
英文摘要:
Diffusion Transformers (DiTs) have emerged as a highly scalable and effective backbone for image generation, outperforming U-Net architectures in both scalability and performance. However, their real-world deployment remains challenging due to high computational and memory demands. Mixed-Precision Quantization (MPQ), designed to push the limits of quantization, has demonstrated remarkable success in advancing U-Net quantization to sub-4bit settings while significantly reducing computational and memory overhead. Nevertheless, its application to DiT architectures remains limited and underexplored. In this work, we propose TreeQ, a unified framework addressing key challenges in DiT quantization. First, to tackle inefficient search and proxy misalignment, we introduce Tree Structured Search (TSS). This DiT-specific approach leverages the architecture's linear properties to traverse the solution space in O(n) time while improving objective accuracy through comparison-based pruning. Second, to unify optimization objectives, we propose Environmental Noise Guidance (ENG), which aligns Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT) configurations using a single hyperparameter. Third, to mitigate information bottlenecks in ultra-low-bit regimes, we design the General Monarch Branch (GMB). This structured sparse branch prevents irreversible information loss, enabling finer detail generation. Through extensive experiments, our TreeQ framework demonstrates state-of-the-art performance on DiT-XL/2 under W3A3 and W4A4 PTQ/PEFT settings. Notably, our work is the first to achieve near-lossless 4-bit PTQ performance on DiT models. The code and models will be available at https://github.com/racoonykc/TreeQ
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。