HyperAIHyperAI

Command Palette

Search for a command to run...

OrbitQuant: تكميم غير معتمد على البيانات لمحولات انتشار الصور والفيديو

Donghyun Lee Jitesh Chavan Duy Nguyen Sam Huang Liming Jiang Priyadarshini Panda Timo Mertens Saurabh Shukla

الملخص

تحقق محولات الانتشار (DiTs) أداءً متطورًا في توليد الصور والفيديو، لكن أخذ العينات متعدد الخطوات وزيادة عدد المعلمات يجعلان الاستدلال مكلفًا. يُعد التكميم بعد التدريب (PTQ) الحل الطبيعي، ومع ذلك فإن تنشيطات DiT تتغير عبر الخطوات الزمنية والمحفزات وفروع التوجيه، مما يجبر الطرق السابقة على إعادة ملاءمة بيانات المعايرة لكل نقطة تفتيش أو نمط جديد. نقدم OrbitQuant، وهو مكمم للأوزان والتنشيطات غير معتمد على البيانات يتجاوز تقدير النطاق عن طريق التكميم في أساس مُطبع ومُدار. في هذا الأساس، يقوم دوران هادامارد الكتلي المُبدل العشوائي (RPBH) بتركيز كل إحداثي حول توزيع هامشي ثابت ومعروف بغض النظر عن المدخلات، بحيث يخدم كتاب شفرات لويد-ماكس واحد جميع الخطوات الزمنية والمحفزات والطبقات لبعد إدخال معين. نوسع نفس المكمم ليشمل صفوف الأوزان دون اتصال بالإنترنت، مع امتصاص الدوران في الأوزان بحيث يُلغى داخل كل طبقة خطية ولا يبقى إلا دوران أمامي على التنشيطات في وقت التشغيل. تنتقل الوصفة نفسها من الصور إلى الفيديو دون أي ضبط لكل نمط. عبر FLUX.1 و Z-Image-Turbo و Wan 2.1 و CogVideoX، يحقق هذا النهج الريادة في PTQ عند عدة إعدادات منخفضة البتات. كما يدفع PTQ لمحولات انتشار الصور إلى W2A4 بجودة توليد قابلة للاستخدام.

One-sentence Summary

Cantina Labs, USC, and UIUC researchers propose OrbitQuant, a data-agnostic weight-activation quantizer that normalizes activations via a randomized permuted block-Hadamard (RPBH) rotation to a fixed distribution for a single Lloyd–Max codebook across timesteps and modalities, absorbs the rotation into weights offline, and sets state-of-the-art low-bit post-training quantization on image and video diffusion transformers including FLUX.1, Z-Image-Turbo, Wan 2.1, and CogVideoX, while pushing image diffusion transformers to W2A4W_2A_4W2A4 with usable generation quality.

Key Contributions

  • OrbitQuant introduces a data-agnostic weight-activation quantizer that operates in a normalized, rotated basis, where a single Lloyd–Max codebook serves all timesteps, prompts, and layers of a given input dimension.
  • The rotation is absorbed into the weights offline, cancels inside each linear layer, and leaves only a forward RPBH rotation on the activations at runtime. The random permutation of the RPBH rotation ensures well-behaved rotated marginals at low bit-width without calibration.
  • Across FLUX.1, Z-Image-Turbo, Wan 2.1, and CogVideoX, the same recipe transfers unchanged from image to video without per-modality tuning. It sets the state of the art for PTQ on GenEval and VBench at several low-bit settings and, at W2A4, is the only method that produces usable images where prior PTQ baselines collapse to noise.

Introduction

Diffusion Transformers (DiTs) now power state-of-the-art image and video generation, but their compute-bound inference makes low-bit weight-and-activation quantization essential. Existing post-training quantization (PTQ) approaches inherit from large language models and rely on calibration data to absorb outlier shifts; however, DiT activations drift across timesteps, prompts, and classifier-free guidance branches, breaking the static-statistics assumption and demanding new calibration for every checkpoint or modality. The authors introduce OrbitQuant, a calibration-free PTQ framework that rotates activations into a common normalized basis where their coordinates follow a fixed, known marginal distribution, regardless of the input. A single offline Lloyd–Max codebook then uniformly quantizes all activations across denoising steps. The rotation is folded into the weight rows so it cancels inside each linear layer, leaving only a lightweight randomized permuted block-Hadamard (RPBH) transform at runtime. OrbitQuant achieves state-of-the-art results on both image and video DiTs without any calibration data, and it remains usable at W2A4 bit-widths where prior methods collapse.

