Explorar el Código

glm53-kindling: re-pin BASE to the v0.31.0 release — Docker Hub pruned the entire old nightly-<sha> scheme, the 09-26 base tag is gone and the dir was unbuildable. v0.31.0 (cut 10-02) is the first release containing the base commit; drift audit ddd6fbca..v0.31.0: all patched files unchanged, vllm#58720 landed verbatim upstream (patch dropped, verify-base keeps asserting it), flashinfer 0.7.0->0.7.0.post1, torch/NCCL/cutlass-dsl unchanged

Alexander Korolev hace 1 semana
padre
commit
546e7b2025

+ 15 - 10
docker-images/glm53-kindling/image/Dockerfile

@@ -24,8 +24,15 @@
 #     glm53_mtp_bf16.py             MTP layer is BF16 but config.json says NVFP4
 #     sm90_fp8_kv_dtype.py          SM90 builder planned fp8 KV as uint8
 #     glm53_reasoning_always_parsed.py  thinking off = low effort, still <think>
-#     vllm-58720-routed-experts.patch  vllm#58720 (ad6817b), after this nightly
 #     FlashKDA 17a037d              vllm#58846, still open: fp32 recurrent state
+#
+# Re-pinned 2026-10-15 to the v0.31.0 release: Docker Hub pruned the whole old
+# nightly-<sha> tag scheme, so the 09-26 base tag became unresolvable. v0.31.0
+# (cut 2026-10-02, 6 days after ddd6fbca) is the first release containing it.
+# Drift audit ddd6fbca..v0.31.0 over the files this build patches: every target
+# unchanged, except routed_experts.py where vllm#58720 landed verbatim upstream
+# (the patch is dropped below), and flashinfer 0.7.0 -> 0.7.0.post1.
+# torch/NCCL/cutlass-dsl pins unchanged.
 #   kept:
 #     glm53-flash_SM121.py (MiaAI)  5 of 7 edits apply unchanged; see below
 #     gb10_plugin_backend.py        MiaAI vs LibertAI sparse-MLA switch
@@ -40,9 +47,10 @@
 #
 # GB10 is sm_121 and this torch reports up to sm_120. That is correct: sm_120
 # cubins run on sm_121. Do not widen TORCH_CUDA_ARCH_LIST.
-ARG BASE=vllm/vllm-openai:nightly-ddd6fbca148a867aad1fcab7ec72f582b9977db4
-# vLLM source the FlashKDA registration shim comes from. Keep it at BASE's commit.
-ARG VLLM_REF=ddd6fbca148a867aad1fcab7ec72f582b9977db4
+ARG BASE=vllm/vllm-openai:v0.31.0
+# vLLM source the FlashKDA registration shim comes from. Keep it at BASE's commit
+# (the release tag's own commit — its installed vllm was built from this ref).
+ARG VLLM_REF=db9527a46873454610df6dbedf79a36d6bf1a7f6
 # Pulled registry-qualified: a bare `mentat-artifacts:<ver>` tag resolves to a
 # local image, and those have been mislabelled before -- every image "pinned"
 # to 0.4.0 once silently ran 0.1.0. Verify with `mentatd --version`.
@@ -142,12 +150,9 @@ RUN python3 /tmp/glm53_reasoning_always_parsed.py && rm /tmp/glm53_reasoning_alw
 COPY image/patches/glm53_deterministic_topk.py /tmp/glm53_deterministic_topk.py
 RUN python3 /tmp/glm53_deterministic_topk.py && rm /tmp/glm53_deterministic_topk.py
 
-# vllm#58720 (ad6817b) landed after this nightly: RoutedExperts indexes the
-# expert mapping by weight name once, instead of scanning it for every tensor.
-COPY image/patches/vllm-58720-routed-experts.patch /tmp/
-RUN cd /usr/local/lib/python3.12/dist-packages \
- && patch -p1 --forward < /tmp/vllm-58720-routed-experts.patch \
- && rm /tmp/vllm-58720-routed-experts.patch
+# vllm#58720 (RoutedExperts indexes the expert mapping once) was carried as a
+# patch until 2026-10-15; it is verbatim in the v0.31.0 base, so the patch is
+# dropped. verify-base.py still asserts the fix is present.
 
 COPY --from=flashkda /out/_flashkda_C.abi3.so /out/FLASHKDA_REF /usr/local/lib/python3.12/dist-packages/vllm/
 

