Skip to content

Update FlashAttention Hub integration and guard CUDA-only tests - #15024

Merged
sayakpaul merged 3 commits into
huggingface:mainfrom
sywangyi:flashattn_fix
Oct 14, 2026
Merged

sayakpaul merged 3 commits into
huggingface:mainfrom
sywangyi:flashattn_fix

Conversation

@sywangyi

Copy link
Copy Markdown
Contributor

version=1 only has <=torch2.12 support and in v3, return_lse is not the input arg(https://huggingface.co/kernels/kernels-community/flash-attn2/blob/v3/build/torch-stable-abi210-cu132-x86_64-linux/flash_attn_interface.py#L164) and do not support dropout>0

@github-actions github-actions Bot added models tests size/S PR with diff < 50 LOC labels Oct 14, 2026
@sywangyi

Copy link
Copy Markdown
Contributor Author

@sayakpaul please help review, verified in A100

softcap,
alibi_slopes,
return_lse,
False,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this means return_softmax is always False?

@sywangyi sywangyi Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My question is what parameter does that False value correspond to? Is it not return_softmax?

@sywangyi sywangyi Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's return_softmax in v3, and default is False

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @sywangyi, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice.

Once the PR links an issue (or gets the no-issue-needed label), you can ignore this message — it stays here as a comment, but it no longer applies.

Signed-off-by: Wang, Yi <yi.a.wang@intel.com>

@sayakpaul sayakpaul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! @DN6 I think this also fixes the issue you recently faced.

@sayakpaul
sayakpaul merged commit 839af3a into huggingface:main Oct 14, 2026
11 of 12 checks passed
@sayakpaul sayakpaul added this to the Release 0.42.0 milestone Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models size/S PR with diff < 50 LOC tests

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants