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
8b1942c6
Unverified
Commit
8b1942c6
authored
Jul 04, 2025
by
Ke Bao
Committed by
GitHub
Jul 03, 2025
Browse files
Remove type conversion and fix id map in topk (#7759)
parent
489934be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
python/sglang/srt/layers/moe/topk.py
python/sglang/srt/layers/moe/topk.py
+2
-1
No files found.
python/sglang/srt/layers/moe/topk.py
View file @
8b1942c6
...
@@ -112,10 +112,11 @@ def fused_topk(
...
@@ -112,10 +112,11 @@ def fused_topk(
topk_softmax
(
topk_softmax
(
topk_weights
,
topk_weights
,
topk_ids
,
topk_ids
,
gating_output
.
float
()
,
gating_output
,
renormalize
,
renormalize
,
)
)
topk_ids
=
topk_ids_logical_to_physical
(
topk_ids
,
expert_location_dispatch_info
)
_mask_topk_ids_padded_region
(
topk_ids
,
num_token_non_padded
)
_mask_topk_ids_padded_region
(
topk_ids
,
num_token_non_padded
)
return
topk_weights
,
topk_ids
return
topk_weights
,
topk_ids
...
...
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