Deprecation message.

This commit is contained in:
Nicolas Patry 2024-10-16 18:50:33 +02:00
parent d4d4321814
commit bbbd9a6dd2
No known key found for this signature in database
GPG Key ID: D2920555C90F704C

View File

@ -555,7 +555,7 @@ def get_model(
# TODO: fix how we determine model type for Mamba
if "ssm_cfg" in config_dict:
# *only happens in Mamba case
model_type = "mamba"
model_type = "ssm"
else:
raise RuntimeError(
f"Could not determine model type for {model_id} revision {revision}"
@ -624,6 +624,10 @@ def get_model(
dtype=dtype,
trust_remote_code=trust_remote_code,
)
elif model_type == "ssm":
raise RuntimeError(
"`ssm` models have been deprecated in favor of `mamba` models, which follow standard HF formats. Check out a list here: https://huggingface.co/models?search=mamba%20-hf"
)
if model_id.startswith("facebook/galactica"):
return CausalLM(