[Bugfix] Fix stale HPC QK-norm weights after weight refit (#56706)

Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
This commit is contained in:
aoshen02
2026-09-14 21:34:41 -07:00
committed by GitHub
parent 7dbc3d62c3
commit eb61707851
6 changed files with 143 additions and 98 deletions
-10
View File
@@ -15,7 +15,6 @@ import vllm.envs as envs
from vllm.config import ModelConfig, VllmConfig, set_current_vllm_config
from vllm.logger import init_logger
from vllm.model_executor.layers.attention import is_deferred_attention_layer
from vllm.model_executor.layers.hpc import HpcModule
from vllm.model_executor.layers.quantization.base_config import (
QuantizationConfig,
QuantizeMethodBase,
@@ -154,15 +153,6 @@ def process_weights_after_loading(
with device_loading_context(module, target_device):
module.process_weights_after_loading(model_config.dtype)
# Process HPC modules (HpcRopeNorm, etc.) that rely on
# process_weights_after_loading being called from the model's
# load_weights(). When using DummyModelLoader (e.g. profiling or
# sleep/wake_up reload), the model's load_weights() is not called, so we
# must handle HPC modules here generically.
for _, module in model.named_modules():
if isinstance(module, HpcModule):
module.process_weights_after_loading(model)
# Model-level post-load hook, after the per-layer quant finalize.
if hasattr(model, "process_weights_after_loading"):
model.process_weights_after_loading()