Skip to content

Commit

Permalink
Remove unnecessary model attribute assignment on 'freqs_cis'
Browse files Browse the repository at this point in the history
  • Loading branch information
BowenBao authored Jul 13, 2023
1 parent 2ea018e commit 35c7996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchbenchmark/models/llama/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def forward(self, tokens: torch.Tensor, start_pos: int):

h = self.tok_embeddings(tokens)

self.freqs_cis = self.freqs_cis.to(h.device)
freqs_cis = self.freqs_cis[start_pos : start_pos + seqlen]
freqs_cis = self.freqs_cis.to(h.device)
freqs_cis = freqs_cis[start_pos : start_pos + seqlen]

mask = None

Expand Down

0 comments on commit 35c7996

Please sign in to comment.