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
e99729c9
Unverified
Commit
e99729c9
authored
Aug 21, 2025
by
jiapingW
Committed by
GitHub
Aug 20, 2025
Browse files
Fixed the issue where eagle3 TPOT was not as good as without eagle3. (#9404)
parent
c10b8e6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
python/sglang/srt/speculative/eagle_utils.py
python/sglang/srt/speculative/eagle_utils.py
+7
-6
No files found.
python/sglang/srt/speculative/eagle_utils.py
View file @
e99729c9
...
...
@@ -453,12 +453,13 @@ class EagleVerifyInput:
sampling_info
.
top_ks
,
self
.
draft_token_num
,
dim
=
0
),
)
# (bs * draft_token_num, vocab_size)
target_probs
=
top_p_renorm_prob
(
target_probs
,
torch
.
repeat_interleave
(
sampling_info
.
top_ps
,
self
.
draft_token_num
,
dim
=
0
),
)
if
not
torch
.
all
(
sampling_info
.
top_ps
==
1.0
):
target_probs
=
top_p_renorm_prob
(
target_probs
,
torch
.
repeat_interleave
(
sampling_info
.
top_ps
,
self
.
draft_token_num
,
dim
=
0
),
)
target_probs
=
target_probs
.
reshape
(
bs
,
self
.
draft_token_num
,
-
1
)
draft_probs
=
torch
.
zeros
(
...
...
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