From c6bcadf883e7bd16fb74f509ba1dade1b635e96e Mon Sep 17 00:00:00 2001 From: Aaron Mihalik Date: Fri, 5 Jul 2024 03:46:41 -0400 Subject: [PATCH] Adding "longrope" for Phi-3 (#2172) (#2179) Adding "longrope" for phi-3 --- server/text_generation_server/layers/rotary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/text_generation_server/layers/rotary.py b/server/text_generation_server/layers/rotary.py index b14005e6..87a61e82 100644 --- a/server/text_generation_server/layers/rotary.py +++ b/server/text_generation_server/layers/rotary.py @@ -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 )