Skip to content

Commit 54c22c0

Browse files
authored
Merge pull request #1077 from mst272/main
update the code to use the module's __call__ (Issue #1055)
2 parents 52afd48 + 1e83758 commit 54c22c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,10 @@ def forward(
403403
torch.Tensor: Output tensor after applying attention and feedforward layers.
404404
405405
"""
406-
h = x + self.attention.forward(
406+
h = x + self.attention(
407407
self.attention_norm(x), start_pos, freqs_cis, mask
408408
)
409-
out = h + self.feed_forward.forward(self.ffn_norm(h))
409+
out = h + self.feed_forward(self.ffn_norm(h))
410410
return out
411411

412412

0 commit comments

Comments
 (0)