fix: allow draft models to override context length#18234
fix: allow draft models to override context length#18234JackZeng0208 wants to merge 1 commit intosgl-project:mainfrom
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Hi @JackZeng0208, Concrete example: target For #18220 the right fix is docs‑scoped opt‑in ( |
34d0311 to
974e7bf
Compare
The speculative decoding notebook was failing in documentation CI because the SGLANG_IS_IN_CI environment variable was not set. Fixes #18220 Co-authored-by: Yixiao Zeng <yixiaozeng0208@outlook.com>
974e7bf to
307e98c
Compare
Motivation
See: #18220
Purpose: allow draft models to override context length
The speculative decoding documentation CI was failing because draft models with smaller context lengths (ex: EAGLE with 2048) cannot use target model's context length (ex: like 8192) without setting environment variables.
Modifications
This fix adds
is_draft_modelto the bypass condition in_derive_context_length()insglang/srt/configs/model_config.py, allowing draft models to automatically override context length. The fix will solve the problem fundamentally (not just for the doc itself). This fix is safe because code already handles draft models safely right after that(https://github.com/sgl-project/sglang/blob/main/python/sglang/srt/configs/model_config.py#L367)Comparing with PR #18225 (PR #18226) and PR #18228
SGLANG_IS_IN_CIwill affect other codebase significantlydoc_patch.pyAccuracy Tests
Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci