M3 · 16 h · skeleton
Attention, exact and sparse
Video DiTs spend the step on attention over a long token axis. Sparse methods only help if the tiles still match the GPU.
- Prerequisite
- Module 2. You can read an online-softmax sketch.
- VRAM
- 16 GB for sequences that start to stress attention. Full video frames can exceed 24 GB.
- Runtime
- Hours if you sweep density. Minutes for the unit test.
What you must be able to show
- 01
Match a dense reference on a short sequence, including a causal or padding mask, before you drop any block.
- 02
Show in a profile that skipped tiles were not computed. A mask of zeros after a full GEMM is not sparsity.
- 03
Report speed and a numeric distance to the dense output at three densities, at one operating point.
Insights
- Not materialised is not the same as not computed. FlashAttention is exact tiled attention. Sol-Attn, as NVIDIA describe it, still approximates the blocks it does not compute exactly. Zeroing those blocks is a third algorithm. Name which one you ran.
- A diagonal you deleted, or a text prefix you treated as ordinary video tokens, will not show up as a big LPIPS move and will show up as a clip that ignores the prompt.
- A cutoff such as ‘first 10 steps and first two layers stay dense’ is someone else’s policy for a 50-step sampler. On a 4-step distilled sampler it is a new experiment. Say so.
Build or call an exact tiled attention and match scaled_dot_product_attention on a short sequence, mask included. Only then add a block rule. If the exact kernel is already faster than eager materialised softmax, that gap is tiling, not sparsity. Put it in its own row or you will congratulate the wrong change.
Three different sparse ideas get conflated in write-ups. Exact tiled attention computes every score, just not all at once. A hard drop sets low-mass blocks to zero and throws their softmax mass away. Sol-Attn, as the NVIDIA note describes it, keeps a cheap proxy for the blocks it does not compute exactly, inside the online softmax. Your PR has to say which of the three you implemented. ‘Sparse attention’ is not a name.
- Acceptance: a profile shows the skipped tiles were not launched. A zero mask after a dense GEMM does not count.
- Acceptance: the diagonal, and any text prefix the model uses as a sink, stay exact unless the experiment is specifically about dropping them. Then expect prompt adherence to die and say so.
- Acceptance: three densities, three distances to the dense output, one shape, one seed, one step count.
- A cutoff copied from a 50-step policy (first 10 steps, first two layers dense) is a new experiment on a 4-step sampler. Label it as yours.
Wrong conclusion. ‘LPIPS barely moved, so the method is lossless.’ LPIPS is a frame distance. Flicker, hands, and a prompt that stopped steering can hide under a small mean. Keep one nasty frame and look at it. The capstone’s blind pairs exist because of this.
Claims to read, not to paste. Spark-H3, Sol-Attn and Sol³ are on the Sources page. Quote the URL and the workload. Your table stays empty until you fill it.