Adding "longrope" for phi-3
This commit is contained in:
parent
245d3de948
commit
c6bcadf883
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue