We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fb371d commit ba331d6Copy full SHA for ba331d6
litgpt/model.py
@@ -872,7 +872,7 @@ def build_rope_cache(
872
theta = theta / factor
873
874
# Create position indices `[0, 1, ..., seq_len - 1]`
875
- seq_idx = torch.arange(seq_len, device=device) / condense_ratio
+ seq_idx = torch.arange(seq_len, device=device).float() / condense_ratio
876
877
# Calculate the product of position index and $\theta_i$
878
idx_theta = torch.outer(seq_idx, theta).repeat(1, 2)
0 commit comments