Skip to content
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

feat: expose pytorch api for block sparse attention #375

Merged
merged 6 commits into from
Jul 17, 2024
Merged

Conversation

yzh119
Copy link
Collaborator

@yzh119 yzh119 commented Jul 13, 2024

The block sparse attention (for any block size (R, C)) are hidden in flashinfer's codebase but it was never exposed explicitly in python. As requested in #367 , this PR implements the PyTorch APIs for block sparse attention, accordingly to our experiments, it can greatly accelerate attention computation with low density (10x for Tree Attention in Sequoia).

@yzh119 yzh119 merged commit 4bba6fa into main Jul 17, 2024
yzh119 pushed a commit that referenced this pull request Jul 17, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.1.0](v0.0.9...v0.1.0)
(2024-07-17)


### Features

* Add mask to `merge_state_in_place`
([#372](#372))
([e14fa81](e14fa81))
* expose pytorch api for block sparse attention
([#375](#375))
([4bba6fa](4bba6fa))
* Fused GPU sampling kernel for joint top-k & top-p sampling
([#374](#374))
([6e028eb](6e028eb))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@yzh119 yzh119 deleted the block-sparse branch July 24, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant