Please use spas_sage2_attn_meansim_topk_cuda and block_sparse_sage2_attn_cuda APIs
#100
Pinned
jt-zhang
announced in
Announcements
Replies: 1 comment
-
|
Hey @jt-zhang, is Sage attention 3 FP4 supported implicitly? Didn't catch an explicit connection to these: https://github.com/thu-ml/SageAttention/tree/main/sageattention3_blackwell/sageattn3/blackwell. Please let me know, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We’ve updated the repository to support a convenient plug-and-play API, as well as custom block-sparse masks API.
Recommended API
We highly recommend using the
spas_sage2_attn_meansim_topk_cudaandblock_sparse_sage2_attn_cudaAPIs. They are plug-and-play and customizable:Plug-and-Play API
You can adjust topk to balance attention accuracy (higher topk is more accurate) and sparsity (lower topk is more sparse).
Customize your Block-Sparse Mask
With this API, we support computing attention with any block-sparse mask per attention head. Specifically, the per-head attention mask
mask_idhas shape(batch_size, num_heads, ⌈seq_len / 128⌉, ⌈seq_len // 64⌉)and consists of0and1. Currently, the block size is 128×64.Feel free to try it out!
Beta Was this translation helpful? Give feedback.
All reactions