Skip to content

Commit

Permalink
Undo change
Browse files Browse the repository at this point in the history
  • Loading branch information
mseeger committed Dec 7, 2024
1 parent 4ba0bce commit bb86cb0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions litgpt/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,6 @@ def build_rope_cache(

# Calculate the product of position index and $\theta_i$
idx_theta = torch.outer(seq_idx, theta).repeat(1, 2)
# Happens if `n_elem` is odd
if idx_theta.shape[1] > n_elem:
idx_theta = idx_theta[:, :n_elem]

return torch.cos(idx_theta), torch.sin(idx_theta)

Expand Down

0 comments on commit bb86cb0

Please sign in to comment.