Skip to content

Commit dbd8828

Browse files
lx200916ggerganov
andauthored
py : fix persimmon n_rot conversion (ggml-org#5460)
* convert : fix persimmon offical weight conversion to write correct n_rot. * Update convert-persimmon-to-gguf.py --------- Co-authored-by: Georgi Gerganov <[email protected]>
1 parent 43fe07c commit dbd8828

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

convert-persimmon-to-gguf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ def main():
8888
gguf_writer.add_embedding_length(hidden_size)
8989
gguf_writer.add_block_count(block_count)
9090
gguf_writer.add_feed_forward_length(hparams.ffn_hidden_size)
91-
gguf_writer.add_rope_dimension_count(hidden_size // head_count)
91+
# ref: https://github.com/ggerganov/llama.cpp/pull/4889/commits/eea19039fc52ea2dbd1aab45b59ab4e3e29a3443
92+
gguf_writer.add_rope_dimension_count(hidden_size // head_count // 2)
9293
gguf_writer.add_head_count(head_count)
9394
gguf_writer.add_head_count_kv(head_count_kv)
9495
gguf_writer.add_rope_freq_base(hparams.rotary_emb_base)

0 commit comments

Comments
 (0)