Unverified Commit 0d2148ef authored by nstream-ai-devx's avatar nstream-ai-devx Committed by GitHub
Browse files

fix rotary_embedding rope_scaling for phi (#3055)

parent bf669606
...@@ -1018,7 +1018,12 @@ def get_rope( ...@@ -1018,7 +1018,12 @@ def get_rope(
head_size, rotary_dim, max_position, base, is_neox_style, dtype head_size, rotary_dim, max_position, base, is_neox_style, dtype
) )
else: else:
scaling_type = rope_scaling["rope_type"] if "rope_type" in rope_scaling:
scaling_type = rope_scaling["rope_type"]
elif "type" in rope_scaling:
scaling_type = rope_scaling["type"]
else:
raise ValueError("Unknown RoPE scaling type")
if scaling_type == "llama3": if scaling_type == "llama3":
scaling_factor = rope_scaling["factor"] scaling_factor = rope_scaling["factor"]
......
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