A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 3, 08:00 UTC
[Misc][MM] Remove redundant code in CLIPAttention (#43046)
Signed-off-by: shen-shanshan <467638484@qq.com>
Shanshan Shen committed
May 19, 2026 at 16:43 UTC
ef54a4d604ef3725bd52aa2893f71d671bf5329a
1 file changed
+6
-14
vllm/model_executor/models/clip.py
+6
-14
@@ -397,20 +397,12 @@ class CLIPAttention(nn.Module):
397
)
398
self.num_heads_per_partition = divide(self.num_heads, self.tp_size)
399
400
- if attn_cls == MMEncoderAttention:
401
- self.attn = attn_cls(
402
- self.num_heads_per_partition,
403
- self.head_dim,
404
- self.scale,
405
- prefix=f"{prefix}.attn",
406
- )
407
- else:
408
- self.attn = attn_cls(
409
- self.num_heads_per_partition,
410
- self.head_dim,
411
- self.scale,
412
- prefix=f"{prefix}.attn",
413
- )
400
+ self.attn = attn_cls(
401
+ self.num_heads_per_partition,
402
+ self.head_dim,
403
+ self.scale,
404
+ prefix=f"{prefix}.attn",
405
+ )
406
407
def forward(
408
self,