From 6a69a693cbd9695faec0c449f237686f3bdfa281 Mon Sep 17 00:00:00 2001 From: klosax <131523366+klosax@users.noreply.github.com> Date: Mon, 21 Aug 2023 13:23:10 +0200 Subject: [PATCH] gguf.py : fix rope scale kv --- gguf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gguf.py b/gguf.py index e5eb85ded..d461b8d40 100644 --- a/gguf.py +++ b/gguf.py @@ -45,7 +45,7 @@ KEY_ATTENTION_LAYERNORM_RMS_EPS = "{arch}.attention.layer_norm_rms_epsilon" # RoPE KEY_ROPE_DIMENSION_COUNT = "{arch}.rope.dimension_count" -KEY_ROPE_SCALE = "{arch}.rope.scale" +KEY_ROPE_SCALE_LINEAR = "{arch}.rope.scale_linear" # tokenization KEY_TOKENIZER_MODEL = "tokenizer.ggml.model" @@ -620,8 +620,8 @@ class GGUFWriter: self.add_uint32( KEY_ROPE_DIMENSION_COUNT.format(arch=self.arch), count) - def add_rope_scale(self, value: float): - self.add_float32(KEY_ROPE_SCALE.format(arch=self.arch), value) + def add_rope_scale_linear(self, value: float): + self.add_float32(KEY_ROPE_SCALE_LINEAR.format(arch=self.arch), value) def add_tokenizer_model(self, model: str): self.add_string(KEY_TOKENIZER_MODEL, model)