diff options
author | cebtenzzre <cebtenzzre@gmail.com> | 2023-11-01 18:04:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-01 18:04:33 -0400 |
commit | 898aeca90a9bb992f506234cf3b8b7f7fa28a1df (patch) | |
tree | 125f8a9b466efd4534ecd3e64419ece001c86a7d /convert-baichuan-hf-to-gguf.py | |
parent | c43c2da8afacaddfe51c09b21dbd9922cd0ea46b (diff) |
llama : implement YaRN RoPE scaling (#2268)
Co-authored-by: cebtenzzre <cebtenzzre@gmail.com>
Co-authored-by: Jeffrey Quesnelle <jquesnelle@gmail.com>
Diffstat (limited to 'convert-baichuan-hf-to-gguf.py')
-rwxr-xr-x | convert-baichuan-hf-to-gguf.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/convert-baichuan-hf-to-gguf.py b/convert-baichuan-hf-to-gguf.py index 5ee99be7..67ccbe99 100755 --- a/convert-baichuan-hf-to-gguf.py +++ b/convert-baichuan-hf-to-gguf.py @@ -163,7 +163,8 @@ gguf_writer.add_layer_norm_rms_eps(hparams["rms_norm_eps"]) if "rope_scaling" in hparams and hparams["rope_scaling"] != None and "factor" in hparams["rope_scaling"]: if "type" in hparams["rope_scaling"]: if hparams["rope_scaling"]["type"] == "linear": - gguf_writer.add_rope_scale_linear(hparams["rope_scaling"]["factor"]) + gguf_writer.add_rope_scaling_type(gguf.RopeScalingType.LINEAR) + gguf_writer.add_rope_scaling_factor(hparams["rope_scaling"]["factor"]) # TOKENIZATION |