Fix Qwen2.5-Omni AutoRound loading (#4781)

Signed-off-by: Ayaka <ayaka@mail.shn.hk>
This commit is contained in:
Ayaka Mikazuki authored and GitHub committed 2026-06-29 07:34:27 +00:00
1 parent 7619ed6b82
commit deb9bd4efc
2 files changed
+3 -1

No files matched your search

@@ -81,6 +81,7 @@ class Qwen2_5OmniForConditionalGeneration(
# Initialize thinker model (multimodal processing)
self.thinker = init_vllm_registered_model(
vllm_config=vllm_config,
prefix=maybe_prefix(prefix, "thinker"),
hf_config=thinker_config,
# Use registry architecture key
architectures=["Qwen2_5OmniThinkerModel"],
@@ -335,11 +335,12 @@ class Qwen2Model(nn.Module):
("gate_up_proj", "up_proj", 1),
]
params_dict = dict(self.named_parameters(remove_duplicate=False))
get_cache_scale = getattr(self.quant_config, "get_cache_scale", None)
loaded_params: set[str] = set()
for name, loaded_weight in weights:
if "rotary_emb.inv_freq" in name:
continue
if self.quant_config is not None and (scale_name := self.quant_config.get_cache_scale(name)):
if get_cache_scale is not None and (scale_name := get_cache_scale(name)):
# Loading kv cache quantization scales
param = params_dict[scale_name]
weight_loader = getattr(param, "weight_loader", default_weight_loader)