Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
3efc8e2d
Unverified
Commit
3efc8e2d
authored
Apr 15, 2025
by
mRSun15
Committed by
GitHub
Apr 15, 2025
Browse files
add attention backend supporting matrix in the doc (#5211)
Co-authored-by:
Stefan He
<
hebiaobuaa@gmail.com
>
parent
27a009bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
docs/backend/attention_backend.md
docs/backend/attention_backend.md
+39
-0
docs/index.rst
docs/index.rst
+1
-0
No files found.
docs/backend/attention_backend.md
0 → 100644
View file @
3efc8e2d
# Attention Backend
## Supporting matrix for different attention backend
|
**Backend**
|
**Page Size > 1**
|
**Spec Decoding**
|
**MLA**
|
**Sliding Window**
|
**MultiModal**
|
|--------------------------|-------------------|-------------------|--------|--------------------|------------|
|
**FlashInfer**
| ✅ | ✅ | ✅ | ✅ | ✅ |
|
**FA3**
| ✅ | ✅ | ✅ | ✅ | ✅ |
|
**Triton**
| ❌ | ✅ | ✅ | ❌ | ❌ |
|
**Torch Native**
| ❌ | ❌ | ❌ | ❌ | ❌ |
## User guide
#### Launch command for different attention backend.
-
FlashInfer (Default for Non-Hopper Machines, e.g., A100, A40)
```
bash
python3
-m
sglang.launch_server
--model
meta-llama/Meta-Llama-3.1-8B-Instruct
--attention-backend
flashinfer
python3
-m
sglang.launch_server
--tp
8
--model
deepseek-ai/DeepSeek-V3
--attention-backend
flashinfer
--trust-remote-code
```
-
FlashAttention 3 (Default for Hopper Machines, e.g., H100, H200, H20)
```
bash
python3
-m
sglang.launch_server
--model
meta-llama/Meta-Llama-3.1-8B-Instruct
--attention-backend
fa3
python3
-m
sglang.launch_server
--tp
8
--model
deepseek-ai/DeepSeek-V3
--trust-remote-code
--attention-backend
fa3
```
-
Triton
```
bash
python3
-m
sglang.launch_server
--model
meta-llama/Meta-Llama-3.1-8B-Instruct
--attention-backend
triton
python3
-m
sglang.launch_server
--tp
8
--model
deepseek-ai/DeepSeek-V3
--attention-backend
triton
--trust-remote-code
```
-
Torch Native
```
bash
python3
-m
sglang.launch_server
--model
meta-llama/Meta-Llama-3.1-8B-Instruct
--attention-backend
torch_native
```
docs/index.rst
View file @
3efc8e2d
...
@@ -32,6 +32,7 @@ The core features include:
...
@@ -32,6 +32,7 @@ The core features include:
backend/sampling_params.md
backend/sampling_params.md
backend/hyperparameter_tuning.md
backend/hyperparameter_tuning.md
backend/structured_outputs_for_reasoning_models.ipynb
backend/structured_outputs_for_reasoning_models.ipynb
backend/attention_backend.md
.. toctree::
.. toctree::
:maxdepth: 1
:maxdepth: 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment