Skip to content

Commit f7d2e91

Browse files
committed
fix: add more cleanup and harmonization
1 parent 3494265 commit f7d2e91

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

convert_hf_to_gguf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2742,10 +2742,10 @@ def set_gguf_parameters(self):
27422742
# ref: https://github.com/state-spaces/mamba/blob/ce59daea3a090d011d6476c6e5b97f6d58ddad8b/mamba_ssm/modules/mamba_simple.py#L58
27432743
dt_rank = self.find_hparam(["time_step_rank", "dt_rank"], optional=True) or -(d_model // -16)
27442744
rms_norm_eps = self.find_hparam(["layer_norm_epsilon", "rms_norm_eps"], optional=True) or 1e-5
2745-
use_b_dt_norm = False
2745+
use_dt_b_c_norm = False
27462746
# For falconmamba we do apply RMS norm on B / DT and C layers
27472747
if self.find_hparam(["model_type"], optional=True) in ("falcon_mamba",):
2748-
use_b_dt_norm = True
2748+
use_dt_b_c_norm = True
27492749
# Fail early for models which don't have a block expansion factor of 2
27502750
assert d_inner == 2 * d_model
27512751

@@ -2759,7 +2759,7 @@ def set_gguf_parameters(self):
27592759
self.gguf_writer.add_ssm_state_size(d_state)
27602760
self.gguf_writer.add_ssm_time_step_rank(dt_rank)
27612761
self.gguf_writer.add_layer_norm_rms_eps(rms_norm_eps)
2762-
self.gguf_writer.add_mamba_dt_b_c_rms(use_b_dt_norm) # For classic Mamba we don't apply rms norm on B / DT layers
2762+
self.gguf_writer.add_mamba_dt_b_c_rms(use_dt_b_c_norm) # For classic Mamba we don't apply rms norm on B / DT layers
27632763
self.gguf_writer.add_file_type(self.ftype)
27642764

27652765
_tok_embd = None

0 commit comments

Comments
 (0)