Update _utils.py
This commit is contained in:
parent
758f921ff2
commit
08e8ecf6f1
1 changed files with 6 additions and 1 deletions
|
|
@ -297,6 +297,12 @@ def patch_mistral_nemo_config(config):
|
|||
return config
|
||||
pass
|
||||
|
||||
try:
|
||||
# Some Config files use layer_type_validation
|
||||
# for eg Gemma-2, so we must import it to stop errors.
|
||||
from transformers.configuration_utils import layer_type_validation
|
||||
except:
|
||||
pass
|
||||
from transformers import __version__ as transformers_version
|
||||
from transformers import PretrainedConfig
|
||||
model_architectures = ["llama", "mistral", "gemma", "gemma2", "qwen2", "granite", "qwen3", "qwen3_moe", "falcon_h1"]
|
||||
|
|
@ -322,7 +328,6 @@ for model_name in model_architectures:
|
|||
r"\n self.rope_scaling = rope_scaling\n",
|
||||
config,
|
||||
)
|
||||
print(config)
|
||||
|
||||
# Just for Mistral Nemo
|
||||
if model_name == "mistral":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue