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
69af3ec3
Unverified
Commit
69af3ec3
authored
May 20, 2025
by
JieXin Liang
Committed by
GitHub
May 19, 2025
Browse files
[doc] add note for get_num_kv_splits in triton_backend (#6444)
parent
32cc66ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
python/sglang/srt/layers/attention/triton_backend.py
python/sglang/srt/layers/attention/triton_backend.py
+3
-0
No files found.
python/sglang/srt/layers/attention/triton_backend.py
View file @
69af3ec3
...
...
@@ -155,6 +155,9 @@ class TritonAttnBackend(AttentionBackend):
seq_lens
:
torch
.
Tensor
,
):
num_token
,
num_seq
=
num_kv_splits
.
shape
[
0
],
seq_lens
.
shape
[
0
]
# NOTE(alcanderian): Considering speculative_decodeing,
# num_kv_splits.shape[0] will be topk * real_num_token.
# And the real_num_token is num_seq in decoding phase.
num_group
=
num_token
//
num_seq
assert
(
...
...
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