From bd02164cf9eeed8436b26d62c37c1d792e97f9e8 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Tue, 28 Jan 2025 23:49:03 -0500 Subject: [PATCH] Bugfix for whisper quantization due to fake k_proj bias (#12524) Signed-off-by: mgoin --- vllm/model_executor/models/whisper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/model_executor/models/whisper.py b/vllm/model_executor/models/whisper.py index b8512b735da94..15e35fa9cd2c9 100644 --- a/vllm/model_executor/models/whisper.py +++ b/vllm/model_executor/models/whisper.py @@ -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)]