Update convert_hf_to_gguf.py

Co-authored-by: compilade <git@compilade.net>
This commit is contained in:
Younes Belkada 2024-08-18 18:15:40 +04:00 committed by GitHub
parent 184a4c676f
commit 349426546b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2744,7 +2744,7 @@ class MambaModel(Model):
rms_norm_eps = self.find_hparam(["layer_norm_epsilon", "rms_norm_eps"], optional=True) or 1e-5
use_b_dt_norm = False
# For falconmamba we do apply RMS norm on B / DT and C layers
if self.find_hparam(["model_type"]) in ["falcon_mamba"]:
if self.find_hparam(["model_type"], optional=True) in ("falcon_mamba",):
use_b_dt_norm = True
# Fail early for models which don't have a block expansion factor of 2
assert d_inner == 2 * d_model