SegQuant:面向扩散模型的语义感知可泛化量化框架
SegQuant: A Semantics-Aware and Generalizable Quantization Framework for Diffusion Models
对做扩散模型落地的人,SegQuant 提供了一套免训练、免数据的 PTQ 流程:用图分割把线性层按结构语义分组再定量化粒度,并用双路径硬件原生计算处理极性不对称激活,可直接套到自己的扩散骨干上压缩显存与延迟。
原文依据 a segment-aware, graph-based quantization strategy (SegLinear) that captures structural semantics and spatial heterogeneity
摘要译文
由模型翻译 · 术语统一 · 请对照原文核对关键结论扩散模型展现出卓越的生成能力,但计算开销巨大,给在资源受限或延迟敏感环境中的部署带来显著挑战。量化是降低模型规模与计算成本的有效手段,其中训练后量化(PTQ)因无需重新训练或训练数据、可直接兼容预训练模型而尤为有吸引力。然而,现有面向扩散模型的 PTQ 方法往往依赖人工设计的、针对特定架构的启发式规则,限制了其泛化性,也阻碍了与工业部署流水线的集成。为解决这些局限,我们提出 SegQuant,一个部署感知的量化框架,它自适应地组合互补技术以提升跨模型的通用性。SegQuant 包含一个分段感知的、基于图的量化策略(SegLinear),用于捕捉结构语义与空间异质性;以及一个双尺度量化方案(DualScale),通过硬件原生的双路径计算来保留极性不对称的激活,从而避免自定义实现带来的性能损失,这对维持生成输出的视觉保真度至关重要。SegQuant 可广泛适用于 Transformer 类扩散模型之外的模型,在取得强劲性能的同时确保与主流部署工具的无缝兼容。
英文原文摘要 1433 字符
Diffusion models have demonstrated exceptional generative capabilities but are computationally intensive, posing significant challenges for deployment in resource-constrained or latency-sensitive environments.Quantization offers an effective means to reduce model size and computational cost, with post-training quantization (PTQ) being particularly appealing due to its compatibility with pre-trained models without requiring retraining or training data.However, existing PTQ methods for diffusion models often rely on manual, architecture-specific heuristics that limit their generalizability and hinder integration with industrial deployment pipelines.To address these limitations, we propose SegQuant, a deployment-aware quantization framework that adaptively combines complementary techniques to enhance cross-model versatility.SegQuant consists of a segment-aware, graph-based quantization strategy (SegLinear) that captures structural semantics and spatial heterogeneity, along with a dual-scale quantization scheme (DualScale) that preserves polarity-asymmetric activations using a hardware-native dual-path computation, avoiding performance penalties from custom implementations, which is crucial for maintaining visual fidelity in generated outputs.SegQuant is broadly applicable beyond Transformer-based diffusion models, achieving strong performance while ensuring seamless compatibility with mainstream deployment tools.