Skip to content

Commit de7dc35

Browse files
authored
Remove .forward for call to attention block
Differential Revision: D90126170 Pull Request resolved: pytorch#16456
1 parent 4bf3869 commit de7dc35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎examples/models/llama/llama_transformer.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def from_type(cls, layer_id, args, rope) -> "TransformerBlock":
127127
return TransformerBlock(args, attention)
128128

129129
def forward(self, x, freqs_cos, freqs_sin, attn_options: ForwardOptions): # x: 1xN
130-
h, attn_options_update = self.attention.forward(
130+
h, attn_options_update = self.attention(
131131
self.attention_norm(x), freqs_cos, freqs_sin, **attn_options
132132
)
133133
if not isinstance(self.attention, AttentionSkip):

0 commit comments

Comments
 (0)