From 99c59a2ea62f32fd5497eceaf2ed18cad33389db Mon Sep 17 00:00:00 2001 From: Mohammad Miadh Angkad <176301910+mmangkad@users.noreply.github.com> Date: Thu, 1 Oct 2026 02:26:58 +0000 Subject: [PATCH] Drop the GLM-5.3-Flash breakable prefill chunk-size pin (#41837) Co-authored-by: Mohammad Angkad --- .../sglang/srt/arg_groups/cuda_graph_hook.py | 18 ------------------ python/sglang/srt/arg_groups/pipeline.py | 4 ---- .../sglang/srt/arg_groups/resolution_hooks.py | 1 - .../test_resolution_hook_registry.py | 5 ++--- 4 files changed, 2 insertions(+), 26 deletions(-) diff --git a/python/sglang/srt/arg_groups/cuda_graph_hook.py b/python/sglang/srt/arg_groups/cuda_graph_hook.py index 0d3f354024..c813fe4464 100644 --- a/python/sglang/srt/arg_groups/cuda_graph_hook.py +++ b/python/sglang/srt/arg_groups/cuda_graph_hook.py @@ -409,24 +409,6 @@ def disable_prefill_cuda_graph_for_deepseek_trtllm_mla(server_args: Any): ) -def apply_glm5_chunked_prefill_default(server_args: Any): - """Set the opted-in GLM BCG chunk default before memory budgeting.""" - cfg = resolving_view(server_args) - if ( - get_platform().is_cuda - and (Phase.PREFILL, "backend") in server_args._cuda_graph_config_locked - and cfg.cuda_graph_config.prefill.backend == Backend.BREAKABLE - and cfg.chunked_prefill_size is None - and "Glm5NextForConditionalGeneration" - in model_config_of(server_args).hf_config.architectures - ): - declare_resolution( - server_args, - "_apply_glm5_chunked_prefill_default", - chunked_prefill_size=4096, - ) - - def apply_glm5_prefill_cuda_graph_policy(server_args: Any): """Set capture sizes for explicitly enabled GLM breakable prefill graphs.""" cfg = resolving_view(server_args) diff --git a/python/sglang/srt/arg_groups/pipeline.py b/python/sglang/srt/arg_groups/pipeline.py index 615d48ddb0..32492d7a17 100644 --- a/python/sglang/srt/arg_groups/pipeline.py +++ b/python/sglang/srt/arg_groups/pipeline.py @@ -162,7 +162,6 @@ def run_resolution_pipeline(server_args: Any) -> None: # resolution (the declarative registry materializes too late to affect # it). Inkling opts into full-graph prefill capture here. from sglang.srt.arg_groups.cuda_graph_hook import ( - apply_glm5_chunked_prefill_default, apply_glm5_prefill_cuda_graph_policy, apply_inkling_prefill_cuda_graph_default, apply_muse_glimmer_prefill_cuda_graph_max_bs_default, @@ -178,9 +177,6 @@ def run_resolution_pipeline(server_args: Any) -> None: run_hook(handle_dwdp, server_args) run_hook(handle_cuda_graph_config, server_args) - # Requires the parsed backend and explicit-input locks, and must precede - # handle_gpu_memory_settings so the chunk size feeds memory budgeting. - run_hook(apply_glm5_chunked_prefill_default, server_args) from sglang.srt.arg_groups.platform_hook import ( handle_amd_specifics, diff --git a/python/sglang/srt/arg_groups/resolution_hooks.py b/python/sglang/srt/arg_groups/resolution_hooks.py index 4b0cf78c30..4e1ba38f6d 100644 --- a/python/sglang/srt/arg_groups/resolution_hooks.py +++ b/python/sglang/srt/arg_groups/resolution_hooks.py @@ -40,7 +40,6 @@ _OVERRIDABLE_HOOKS: FrozenSet[str] = frozenset( "apply_muse_glimmer_prefill_cuda_graph_max_bs_default", "handle_dwdp", "handle_cuda_graph_config", - "apply_glm5_chunked_prefill_default", "handle_hpu_backends", "handle_cpu_backends", "handle_npu_backends", diff --git a/test/registered/unit/server_args/test_resolution_hook_registry.py b/test/registered/unit/server_args/test_resolution_hook_registry.py index 670d106c24..ef1c810b59 100644 --- a/test/registered/unit/server_args/test_resolution_hook_registry.py +++ b/test/registered/unit/server_args/test_resolution_hook_registry.py @@ -242,11 +242,10 @@ class TestEndToEnd(_IsolatedRegistry): sa.resolve_once() self.assertTrue(getattr(sa, "_test_plugin_ran", False)) self.assertEqual(resolution_result(sa, "random_seed"), 999) - # And the neighboring step (must run right after, per the comment at - # the call site) still ran and still saw a real config to chunk. + # And the later steps still ran and still saw a real config to chunk. self.assertIsNotNone( resolution_result(sa, "chunked_prefill_size"), - "apply_glm5_chunked_prefill_default's neighbor did not run", + "steps after handle_cuda_graph_config did not run", ) def test_with_nothing_registered_resolution_is_unchanged(self):