mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-13 20:04:58 +08:00
[Minor] Zero-initialize attn output buffer (#19784)
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
This commit is contained in:
parent
19a53b2783
commit
f04d604567
@ -209,7 +209,7 @@ class Attention(nn.Module):
|
|||||||
if self.use_output:
|
if self.use_output:
|
||||||
output_shape = (output_shape
|
output_shape = (output_shape
|
||||||
if output_shape is not None else query.shape)
|
if output_shape is not None else query.shape)
|
||||||
output = torch.empty(output_shape,
|
output = torch.zeros(output_shape,
|
||||||
dtype=query.dtype,
|
dtype=query.dtype,
|
||||||
device=query.device)
|
device=query.device)
|
||||||
hidden_size = output_shape[-1]
|
hidden_size = output_shape[-1]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user