From 23cfa9e4c8f4db98f53e48dd2febacc1d1a9db6a Mon Sep 17 00:00:00 2001 From: ZeyuanChen2000 <806126546@qq.com> Date: Wed, 29 Apr 2026 12:01:03 +0800 Subject: [PATCH] [NPU] fix rope_theta get error for baichuan2-13b-chat model (#21543) --- python/sglang/srt/utils/hf_transformers/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/utils/hf_transformers/common.py b/python/sglang/srt/utils/hf_transformers/common.py index d05d53360..053550ded 100644 --- a/python/sglang/srt/utils/hf_transformers/common.py +++ b/python/sglang/srt/utils/hf_transformers/common.py @@ -171,7 +171,7 @@ def get_rope_config(config): rope_params = getattr(config, "rope_parameters", None) if rope_params is not None: return rope_params["rope_theta"], rope_params - return config.rope_theta, getattr(config, "rope_scaling", None) + return getattr(config, "rope_theta", 10000), getattr(config, "rope_scaling", None) def _patch_text_config(parent_config: PretrainedConfig, text_config):