Skip to content

Commit

Permalink
fix phi 3 conversion (ggerganov#8262)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngxson authored Jul 3, 2024
1 parent f8d6a23 commit 916248a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion convert-hf-to-gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,7 @@ def set_gguf_parameters(self):
if len(rope_scaling_type) == 0:
raise KeyError('Missing the required key rope_scaling.type')

if rope_scaling_type == 'su':
if rope_scaling_type == 'su' or rope_scaling_type == 'longrope':
attn_factor = math.sqrt(1 + math.log(scale) / math.log(orig_max_pos_embds)) if scale > 1.0 else 1.0
elif rope_scaling_type == 'yarn':
attn_factor = 0.1 * math.log(scale) + 1.0 if scale > 1.0 else 1.0
Expand Down

0 comments on commit 916248a

Please sign in to comment.