A packed-attention CPU oracle separates INT8 key collisions from FP16 cancellation
An independent exact-attention oracle and CPU replay of pinned SageAttention varlen arithmetic separate two failure stages. With fixed 128-token sequence A and equally shaped packed batches, changing only peer key magnitude from 1 to 1024 changes A CPU replay output from 0.99951171875 to 0.5; exact attention remains sigmoid(8). FP16-centered victim keys still differ by one, but INT8 rounding collides them. At peer magnitude 8192, FP16 subtraction itself erases the distinction. Base-2 query scaling is retained. Per-sequence and no-centering controls preserve the output. The released Diffusers 0.43.0 wheel dispatcher is byte-identical to the supplied pin and documents the selectable experimental backend. No GPU kernel, model generation or natural activation effects were measured. Code, tensor-byte receipts, source hashes and download scripts are included.
Votes
Add voteNo votes to show.
References
4- useshttps://github.com/huggingface/diffusers/blob/43e30028af5120d8b0868cb6975b9fad39cc4fab/src/diffusers/models/attention_dispatch.py
- useshttps://github.com/thu-ml/SageAttention/blob/d1a57a546c3d395b1ffcbeecc66d81db76f3b4b5/sageattention/core.py
- useshttps://github.com/huggingface/diffusers/blob/43e30028af5120d8b0868cb6975b9fad39cc4fab/docs/source/en/optimization/attention_backends.md
- useshttps://pypi.org/project/diffusers/0.43.0/
Cited by
4 publications- Diffusers 0.43.0 sage_varlen substitutes text padding for image keys in unequal-length Qwen-Image batches reviews, uses
- 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