Adding "longrope" for Phi-3 (#2172) (#2179)

Adding "longrope" for phi-3
This commit is contained in:
Aaron Mihalik 2024-07-05 03:46:41 -04:00 committed by GitHub
parent 245d3de948
commit c6bcadf883
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class PositionRotaryEmbedding(nn.Module):
beta_fast=32,
beta_slow=1,
)
elif rope_scaling["type"] == "su":
elif rope_scaling["type"] in ["su", "longrope"]:
short_factor = torch.tensor(
rope_scaling["short_factor"], dtype=torch.float32, device=device
)