Skip to content

Commit

Permalink
add parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorganca committed Jul 24, 2024
1 parent 89ea009 commit 2f4809b
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 @@ -1538,7 +1538,7 @@ def set_gguf_parameters(self):
else:
assert low_freq_wavelen != high_freq_wavelen
smooth = (old_context_len / wavelen - low_freq_factor) / (high_freq_factor - low_freq_factor)
rope_factors.append(1 / (1 - smooth) * factor + smooth)
rope_factors.append(1 / ((1 - smooth) * factor + smooth))

self.gguf_writer.add_rope_scaling_attn_factors(1.0)
self.gguf_writer.add_tensor(gguf.TENSOR_NAMES[gguf.MODEL_TENSOR.ROPE_FREQS] + ".weight", np.array(rope_factors, dtype=np.float32))
Expand Down

0 comments on commit 2f4809b

Please sign in to comment.