Closed doubleiis02 closed 3 years ago
>>> from openchat import OpenChat >>> OpenChat(model="gptneo.small", device="cpu") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/user/miniconda3/lib/python3.7/site-packages/openchat/openchat.py", line 27, in __init__ maxlen=maxlen, File "/Users/user/miniconda3/lib/python3.7/site-packages/openchat/openchat.py", line 72, in create_agent_by_name return GPTNeoAgent(name, device, maxlen) File "/Users/user/miniconda3/lib/python3.7/site-packages/openchat/agents/gptneo.py", line 25, in __init__ tokenizer = AutoTokenizer.from_pretrained(name) File "/Users/user/miniconda3/lib/python3.7/site-packages/transformers/models/auto/tokenization_auto.py", line 362, in from_pretrained config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs) File "/Users/user/miniconda3/lib/python3.7/site-packages/transformers/models/auto/configuration_auto.py", line 371, in from_pretrained config_class = CONFIG_MAPPING[config_dict["model_type"]] KeyError: 'gpt_neo'
Seems like gpt_neo is a valid key in (transformers.models.auto.configuration_auto)[https://huggingface.co/transformers/_modules/transformers/models/auto/configuration_auto.html] though.
gpt_neo
transformers had to be updated from 4.3 to 4.7. To do this do pip uninstall transformers then pip install transformers
pip uninstall transformers
pip install transformers
Seems like
gpt_neo
is a valid key in (transformers.models.auto.configuration_auto)[https://huggingface.co/transformers/_modules/transformers/models/auto/configuration_auto.html] though.