new transformers: ValueError: 'cohere' is already used by a Transformers config, pick another name.
#36
by
pseudotensor
- opened
After your recent changes, transformers 4.38.2 fails with:
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/h2ogptvision_gradio4/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1128, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
File "/home/ubuntu/miniconda3/envs/h2ogptvision_gradio4/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 825, in __getitem__
raise KeyError(key)
KeyError: 'cohere'
In upgrading to latest transformers, I now get another error:
File "/home/ubuntu/.cache/huggingface/modules/transformers_modules/CohereForAI/c4ai-command-r-v01/9c33b0976099d0f406f0d007613676fe42b78e3b/tokenization_cohere_fast.py", line 31, in <module>
from .configuration_cohere import CohereConfig
File "/home/ubuntu/.cache/huggingface/modules/transformers_modules/CohereForAI/c4ai-command-r-v01/9c33b0976099d0f406f0d007613676fe42b78e3b/configuration_cohere.py", line 159, in <module>
AutoConfig.register("cohere", CohereConfig)
File "/home/ubuntu/miniconda3/envs/h2ogptvision_gradio4/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1191, in register
CONFIG_MAPPING.register(model_type, config, exist_ok=exist_ok)
File "/home/ubuntu/miniconda3/envs/h2ogptvision_gradio4/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 885, in register
raise ValueError(f"'{key}' is already used by a Transformers config, pick another name.")
ValueError: 'cohere' is already used by a Transformers config, pick another name.
Can you try with transformers 3.9.1 after cleaning the HF cache but without using `trust_remote_code?
I'm getting the same issue with 4.39.1 (which is what the example says I should be using)
ahmetustun
changed discussion status to
closed