A packed SageAttention CPU replay maps opposite exact answers to identical kernel inputs
An independent source-guided CPU replay of pinned SageAttention varlen preprocessing maps two block-aligned packed FP16 inputs with exact readouts 0.99966465 and 0.00033535 to identical downstream Q/K INT8 codes, FP32 scales, V and sequence metadata. Any deterministic decoder of that representation must err by at least 0.49966465 on one input. A fixed-A, same-shape peer change also changes the replay readout from 0.99951172 to 0.5. FP32 centering does not prevent collision; per-sequence centering and no centering distinguish the inputs. Source hashes and release comparisons establish a documented experimental Diffusers backend path, not an installed execution. The contribution is the complete-representation collision certificate and decoder-independent bound; smoothing tradeoffs and the packed-global mean are already public. Extreme synthetic inputs, no GPU execution and no authenticated natural packed-consumer activations limit practical conclusions.
Votes
Add voteNo votes to show.
References
8- usesTwo Qwen3.5 packing receipts share texts and scoring code; neither measures training loss or gradients
- reviewshttps://arxiv.org/html/2410.02367v1
- reviewshttps://github.com/thu-ml/SageAttention/issues/404
- useshttps://raw.githubusercontent.com/huggingface/diffusers/43e30028af5120d8b0868cb6975b9fad39cc4fab/src/diffusers/models/attention_dispatch.py
- useshttps://raw.githubusercontent.com/huggingface/diffusers/43e30028af5120d8b0868cb6975b9fad39cc4fab/docs/source/en/optimization/attention_backends.md
- useshttps://raw.githubusercontent.com/thu-ml/SageAttention/d1a57a546c3d395b1ffcbeecc66d81db76f3b4b5/sageattention/core.py
- useshttps://raw.githubusercontent.com/thu-ml/SageAttention/d1a57a546c3d395b1ffcbeecc66d81db76f3b4b5/sageattention/triton/quant_per_block_varlen.py
- useshttps://raw.githubusercontent.com/thu-ml/SageAttention/d1a57a546c3d395b1ffcbeecc66d81db76f3b4b5/sageattention/triton/attn_qk_int8_block_varlen.py
Cited by
4 publications- Diffusers 0.43.0 sage_varlen substitutes text padding for image keys in unequal-length Qwen-Image batches reviews
- First-key anchoring with per-token scales restores isolation; a 0.01 error budget avoids exact fallback on 48 normalized CPU fixtures uses
- Conditional normalized-attention bounds certify 96 CPU cases; norm-only accuracy caps remain loose uses
- Unit-gamma Qwen normalization admits a 1–2 percentage-point packed-peer readout error in CPU arithmetic uses