fix rope ratio to solve incorrect answers

This commit is contained in:
toyer 2024-07-07 10:27:05 +00:00
parent ed54a65d10
commit 5b760f26a4

View file

@ -3231,7 +3231,10 @@ class ChatGLMModel(Model):
self.gguf_writer.add_file_type(self.ftype)
self.gguf_writer.add_rope_dimension_count(64)
self.gguf_writer.add_add_bos_token(False)
self.gguf_writer.add_rope_freq_base(self.hparams.get("rope_ratio", 10000))
rope_ratio = 10000
if "rope_ratio" in self.hparams:
rope_ratio = rope_ratio * self.hparams["rope_ratio"]
self.gguf_writer.add_rope_freq_base(rope_ratio)
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
del bid # unused