From 9d0be860a49ee7f4fff9608e85466dbcec005414 Mon Sep 17 00:00:00 2001 From: McZyWu Date: Wed, 13 May 2026 16:46:04 +0800 Subject: [PATCH] [NPU] recover accuracy for gemma3-4b-it from 54% to 72% (reduced by transformer5.3) (#21537) --- python/sglang/srt/models/gemma3_causal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/models/gemma3_causal.py b/python/sglang/srt/models/gemma3_causal.py index 2aab93125..958b90db0 100644 --- a/python/sglang/srt/models/gemma3_causal.py +++ b/python/sglang/srt/models/gemma3_causal.py @@ -578,8 +578,9 @@ class Gemma3TextModel(PreTrainedModel): global_config = copy.deepcopy(config) global_config.rope_parameters = { - "rope_type": "default", "rope_theta": global_theta, + "factor": config.rope_parameters["full_attention"]["factor"], + "rope_type": "linear", } self.rotary_emb = Gemma3RotaryEmbedding(config=global_config) self.gradient_checkpointing = False