From d7ff74b9847ab51c98b6c34a73defe5b3e5ca16c Mon Sep 17 00:00:00 2001 From: Kangyan-Zhou Date: Tue, 29 Sep 2026 17:30:38 -0700 Subject: [PATCH] [Cherry-pick to release/v0.5.21] [Fix] Restore deferred layer dumps and pin SentencePiece for InternVL (#41777) (#41788) Co-authored-by: Baizhou Zhang --- python/pyproject.toml | 2 +- python/pyproject_cpu.toml | 2 +- python/pyproject_npu.toml | 2 +- python/pyproject_other.toml | 2 +- python/pyproject_xpu.toml | 2 +- python/sglang/srt/debug_utils/dumper.py | 12 ++++++++++++ .../accuracy/models/test_vlms_mmmu_eval.py | 2 +- 7 files changed, 18 insertions(+), 6 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 0619b58995..50394749d9 100755 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -74,7 +74,7 @@ dependencies = [ "regex", "requests", "scipy", - "sentencepiece", + "sentencepiece==0.2.1", # 0.2.2 rejects null pieces in InternVL tokenizers. "setproctitle", "sgl-deep-ep==0.1.2", "sgl-deep-gemm==0.2.0", diff --git a/python/pyproject_cpu.toml b/python/pyproject_cpu.toml index 6a9902a01b..01b8f50d94 100644 --- a/python/pyproject_cpu.toml +++ b/python/pyproject_cpu.toml @@ -54,7 +54,7 @@ dependencies = [ "regex", "requests", "scipy", - "sentencepiece", + "sentencepiece==0.2.1", # 0.2.2 rejects null pieces in InternVL tokenizers. "setproctitle", "smg-grpc-servicer>=0.9.0", "soundfile==0.13.1", diff --git a/python/pyproject_npu.toml b/python/pyproject_npu.toml index 8d097df8dc..47f76d6f30 100644 --- a/python/pyproject_npu.toml +++ b/python/pyproject_npu.toml @@ -55,7 +55,7 @@ dependencies = [ "regex", "requests", "scipy", - "sentencepiece", + "sentencepiece==0.2.1", # 0.2.2 rejects null pieces in InternVL tokenizers. "setproctitle", "smg-grpc-servicer>=0.9.0", "soundfile==0.13.1", diff --git a/python/pyproject_other.toml b/python/pyproject_other.toml index 2eb25a40cd..4ca21b90a8 100755 --- a/python/pyproject_other.toml +++ b/python/pyproject_other.toml @@ -56,7 +56,7 @@ runtime_base = [ "regex", "requests", "scipy", - "sentencepiece", + "sentencepiece==0.2.1", # 0.2.2 rejects null pieces in InternVL tokenizers. "setproctitle", "smg-grpc-servicer>=0.9.0", "soundfile==0.13.1", diff --git a/python/pyproject_xpu.toml b/python/pyproject_xpu.toml index 4239621ab2..79fc47541c 100644 --- a/python/pyproject_xpu.toml +++ b/python/pyproject_xpu.toml @@ -54,7 +54,7 @@ dependencies = [ "regex", "requests", "scipy", - "sentencepiece", + "sentencepiece==0.2.1", # 0.2.2 rejects null pieces in InternVL tokenizers. "setproctitle", "sglang-kernel-xpu @ https://github.com/sgl-project/whl/releases/download/v0.3.0+xpu/sglang_kernel_xpu-0.3.0-cp310-abi3-manylinux_2_38_x86_64.whl", "smg-grpc-servicer>=0.9.0", diff --git a/python/sglang/srt/debug_utils/dumper.py b/python/sglang/srt/debug_utils/dumper.py index 4d788b5059..6bffc95e6e 100644 --- a/python/sglang/srt/debug_utils/dumper.py +++ b/python/sglang/srt/debug_utils/dumper.py @@ -1780,6 +1780,18 @@ class _SGLangPlugin(_FrameworkPlugin): if isinstance(value, self.PPProxyTensors): return {k: v for k, v in value.tensors.items()} + from sglang.srt.layers.layer_boundary.output import UnreducedOutput + from sglang.srt.layers.layer_boundary.residual.stream import OwedOutput + + # Observe rank-local storage without completing the deferred reduction or + # consuming the residual stream. Opaque handoffs and consumed handles have + # no tensor to dump. + if isinstance(value, UnreducedOutput): + return {"": value.partial} + if isinstance(value, OwedOutput): + tensor = value.contribution.value + return {"": tensor} if tensor is not None else {} + return None def detect_layer_id(self, module: "torch.nn.Module") -> Optional[int]: diff --git a/test/registered/accuracy/models/test_vlms_mmmu_eval.py b/test/registered/accuracy/models/test_vlms_mmmu_eval.py index 48dd517457..ef845e6a4f 100644 --- a/test/registered/accuracy/models/test_vlms_mmmu_eval.py +++ b/test/registered/accuracy/models/test_vlms_mmmu_eval.py @@ -18,7 +18,7 @@ from sglang.test.test_utils import ( # Use a longer timeout than the default 600s. NIGHTLY_EVAL_SERVER_TIMEOUT = 1800 -register_cuda_ci(est_time=7200, stage="nightly", runner_config="2-gpu-large") +register_cuda_ci(est_time=3600, stage="nightly", runner_config="2-gpu-large") MODEL_THRESHOLDS = { # Conservative thresholds on 100 MMMU samples. Latency baselines account for