From 491051c622e251cb74a110f5a7684340b8280f7f Mon Sep 17 00:00:00 2001 From: fzyzcjy <5236035+fzyzcjy@users.noreply.github.com> Date: Wed, 6 May 2026 21:21:12 +0800 Subject: [PATCH] Cherry pick weight_checker `_weight_fp32` buffer skip from #22663 (#24534) Co-authored-by: JD --- python/sglang/srt/utils/weight_checker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/utils/weight_checker.py b/python/sglang/srt/utils/weight_checker.py index ce209c1a0..1ce4a593f 100644 --- a/python/sglang/srt/utils/weight_checker.py +++ b/python/sglang/srt/utils/weight_checker.py @@ -38,7 +38,7 @@ class WeightChecker: def _reset_tensors(self): for name, param in self._model_state(): - if "cos_sin_cache" in name or "freqs_cis" in name: + if "cos_sin_cache" in name or "freqs_cis" in name or "_weight_fp32" in name: continue param.copy_(_random_like(param)) @@ -131,6 +131,7 @@ def _postprocess_tensors( non_persistent_buffer_patterns = [ "cos_sin_cache", # RoPE cache "inv_freq", # RoPE inverse frequency (if it exists as buffer) + "_weight_fp32", # FP32 cache of gate weight (e.g. Glm4MoeGate) ] for name in raw: