[Attention] support softmax lse - #330
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts the FlashAttention SYCL forward path for chunk prefill (two-launch dispatcher) so that softmax_lse is returned with the correct non-empty shape even though the value is not stitched/computed on that path, addressing a speculative decoding issue when topk > 1.
Changes:
- Allocate and return
softmax_lsein the chunkprefill path with shape(nheads, total_q)instead of an empty{0}placeholder. - Derive
total_qandnum_headsfromqto construct the correctsoftmax_lseshape. - Add TODO notes indicating prefill
softmax_lseis currently unsupported.
|
Figure out that |
88b4d38 to
473d5fe
Compare
473d5fe to
5a1b28a
Compare
5a1b28a to
2384b34
Compare
3804ac0 to
08c540e
Compare
|
repro_softmax_lse.py |
Hi @ckvermaAI, there are several checks in your reproducer. Could you elaborate what the exact failure is, core dump or accuracy issue? |
|
need rebase. |
|
There are some hang and accuracy issues after rebase. The fix is WIP. |
08c540e to
36f5f87
Compare
|
Issue fixed. |
Support softmax lse for prefill/decode/chunk_prefill.
Fix speculative decoding issue with
topk>1https://jira.devtools.intel.com/browse/SGLANGT-1430.The wheel size increases for
1Mand the compiling time hardly changes~20min.