[NPU] bugfix: resolve modelslim load weights bug (#19472)

This commit is contained in:
Hexq0210
2026-02-28 16:22:45 +08:00
committed by GitHub
parent 53c767d224
commit 4ebe9e1e2f

View File

@@ -239,15 +239,6 @@ class ModelSlimConfig(QuantizationConfig):
):
# adapted from vllm.model_executor.layers.quantization.utils.quant_utils.is_layer_skipped
proj_name = prefix.split(".")[-1]
if not hasattr(self, "_quant_description_normalized"):
quant_description = {}
for prefix_, value in self.quant_description.items():
prefix_ = prefix_.replace("language_model.", "")
if "visual" in prefix_:
prefix_ = prefix_.replace("model.", "")
quant_description[prefix_] = value
self.quant_description = quant_description
self._quant_description_normalized = True
if proj_name in fused_mapping:
shard_prefixes = [
prefix.replace(proj_name, shard_proj_name)