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 15, 06:00 UTC
[Minor] Zero-initialize attn output buffer (#19784)
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Woosuk Kwon committed
Jun 17, 2025 at 23:59 UTC
f04d604567924652e7b4533bbcd5e0c358d578e5
1 file changed
+1
-1
vllm/attention/layer.py
+1
-1
@@ -209,7 +209,7 @@ class Attention(nn.Module):
209
if self.use_output:
210
output_shape = (output_shape
211
if output_shape is not None else query.shape)
212
- output = torch.empty(output_shape,
212
+ output = torch.zeros(output_shape,
213
dtype=query.dtype,
214
device=query.device)
215
hidden_size = output_shape[-1]