Skip to content

Commit 916248a

Browse files
authored
fix phi 3 conversion (#8262)
1 parent f8d6a23 commit 916248a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

convert-hf-to-gguf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1942,7 +1942,7 @@ def set_gguf_parameters(self):
19421942
if len(rope_scaling_type) == 0:
19431943
raise KeyError('Missing the required key rope_scaling.type')
19441944

1945-
if rope_scaling_type == 'su':
1945+
if rope_scaling_type == 'su' or rope_scaling_type == 'longrope':
19461946
attn_factor = math.sqrt(1 + math.log(scale) / math.log(orig_max_pos_embds)) if scale > 1.0 else 1.0
19471947
elif rope_scaling_type == 'yarn':
19481948
attn_factor = 0.1 * math.log(scale) + 1.0 if scale > 1.0 else 1.0

0 commit comments

Comments
 (0)