From 1826b325271c11049922f4e394508986e558b880 Mon Sep 17 00:00:00 2001 From: Isotr0py <2037008807@qq.com> Date: Sat, 1 Mar 2025 01:08:41 +0800 Subject: [PATCH] fix whisper k_proj btw Signed-off-by: Isotr0py <2037008807@qq.com> --- vllm/model_executor/models/whisper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/model_executor/models/whisper.py b/vllm/model_executor/models/whisper.py index 656e5fc6dcf30..c5a55e300c46d 100644 --- a/vllm/model_executor/models/whisper.py +++ b/vllm/model_executor/models/whisper.py @@ -748,11 +748,11 @@ def _create_fake_bias_for_k_proj( weights: Iterable[Tuple[str, torch.Tensor]] ) -> Iterable[Tuple[str, torch.Tensor]]: """ - Create full zeros bias for k_proj weight in self-attention layers. + Create full zeros bias for k_proj weight in self-attn and x-attn layers. So that the bias for k_proj in qkv_proj can be initialized with zeros. """ for name, weight in weights: - if name.endswith(".self_attn.k_proj.weight"): + if name.endswith(".k_proj.weight"): bias = torch.zeros(weight.size(0)) bias_name = name.replace("weight", "bias") yield from [(name, weight), (bias_name, bias)]