[Kimi-K3] Merge fused_qkvg_proj into the loader-seeded packed_modules_mapping (#41164)

This commit is contained in:
Peng Wu
2026-09-28 16:46:11 +08:00
committed by GitHub
parent e8eeff2956
commit 546bfa7221
2 changed files with 70 additions and 1 deletions
+8 -1
View File
@@ -3109,7 +3109,14 @@ class KimiK3LinearForCausalLM(nn.Module):
}
quant_config.update_packed_modules_mapping({"model": model_mapping})
else:
quant_config.update_packed_modules_mapping(self.packed_modules_mapping)
# The loader seeded this mapping from the outer model class;
# replacing it would drop those entries.
quant_config.update_packed_modules_mapping(
{
**(quant_config.packed_modules_mapping or {}),
**self.packed_modules_mapping,
}
)
self.model = KimiK3LinearModel(
config, quant_config, prefix=maybe_prefix(prefix, "model")
)