Unverified Commit c6bcadf8 authored by Aaron Mihalik's avatar Aaron Mihalik Committed by GitHub
Browse files

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

Adding "longrope" for phi-3
parent 245d3de9
...@@ -110,7 +110,7 @@ class PositionRotaryEmbedding(nn.Module): ...@@ -110,7 +110,7 @@ class PositionRotaryEmbedding(nn.Module):
beta_fast=32, beta_fast=32,
beta_slow=1, beta_slow=1,
) )
elif rope_scaling["type"] == "su": elif rope_scaling["type"] in ["su", "longrope"]:
short_factor = torch.tensor( short_factor = torch.tensor(
rope_scaling["short_factor"], dtype=torch.float32, device=device rope_scaling["short_factor"], dtype=torch.float32, device=device
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment