From fd8a0b29c0440f32c419ef0b36ae18be7e297f51 Mon Sep 17 00:00:00 2001 From: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com> Date: Mon, 6 Oct 2025 17:28:23 -0700 Subject: [PATCH] fix: correct scale parameter remapping logic in Llama4ForConditionalGeneration (#11282) --- python/sglang/srt/models/mllama4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/models/mllama4.py b/python/sglang/srt/models/mllama4.py index e452cb2d4..bca9e7cc3 100644 --- a/python/sglang/srt/models/mllama4.py +++ b/python/sglang/srt/models/mllama4.py @@ -710,7 +710,7 @@ class Llama4ForConditionalGeneration(nn.Module): """Handle scale parameter remapping. Returns True if handled.""" if "scale" in name and "expert" not in name: remapped_name = maybe_remap_kv_scale_name(name, params_dict) - return remapped_name is not None and remapped_name != name + return remapped_name != name return False def _handle_stacked_params(