Remove KV cache scale boilerplate from model weight loading methods (#43167)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
7fe7800fa4
commit
62215e72c6
@@ -1541,6 +1541,11 @@ def maybe_remap_kv_scale_name(name: str, params_dict: dict) -> str | None:
|
||||
if no remapping is needed.
|
||||
None: If the remapped name is not found in params_dict.
|
||||
"""
|
||||
# Already in vLLM's expected form (e.g. weights pre-renamed by a
|
||||
# `WeightsMapper` from the quant config). Skip the regex remap, which
|
||||
# would otherwise double-apply the `.attn` prefix and drop the weight.
|
||||
if name in params_dict:
|
||||
return name
|
||||
if name.endswith(".kv_scale"):
|
||||
logger.warning_once(
|
||||
"DEPRECATED. Found kv_scale in the checkpoint. "
|
||||
|
||||
Reference in New Issue
Block a user