From f6c9db4bc433fcab1060c235a9eb742ba3f2dc66 Mon Sep 17 00:00:00 2001 From: Zehuan Li <36983421+ClawSeven@users.noreply.github.com> Date: Fri, 19 Dec 2025 10:55:46 +0800 Subject: [PATCH] [DLLM] Fix dLLM regression (#15371) --- python/sglang/srt/managers/scheduler.py | 12 +++++------- test/srt/dllm/test_llada2_mini.py | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/python/sglang/srt/managers/scheduler.py b/python/sglang/srt/managers/scheduler.py index 8e62c3f7a..97304cdb8 100644 --- a/python/sglang/srt/managers/scheduler.py +++ b/python/sglang/srt/managers/scheduler.py @@ -1834,13 +1834,11 @@ class Scheduler( # Determine chunked_prefill_size for this batch chunked_prefill_size = self.chunked_prefill_size - if self.chunked_req is not None: - self.chunked_req.init_next_round_input() - if self.enable_dynamic_chunking: - history_len = len(self.chunked_req.prefix_indices) - dynamic_size = self.predict_next_chunk_size(history_len) - if dynamic_size is not None: - chunked_prefill_size = dynamic_size + if self.chunked_req is not None and self.enable_dynamic_chunking: + history_len = len(self.chunked_req.prefix_indices) + dynamic_size = self.predict_next_chunk_size(history_len) + if dynamic_size is not None: + chunked_prefill_size = dynamic_size # Prefill policy adder = PrefillAdder( diff --git a/test/srt/dllm/test_llada2_mini.py b/test/srt/dllm/test_llada2_mini.py index cff46e4b4..0763977cb 100644 --- a/test/srt/dllm/test_llada2_mini.py +++ b/test/srt/dllm/test_llada2_mini.py @@ -57,7 +57,7 @@ class TestLLaDA2Mini(CustomTestCase): metrics = run_eval_few_shot_gsm8k(args) print(f"{metrics=}") - self.assertGreater(metrics["accuracy"], 0.6) + self.assertGreater(metrics["accuracy"], 0.88) self.assertGreater(metrics["output_throughput"], 150) def test_bs_1_speed(self):