-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: graph: add document for sdpa with compressed key and value #2301
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(open question) Do we want to have separate document for non-quantized and quantized patterns?
My understanding of existing SDPA page was that it would regroup different data-types given that it currently has a subsection for floating-point pattern.
Thank you @mgouicem ! That's also my question. Initially when i added the floating-point section, i was thinking to include all these fp, int8 quantized, and only kv quantized patterns together in a single page. But with this PR, it seems there will be too much information. Maybe we need @ranukund 's input for which is a better format. |
51d1971
to
9c91ae9
Compare
Thanks for the question! From my perspective, I think it's better for us to put the quantized sdpa patterns in a separate document as it requires much more information compared with pure floating-point patterns, such as fpmath mode setting, group quantization and adding extra dynamic quantization ops. It's also worth noting that this PR only includes the document for quantization sdpa patterns with compressed KV, but not the pure quantized sdpa. We may need to think about fusing them together in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document folder has been changed on main branch. Please rebase the PR. Thanks.
doc/graph/sdpa_with_compressed_kv.md
Outdated
| dt_fp | dt_fp | N/A | N/A | dt_int | dt_fp | u4,s4,u8,s8,s32 | dt_fp | | ||
|
||
Notes: | ||
- dt_fp can be either: f16, bf16 and f32. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the problem if we directly expand dt_fp as f32, bf16, f16
in the table above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we directly use f32, bf16, f16
in the table, it would result in an excessively lengthy table. Furthermore, it could lead users to misinterpret that these data types can be mixed, such as using f16 for Query with bf16 for Key scale. However, all sections involving dt_fp
should utilize the same data type.
9c91ae9
to
2f307af
Compare
General