TL;DR
DSTAR is a software-hardware co-design framework that significantly accelerates Diffusion Transformer (DiT) inference by eliminating spatial and temporal redundancies. By combining fine-grained mixed-precision quantization for linear layers with a sparse attention reuse mechanism, DSTAR achieves up to a 7.33× latency speedup and 41.89× energy savings over an NVIDIA A100 GPU without degrading generation quality.
What Problem Does This Paper Address?
Diffusion Transformers (DiTs) have become the state-of-the-art backbone for generative tasks like image synthesis (e.g., Stable Diffusion 3.5, Flux-1) and video generation. However, their multi-iteration denoising process is incredibly computationally expensive and power-hungry. For instance, generating a single 1K resolution image using Flux-1 requires 924 TOPs of computation and consumes roughly 25 seconds on an NVIDIA A100 GPU.
While previous acceleration methods have tried to exploit temporal redundancy (the similarity between consecutive denoising timesteps), they typically use coarse-grained quantization or approximation strategies. When applied to large-scale DiTs, these methods cause severe quality degradation or fail to deliver high hardware efficiency. Furthermore, as shown in Figure 1, computational bottlenecks shift dynamically between Feed-Forward Network (FFN) layers and Attention layers depending on the model scale and target resolution, meaning an effective accelerator must optimize both components.
Methods
DSTAR tackles these efficiency bottlenecks through a tightly integrated software-hardware co-design consisting of three main components:
- Fine-Grained Mixed-Precision Quantization (FMDQ): Designed for linear operations (like FFNs), FMDQ compresses "differential activations" (the small differences between activations at adjacent timesteps). Instead of using a uniform bit-width, it divides tensors into fine-grained tiles and applies an on-the-fly power-of-two (PoT) quantization scheme. Tensors are decomposed into uniform 2-bit slices and dynamically reordered on-the-fly to group identical precision levels together, maximizing hardware utilization.
- Sparse Attention Reuse (SAR): Designed for attention layers, SAR exploits both spatial sparsity and temporal similarity. It uses static profiling to identify block-wise sparsity patterns in the attention score matrix. During inference, attention scores are computed and cached at a specific "cached step" and then directly reused for subsequent steps, completely bypassing the expensive $Q \times K^T$ projection and softmax operations during those intervals.
- Specialized Hardware Accelerator: The authors design a custom hardware architecture featuring Mixed-Precision Processing Cores (MPCs). Each MPC integrates a 64×64 Processing Element (PE) array optimized for 2-bit activation slices, a Quantization Processing Unit (QPU) to handle the fine-grained binning pipeline, and a Vector Processing Unit (VPU) for non-linear operations like GELU and Softmax.
Datasets
The framework was evaluated using 1,000 samples across two primary benchmarks:
- COCO Dataset: Used to evaluate text-to-image and class-to-image generation models (DiT-XL, PixArt-Sigma, Stable Diffusion 3.5, Flux-1).
- FETV Dataset: A benchmark for fine-grained evaluation of open-domain text-to-video generation, used here to evaluate the Latte model.
Key Insights and Ideas
- Intra-Channel Outlier Clustering: The authors observed that while activation outliers are scattered unevenly across different channels, they exhibit strong local clustering within each channel across adjacent tokens (see Figure 4). This insight justifies the use of token-dimension tiling to isolate outliers, allowing the remaining normal values to be aggressively quantized down to 2 or 4 bits.
- Inductive Bias and Attention Stability: Due to the normalization effects of Softmax, attention scores are naturally compressed into a narrow [0, 1] range and form stable, block-wise spatial patterns that persist across adjacent timesteps (see Figure 7). This makes attention scores far more resilient to temporal reuse than raw value matrices.
- Hardware-Friendly Reordering: Handling mixed-precision math usually causes severe load imbalance in systolic arrays. DSTAR solves this by sorting and reordering sub-channels on-the-fly using an on-chip bitonic sorting network, transforming an irregular mixed-precision workload into highly efficient, sequential uniform-bit operations.
Key Results
- Vs. NVIDIA A100 GPU: DSTAR achieves a latency speedup ranging from 3.54× to 7.33× and slashes energy consumption by 18.89× to 41.89×.
- Vs. SOTA Accelerators: DSTAR outperforms state-of-the-art specialized architectures (such as DITTO, Cambricon-D, and EXION), delivering up to a 2.54× latency speedup and 3.68× energy savings.
- Quantization Efficiency: FMDQ successfully compresses differential activations to an average of just 4.3 bits (and as low as 3.2 bits for highly redundant models like Latte), compared to DITTO's 5.4 bits.
- Quality Preservation: All optimizations strictly adhere to high-fidelity generation standards, maintaining less than 5% degradation in FID/FVD and less than a 1-point drop in Inception Score (IS) compared to full FP16 baselines.
Limitations and Future Work
The primary limitation of DSTAR is its reliance on static profiling for the Sparse Attention Reuse (SAR) mechanism. The block-wise attention masks are highly dependent on the specific model weights and the chosen number of denoising steps. If a user changes the model or alters the sampling schedule, the system requires a one-time re-profiling step to generate a new attention mask, which limits dynamic, on-the-fly schedule adjustments during runtime.
Summary updated