[NPU] fix rope_theta get error for baichuan2-13b-chat model (#21543)

This commit is contained in:
ZeyuanChen2000
2026-04-29 12:01:03 +08:00
committed by GitHub
parent b437f6be48
commit 23cfa9e4c8
@@ -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):