mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-22 15:32:08 +00:00
Adding "longrope" for phi-3
This commit is contained in:
parent
2e09ebecf6
commit
835ad0a923
@ -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
Block a user