Error loading the pipeline, KeyError 'mistral'
#5
by
lbaldesi
- opened
Hi,
I am new to HuggingFace (landed here because of the blog entry on HN). When I run the transformers code I get an error:
>>> from transformers import pipeline
>>>
>>> pipe = pipeline("text-generation", model="mistralai/Mistral-7B-v0.1")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/lib/python3.11/site-packages/transformers/pipelines/__init__.py", line 741, in pipeline
config = AutoConfig.from_pretrained(model, _from_pipeline=task, **hub_kwargs, **model_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 1039, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 734, in __getitem__
raise KeyError(key)
KeyError: 'mistral'
What am I doing wrong?
Thanks,
Luca
I think it's not yet in the main library. Try this in the meantime:
pip install git+https://github.com/huggingface/transformers.git
You are right, thanks!
lbaldesi
changed discussion status to
closed