Skip to content

Commit 941146b

Browse files
authored
convert : fix block_ff_dim retrieval for lfm2 (#21508)
1 parent 482d862 commit 941146b

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

convert_hf_to_gguf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11818,10 +11818,8 @@ class LFM2Model(TextModel):
1181811818
model_arch = gguf.MODEL_ARCH.LFM2
1181911819

1182011820
def _add_feed_forward_length(self):
11821-
ff_dim = self.hparams["block_ff_dim"]
11822-
11821+
ff_dim = self.find_hparam(["block_ff_dim", "intermediate_size"])
1182311822
auto_adjust_ff_dim = self.hparams["block_auto_adjust_ff_dim"]
11824-
ff_dim = self.hparams["block_ff_dim"]
1182511823
ffn_dim_multiplier = self.hparams["block_ffn_dim_multiplier"]
1182611824
multiple_of = self.hparams["block_multiple_of"]
1182711825

0 commit comments

Comments
 (0)