+ 0 - 58
docker-images/glm53-kindling/image/patches/vllm-58720-routed-experts.patch

@@ -1,58 +0,0 @@
-diff --git a/vllm/model_executor/layers/fused_moe/routed_experts.py b/vllm/model_executor/layers/fused_moe/routed_experts.py
-index 15f6c5ed4..1d411ecc7 100644
---- a/vllm/model_executor/layers/fused_moe/routed_experts.py
-+++ b/vllm/model_executor/layers/fused_moe/routed_experts.py
-@@ -36,6 +36,28 @@ if TYPE_CHECKING:
- logger = init_logger(__name__)
- 
- 
-+def _index_expert_mapping(
-+    mapping: list[tuple[str, str, int, str]],
-+) -> dict[str, list[tuple[str, str, int, str]]]:
-+    """Index by logical checkpoint ID, preserving entry order and EPLB replicas.
-+
-+    An empty index keeps the full scan for unsupported mapping names.
-+    """
-+    mapping_by_expert: dict[str, list[tuple[str, str, int, str]]] = {}
-+    for entry in mapping:
-+        prefix, _, suffix = entry[1].partition(".")
-+        expert_key, sep, _ = suffix.partition(".")
-+        if (
-+            prefix != "experts"
-+            or not expert_key
-+            or (expert_key.isdecimal() and not sep)
-+        ):
-+            return {}
-+        if expert_key.isdecimal():
-+            mapping_by_expert.setdefault(expert_key, []).append(entry)
-+    return mapping_by_expert
-+
-+
- class FusedMoeWeightScaleSupported(Enum):
-     TENSOR = "tensor"
-     CHANNEL = "channel"
-@@ -889,14 +911,22 @@ class RoutedExperts(PluggableLayer):
-         self, weights: Iterable[tuple[str, torch.Tensor]]
-     ) -> Iterable[str]:
-         expert_mapping = self.get_expert_mapping(include_fused=True)
-+        mapping_by_expert = _index_expert_mapping(expert_mapping)
-+
-         for expert_name, loaded_weight in weights:
-             qual_name = f"{self.layer_name}.{expert_name}"
--            # Fused expert weights can be identified by their 3D tensors
-             is_fused = loaded_weight.dim() == 3
-+            # Fused tensors and ambiguous names keep the full mapping.
-+            candidates = expert_mapping
-+            if not is_fused and qual_name.count("experts.") == 1:
-+                expert_key = qual_name.partition("experts.")[2].partition(".")[0]
-+                candidates = mapping_by_expert.get(expert_key, expert_mapping)
-+
-             matched = False
--            for param_name, weight_name, expert_id, shard_id in expert_mapping:
-+            for param_name, weight_name, expert_id, shard_id in candidates:
-                 if weight_name not in qual_name:
-                     if matched and is_fused:
-+                        # Fused tensors use the first contiguous run of matches.
-                         break
-                     continue
-                 matched = True

+ 1 - 1
docker-images/glm53-kindling/image/verify-base.py

@@ -61,7 +61,7 @@ if "SupportsEagle3" not in (V / "models/glm5next/common/model.py").read_text():
 if "vllm_config.num_speculative_tokens" not in (V / "models/glm5next/common/attention.py").read_text():
     problems.append("kpool tail ring not sized for spec decode (vllm#58454 missing from the base)")
 if "_index_expert_mapping" not in (V / "model_executor/layers/fused_moe/routed_experts.py").read_text():
-    problems.append("RoutedExperts scans the expert mapping per tensor (vllm-58720-routed-experts.patch)")
+    problems.append("RoutedExperts scans the expert mapping per tensor (vllm#58720, expected in the base)")
 if not (V / "FLASHKDA_REF").read_text().startswith("17a037d"):
     problems.append("_flashkda_C is not FlashKDA 17a037d (vllm#58846 builder stage)")
 if "GLM53-REASONING-ALWAYS" not in (V / "parser/glm47_moe.py").read_text():