Skip to content

Commit c2667cc

Browse files
author
Robert Shaw
committed
remove from apply
1 parent aaf04d4 commit c2667cc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

vllm/model_executor/layers/linear.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,8 @@ def apply(self,
118118
layer: torch.nn.Module,
119119
x: torch.Tensor,
120120
bias: Optional[torch.Tensor] = None) -> torch.Tensor:
121-
weight = layer.weight
122-
if self.separate_bias_add:
123-
if bias is not None:
124-
return F.linear(x, weight) + bias
125-
return F.linear(x, weight)
126-
return F.linear(x, weight, bias)
121+
122+
return F.linear(x, layer.weight, bias)
127123

128124

129125
class LinearBase(torch.nn.Module):

0 commit comments

Comments
 (0)