From 4b5ef3002cceb1742a3dde87162827d01b66b5b4 Mon Sep 17 00:00:00 2001 From: Jimmy <29097382+jinmingyi1998@users.noreply.github.com> Date: Wed, 24 Sep 2025 01:24:36 +0800 Subject: [PATCH] [fix][pd-disag]no need set next batch sampling info done in prefill (#10259) --- python/sglang/srt/managers/scheduler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/managers/scheduler.py b/python/sglang/srt/managers/scheduler.py index 31294749d..b84608e06 100644 --- a/python/sglang/srt/managers/scheduler.py +++ b/python/sglang/srt/managers/scheduler.py @@ -2297,8 +2297,9 @@ class Scheduler( def set_next_batch_sampling_info_done(self, batch: ScheduleBatch): if batch.next_batch_sampling_info: if batch.next_batch_sampling_info.grammars is not None: - batch.next_batch_sampling_info.update_regex_vocab_mask() - self.current_stream.synchronize() + if self.disaggregation_mode != DisaggregationMode.PREFILL: + batch.next_batch_sampling_info.update_regex_vocab_mask() + self.current_stream.synchronize() batch.next_batch_sampling_info.sampling_info_done.set() def watchdog_thread(self):