Yarn rope for baichuan
This commit is contained in:
parent
e64f4de189
commit
2120195bb1
1 changed files with 2 additions and 1 deletions
3
model.py
3
model.py
|
@ -505,7 +505,8 @@ class BaichuanModel(Model):
|
||||||
|
|
||||||
if self.hparams.get("rope_scaling") is not None and "factor" in self.hparams["rope_scaling"]:
|
if self.hparams.get("rope_scaling") is not None and "factor" in self.hparams["rope_scaling"]:
|
||||||
if self.hparams["rope_scaling"].get("type") == "linear":
|
if self.hparams["rope_scaling"].get("type") == "linear":
|
||||||
self.gguf_writer.add_rope_scale_linear(self.hparams["rope_scaling"]["factor"])
|
self.gguf_writer.add_rope_scaling_type(gguf.RopeScalingType.LINEAR)
|
||||||
|
self.gguf_writer.add_rope_scaling_factor(self.hparams["rope_scaling"]["factor"])
|
||||||
|
|
||||||
def write_tensors(self):
|
def write_tensors(self):
|
||||||
# Collect tensors from generator object
|
# Collect tensors from generator object
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue