-
Notifications
You must be signed in to change notification settings - Fork 2.3k
add attention backend supporting matrix in the doc #5211
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
Merged
+40
−0
Merged
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ea6fe2c
add attentionbackend
mRSun15 ad9500c
resolve precommit issue
mRSun15 03d48ad
modify the speed
mRSun15 f19a55c
remove speed column
mRSun15 ae62a81
Merge branch 'main' into add_att_backend_doc
hebiao064 86f8f39
resolve comments
mRSun15 df09572
Merge branch 'add_att_backend_doc' of https://github.com/mRSun15/sgla…
mRSun15 399ffd9
triton MLA update
mRSun15 0679ccd
change doc index
mRSun15 b27b357
Merge branch 'main' into add_att_backend_doc
zhaochenyang20 316e9c5
fix
hebiao064 6190184
resolve lint issue
mRSun15 8170897
resolve comments
mRSun15 d60fb53
Update attention backend documentation for FlashInfer and FA3
hebiao064 8aa6141
Merge branch 'main' into add_att_backend_doc
hebiao064 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Attention Backend | ||
|
||
## Supporting matrix for different attention backend | ||
|
||
| **Backend** | **Page Size > 1** | **Spec Decoding** | **MLA** | **Sliding Window** | | ||
|--------------------------|-------------------|-------------------|--------|--------------------| | ||
| **FlashInfer (Default)** | ✅ | ✅ | ✅ | ✅ | | ||
| **FA3** | ✅ | ✅ | ✅ | ✅ | | ||
| **FlashMLA** | ✅ | ❌ | ✅ | ❌ | | ||
| **Triton** | ❌ | ✅ | ✅ | ❌ | | ||
| **Torch Native** | ❌ | ❌ | ❌ | ❌ | | ||
|
||
*Note: FlashMLA only supports page size = 64 case.* | ||
|
||
## User guide | ||
|
||
#### Launch command for different attention backend. | ||
|
||
- FlashInfer (Default) | ||
```bash | ||
python3 -m sglang.launch_server --model meta-llama/Meta-Llama-3.1-8B-Instruct | ||
``` | ||
|
||
- FlashAttention 3 | ||
```bash | ||
python3 -m sglang.launch_server --model meta-llama/Meta-Llama-3.1-8B-Instruct --attention-backend fa3 | ||
``` | ||
|
||
- FlashMLA | ||
```bash | ||
python -m sglang.launch_server --model-path deepseek-ai/DeepSeek-R1-Distill-Qwen-7B --enable-flashmla | ||
hebiao064 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
- Triton | ||
```bash | ||
python3 -m sglang.launch_server --model meta-llama/Meta-Llama-3.1-8B-Instruct --attention-backend triton | ||
``` | ||
|
||
- Torch Native | ||
```bash | ||
python3 -m sglang.launch_server --model meta-llama/Meta-Llama-3.1-8B-Instruct --attention-backend torch_native | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.