mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-03-26 16:44:47 +08:00
Bugfix for whisper quantization due to fake k_proj bias (#12524)
Signed-off-by: mgoin <michael@neuralmagic.com>
This commit is contained in:
parent
46fb056749
commit
bd02164cf9
@ -743,7 +743,7 @@ def _create_fake_bias_for_k_proj(
|
||||
So that the bias for k_proj in qkv_proj can be initialized with zeros.
|
||||
"""
|
||||
for name, weight in weights:
|
||||
if ".self_attn.k_proj.weight" in name:
|
||||
if name.endswith(".self_attn.k_proj.weight"):
|
||||
bias = torch.zeros(weight.size(0))
|
||||
bias_name = name.replace("weight", "bias")
|
||||
yield from [(name, weight), (bias_name, bias)]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user