From 540e7ee8fc4c1c354b1a0ac14f20738ab09a1c27 Mon Sep 17 00:00:00 2001 From: biondizzle Date: Tue, 19 May 2026 00:14:09 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20layer.self=5Fattn=20=E2=86=92=20layer.at?= =?UTF-8?q?tn=20(model=20uses=20attn,=20not=20self=5Fattn)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vllm/patches/deepseek_v4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/patches/deepseek_v4.py b/vllm/patches/deepseek_v4.py index de36f4ff..76fae940 100644 --- a/vllm/patches/deepseek_v4.py +++ b/vllm/patches/deepseek_v4.py @@ -1648,7 +1648,7 @@ class DeepseekV4Model(nn.Module): for layer in islice(self.layers, self.start_layer, self.end_layer): layer.ffn.finalize_mega_moe_weights() # Quantize wo_a to FP8 (checkpoint has bfloat16, forward expects FP8) - attn = layer.self_attn + attn = layer.attn if hasattr(attn, 'wo_a') and attn.wo_a.weight.dtype == torch.bfloat16: self._quantize_wo_a_to_fp8(attn.wo_a)