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
43f80884
Unverified
Commit
43f80884
authored
Oct 13, 2025
by
Qiaolin Yu
Committed by
GitHub
Oct 13, 2025
Browse files
Fix accept rate in speculative decoding metrics (#11572)
parent
60b05032
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/managers/scheduler_metrics_mixin.py
python/sglang/srt/managers/scheduler_metrics_mixin.py
+1
-1
No files found.
python/sglang/srt/managers/scheduler_metrics_mixin.py
View file @
43f80884
...
@@ -259,7 +259,7 @@ class SchedulerMetricsMixin:
...
@@ -259,7 +259,7 @@ class SchedulerMetricsMixin:
)
)
# Calculate acceptance rate: accepted tokens / total draft tokens
# Calculate acceptance rate: accepted tokens / total draft tokens
total_draft_tokens
=
self
.
spec_num_total_forward_ct
*
(
total_draft_tokens
=
self
.
spec_num_total_forward_ct
*
(
self
.
server_args
.
speculative_num_steps
or
1
(
self
.
server_args
.
speculative_num_steps
or
0
)
+
1
)
)
spec_accept_rate
=
(
spec_accept_rate
=
(
self
.
spec_num_total_accepted_tokens
/
total_draft_tokens
self
.
spec_num_total_accepted_tokens
/
total_draft_tokens
...
...
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