From b886068056a05857f796909d2f8573b36fc668a5 Mon Sep 17 00:00:00 2001 From: Fanli Lin Date: Tue, 11 Nov 2025 23:29:33 +0800 Subject: [PATCH] [BugFix] Fix RuntimeError in PixtralHFAttention on CPU/XPU (#28444) Signed-off-by: Lin, Fanli --- vllm/model_executor/models/pixtral.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/model_executor/models/pixtral.py b/vllm/model_executor/models/pixtral.py index 0555717017cd..dfe5f0c52a50 100644 --- a/vllm/model_executor/models/pixtral.py +++ b/vllm/model_executor/models/pixtral.py @@ -1109,7 +1109,7 @@ class PixtralHFAttention(nn.Module): ) out = out.transpose(1, 2) - out = out.view(batch, patches, self.n_heads * self.head_dim) + out = out.reshape(batch, patches, self.n_heads * self.head_dim) attn_output, _ = self.o_proj(out) return attn_output, None