convert : BailingMoE : avoid setting rope_dim to 0 (#12678)

This commit is contained in:
Sigbjørn Skjæret 2025-03-31 23:09:48 +02:00 committed by GitHub
parent c80a7759da
commit 35782aeedb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5146,7 +5146,7 @@ class BailingMoeModel(Model):
def set_gguf_parameters(self):
super().set_gguf_parameters()
hparams = self.hparams
if "head_dim" in hparams:
if hparams.get("head_dim"):
rope_dim = hparams["head_dim"]
else:
rope_dim = hparams["hidden_size"] // hparams["num_attention_heads"]