Method

The authors propose OrbitQuant, a calibration-free quantization framework that replaces per-input range calibration with a distributional quantizer applied in a shared, rotated, and normalized basis. Because weights and activations are quantized in the same basis, the rotation cancels out in the matrix product, leaving only a forward rotation on the activation at runtime.

The framework operates through two distinct stages: offline weight quantization and online activation quantization. For a linear layer with input dimension ddd, the authors apply a shared rotation Πd\Pi_dΠd. During the offline stage, the weight matrix is rotated into this basis as W=WΠd\mathbf{W}' = \mathbf{W} \boldsymbol{\Pi}_d^\topW=WΠd. Each row of W\mathbf{W}'W is then decomposed into a magnitude ri=wi2r_i' = \|\mathbf{w}_i'\|_2ri=wi2 and a unit direction w~i=wi/ri\tilde{\mathbf{w}}_i' = \mathbf{w}_i' / r_i'w~i=wi/ri. The direction is quantized using a Lloyd-Max codebook, and the magnitude is re-attached, yielding W^=diag(r)Q^bw(d)(W~)\hat{\mathbf{W}}' = \text{diag}(\mathbf{r}') \cdot \hat{Q}_{b_w}^{(d)}(\tilde{\mathbf{W}}')W^=diag(r)Q^bw(d)(W~). The row-norm vector is stored in BF16, adding negligible overhead.

At inference time, each incoming activation x\mathbf{x}x is rotated by Πd\Pi_dΠd before entering the layer, producing x=Πdx\mathbf{x}' = \boldsymbol{\Pi}_d \mathbf{x}x=Πdx. This is split into a magnitude s=x2s = \|\mathbf{x}'\|_2s=x2 and a unit direction x~=x/(s+ε)\tilde{\mathbf{x}}' = \mathbf{x}' / (s + \varepsilon)x~=x/(s+ε). The direction is quantized with the Lloyd-Max quantizer Q^ba(d)\hat{Q}_{b_a}^{(d)}Q^ba(d) and rescaled by sss, resulting in x^=sQ^ba(d)(x~)\hat{\mathbf{x}}' = s \cdot \hat{Q}_{b_a}^{(d)}(\tilde{\mathbf{x}}')x^=sQ^ba(d)(x~). Since the weight absorbs Πd\Pi_d^\topΠd and the activation applies Πd\Pi_dΠd, the two cancel in the product, allowing the quantized layer to compute W^x^Wx\hat{\mathbf{W}}' \hat{\mathbf{x}}' \approx \mathbf{W} \mathbf{x}W^x^Wx without an inverse rotation at runtime.

To make the rotation efficient, the authors realize Πd\Pi_dΠd as a randomized permuted block-Hadamard (RPBH) transform. It is defined as Πd=blkdiag(HhD1,,HhDd/h)Pπ\boldsymbol{\Pi}_d = \text{blkdiag}(\mathbf{H}_h \mathbf{D}_1, \dots, \mathbf{H}_h \mathbf{D}_{d/h}) \cdot \mathbf{P}_\piΠd=blkdiag(HhD1,,HhDd/h)Pπ, where Hh\mathbf{H}_hHh is a Walsh-Hadamard matrix, Di\mathbf{D}_iDi are Rademacher sign diagonals, and Pπ\mathbf{P}_\piPπ is a uniform random permutation matrix. The leading permutation Pπ\mathbf{P}_\piPπ is crucial as it spreads coordinates across blocks, ensuring that the variance of each coordinate of Πdx~\Pi_d \tilde{\mathbf{x}}Πdx~ stays close to 1/d1/d1/d. This keeps the marginal distribution close to N(0,1/d)\mathcal{N}(0, 1/d)N(0,1/d), making the Lloyd-Max codebook near-optimal.

Because the rotated coordinates consistently follow the fixed marginal fdf_dfd, the authors run Lloyd-Max on fdf_dfd offline to obtain a single codebook Cd\mathcal{C}_dCd per dimension. This data-agnostic codebook serves every timestep, prompt, layer, and weight row of dimension ddd, completely eliminating the need for input statistics collection or calibration. As demonstrated in the figure, raw activations deviate sharply from fdf_dfd, but after the RPBH rotation, both weights and activations match the target distribution as closely as a dense Haar rotation, allowing a single codebook to fit all operands effectively.

Experiment

Evaluation on image and video diffusion transformers shows OrbitQuant achieving state-of-the-art post-training quantization quality, with near-lossless W4A4 performance that can surpass full precision on GenEval and VBench, and robust W2A4 behavior where baselines collapse. OrbitQuant also exhibits the lowest quantization overhead in latency comparisons, and qualitative samples confirm its fidelity even at very low bit-widths. Ablation studies support the use of a randomized permuted block Hadamard rotation and INT4 AdaLN projections for optimal accuracy–efficiency trade-offs.

OrbitQuant achieves lossless or better-than-FP16 GenEval performance at W4A4 on two of three image diffusion transformers and trails by a tiny margin on the third, surpassing all post-training quantization baselines to set a new state of the art. At W2A4, the advantage grows: while rotation and smoothing methods collapse to near-zero scores on every model, OrbitQuant remains functional, retaining most of its quality on the FLUX models and being the sole method that produces meaningful results on Z-Image-Turbo. OrbitQuant exceeds FP16 on GenEval Overall for FLUX.1-schnell and Z-Image-Turbo at W4A4, outperforming every PTQ baseline. At W2A4, competing methods degrade to near-zero scores, whereas OrbitQuant stays usable and uniquely delivers meaningful scores on Z-Image-Turbo.

On video generation benchmarks, OrbitQuant outperforms other post-training quantization methods at both W4A6 and W4A4 precision. It achieves the highest Overall Consistency on Wan 2.1-1.3B and CogVideoX-2B, leading on most individual quality dimensions, while competing methods degrade more sharply at the lower bit-width. At W4A6 on Wan 2.1-1.3B, OrbitQuant attains the best Overall Consistency (24.35), ahead of the next-best method SVDQuant (23.26). OrbitQuant leads in Imaging Quality, Aesthetic Quality, Dynamic Degree, Background Consistency, Subject Consistency, and Scene at W4A6 on Wan 2.1-1.3B. Motion Smoothness is the only W4A6 metric where OrbitQuant is not the top method; it ranks second (97.76) behind SmoothQuant (98.01). At W4A4, OrbitQuant stays closest to full precision on most dimensions and again ranks first in Overall Consistency on both Wan 2.1-1.3B and CogVideoX-2B, while baselines lose ground.

At W4A4 all rotation methods perform within noise, but at lower bit-widths RPBH yields the best GenEval scores while matching the speed of other fast Hadamard transforms. The dense Haar rotation is an order of magnitude slower because it cannot exploit a fast kernel. RPBH achieves the highest GenEval Overall at W3A3 and W2A4, outperforming Block-RHT, Full RHT, and Haar. Removing the random permutation degrades low-bit performance (Block-RHT), showing the permutation's role in spreading outliers for codebook compatibility. Structured Hadamard transforms (Full RHT, Block-RHT, RPBH) run over 25× faster than the dense Haar rotation, with RPBH adding only a small overhead over Block-RHT.

OrbitQuant sets a new state of the art in post-training quantization for diffusion models, achieving lossless or better-than-FP16 image quality at 4-bit weights and activations and remaining the sole functional method at 2-bit weights where all baselines collapse. On video generation, it leads overall consistency and most quality dimensions at both W4A6 and W4A4 precision. Ablation on rotation transforms reveals that randomized permutation Hadamard (RPBH) yields the best low-bit performance by effectively spreading outliers, with only a small speed overhead over other fast structured transforms.


بناء الذكاء الاصطناعي بالذكاء الاصطناعي

من الفكرة إلى الإطلاق — سرّع تطوير الذكاء الاصطناعي الخاص بك مع المساعدة البرمجية المجانية بالذكاء الاصطناعي، وبيئة جاهزة للاستخدام، وأفضل أسعار لوحدات معالجة الرسومات.

البرمجة التعاونية باستخدام الذكاء الاصطناعي
وحدات GPU جاهزة للعمل
أفضل الأسعار

HyperAI Newsletters

اشترك في آخر تحديثاتنا
سنرسل لك أحدث التحديثات الأسبوعية إلى بريدك الإلكتروني في الساعة التاسعة من صباح كل يوم اثنين
مدعوم بواسطة MailChimp