Uh oh!
There was an error while loading. Please reload this page.
[core] propagate sage attention updates. - #14584
Conversation
sayakpaul
commented
Aug 24, 2026
Cc: @asomoza. I will do a separate one for Sage Blackwell (Sage Attention 3). |
HuggingFaceDocBuilderDev
commented
Aug 24, 2026
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
asomoza
commented
Sep 2, 2026
thanks! I did a test with a 5090 and Minimax-H3, the speedup is around ~2X, but I see some quality degradation specially on text, it is what I expected from last time I tried it. Since it is with a 5090 I used the SDNQ 8-Bit quantized model and with group offload. Nativet2va_sdnq_8bit_pruned_42.1.mp4Saget2va_sdnq_8bit_pruned_sage_42.mp4What is unexpected to me is that it uses quite a bit more of VRAM.
|
sayakpaul
commented
Sep 2, 2026
asomoza
commented
Sep 3, 2026
yeah @sayakpaul, I can see it on all generations, but the more evident ones are the text and ones that needs more fine details, even with simple prompts, so that's not really the factor that determines it. Probably a simple one with a static subject and no details or a cartoon one will be more imperceptible. Also I can see it in this video for example, but not sure if all people can see it too, by no means is bad, most of the times it will be a good trade off for speed so this is still really good IMO. t2va_capybara_sage_42.mp4 |
What does this PR do?
Propagates the latest changes from SAGE and SAGE2 upstream through
kernels.Summary of the speedups (used black-forest-labs/FLUX.2-klein-9B DiT on an L4) for SAGE2:
Before we jump to any conclusions, here is a table benchmarking just the attention kernel:
So, as we can see that just the attention kernel is doing fine. But since the underlying model is itself dominates on MLP, results in the context of the full model become somewhat diluted.
The usage doesn't change:
pipe.transformer.set_attention_backend("sage_hub").Full code is below:
Unfold
This PR additionally adds a
sage_blackwell_hubwhich is basically SAGE3 (the consumer blackwell variant of SAGE). Results:Script