fix rope ratio to solve incorrect answers
This commit is contained in:
parent
ed54a65d10
commit
5b760f26a4
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue