我只是想测试facebook/bart-largemnli模型,但它不起作用,我不知道如何修复它。
守则:
from transformers import pipeline
classifier = pipeline(“zero-shot-classification”, model=“facebook/bart-large-mnli”)错误消息:
ValueError : Could not load model facebook/bart-large-mnli with any of the following classes: (<class ‘transformers.models.auto.modeling_tf_auto.TFAutoModelForSequenceClassification’>,)例如,classifier = pipeline(task="sentiment-analysis", model="roberta-large-mnli")可以工作。
我能做什么?我已经清理了磁盘空间。
非常感谢你!
发布于 2022-04-22 10:51:12
目前,facebook/bart-large-mnli 不提供是一款TensorFlow车型。要将PyTorch模型加载到管道中,请确保安装了PyTorch:
pip install torch然后...and重新运行您的代码。
发布于 2022-04-02 15:04:42
在拥抱面上,并不是所有的模型都支持TensorFlow。这个模型和(显然)所有其他的零镜头管道模型只支持PyTorch。
在“拥抱面模型选择”页面上,您可以在“库”下切换选项,以将模型选择限制在正在使用的库中。
https://stackoverflow.com/questions/71225165
复制相似问题