Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/sglang/srt/model_executor/model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ def initialize(self, min_per_gpu_memory: float):
draft_model_config = ModelConfig.from_server_args(
server_args,
model_path=(server_args.speculative_draft_model_path),
model_revision=server_args.speculative_draft_model_revision,
is_draft_model=True,
)

Expand Down
7 changes: 7 additions & 0 deletions python/sglang/srt/server_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,12 @@ def _handle_hicache(self):
)

def _handle_speculative_decoding(self):
if (
self.speculative_draft_model_path is not None
and self.speculative_draft_model_revision is None
):
self.speculative_draft_model_revision = "main"
Copy link
Copy Markdown
Collaborator

@Qiaolin-Yu Qiaolin-Yu Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need to set this by default?

Copy link
Copy Markdown
Collaborator Author

@gongwei-130 gongwei-130 Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Qiaolin-Yu sorry, lost track of this.

If we don't set a default value for it, it would default to None and pass in here, then from_server_args would use server_args.revision as draft model revision, which introduce problem.


if self.speculative_algorithm == "NEXTN":
self.speculative_algorithm = "EAGLE"

Expand Down Expand Up @@ -1658,6 +1664,7 @@ def _handle_speculative_decoding(self):
]:
if self.speculative_draft_model_path is None:
self.speculative_draft_model_path = self.model_path
self.speculative_draft_model_revision = self.revision
else:
logger.warning(
"DeepSeek MTP does not require setting speculative_draft_model_path."
Expand Down
Loading