Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add FlexAttention examples to SDPA tutorial#3674

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dorbittonn wants to merge2 commits intopytorch:main
base:main
Choose a base branch
Loading
fromdorbittonn:add-flex-attention-examples

Conversation

@dorbittonn
Copy link

@dorbittonndorbittonn commentedNov 29, 2025
edited
Loading

Summary

  • Add new section demonstratingflex_attention from PyTorch 2.5
  • Includescore_mod examples: relative position bias and ALiBi
  • Showblock_mask for sparse attention patterns (causal masking)
  • Demonstrate combiningscore_mod andblock_mask
  • Add performance comparison with standard SDPA

Test plan

  • All FlexAttention code tested with PyTorch 2.7.1
  • Verified output shapes are correct
  • Compilation withtorch.compile works as expected

Checklist

  • The issue that is being fixed is referred in the description
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request

Add a new section demonstrating flex_attention from PyTorch 2.5:- Custom score_mod functions (relative position bias, ALiBi)- block_mask for sparse attention patterns (causal masking)- Combining score_mod and block_mask- Performance comparison with standard SDPAThis extends the existing SDPA tutorial with practical examplesof the flexible attention API for custom attention patterns.🤖 Generated with [Claude Code](https://claude.com/claude-code)Co-Authored-By: Claude <noreply@anthropic.com>
@pytorch-bot
Copy link

pytorch-botbot commentedNov 29, 2025
edited
Loading

🔗 Helpful Links

🧪 See artifacts and rendered test results athud.pytorch.org/pr/pytorch/tutorials/3674

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures

As of commit6007d0f with merge base7f8b6dc (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@dorbittonn

[8]ページ先頭

©2009-2025 Movatter.jp