[Scheduler] Add configurable decode interval after prefill (#35017)

This commit is contained in:
Po-Han Huang (NVIDIA)
2026-08-19 12:01:36 -07:00
committed by GitHub
parent 4f8ecf6ae9
commit 6f69f927da
5 changed files with 123 additions and 0 deletions
+10
View File
@@ -804,6 +804,11 @@ class ServerArgs:
"The maximum number of tokens in a chunk for the chunked prefill. Setting this to -1 means disabling chunked prefill.",
NS("schedule"),
] = None
prefill_decode_interval: A[
int,
"The number of decode rounds to run after a prefill batch before scheduling the next prefill. In data-parallel attention mode, the interval is synchronized across all DP ranks. Set to 0 to disable.",
NS("schedule"),
] = 0
enable_dynamic_chunking: A[
bool,
"Enable dynamic chunk size adjustment for pipeline parallelism. When enabled, chunk sizes are dynamically calculated based on fitted function to maintain consistent execution time across chunks.",
@@ -3640,6 +3645,7 @@ class ServerArgs:
self._handle_return_hidden_states_mode()
self._handle_media_url_security()
self._handle_hicache_ratio_default()
self._validate_prefill_decode_interval()
if self.model_path.lower() in ["none", "dummy"]:
return
@@ -8690,6 +8696,10 @@ class ServerArgs:
f"(got {self.asr_max_concurrent_sessions})."
)
def _validate_prefill_decode_interval(self):
if self.prefill_decode_interval < 0:
raise ValueError("--prefill-decode-interval must be non-negative.")
def _handle_other_validations(self):
if self.default_chat_template_kwargs is not None and not isinstance(
self.default_chat_template_kwargs, dict