我已经下载了“roberta-large-nli-stsb-mean-tokens”模型,但它开始一次又一次地下载。注意:这与空间无关,机器有空间。这个错误来了...... FileNotFoundError
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('roberta-large-nli-stsb-mean-tokens')
我已经下载了“roberta-large-nli-stsb-mean-tokens”模型,但它开始一次又一次地下载。注意:这与空间无关,机器有空间。这个错误来了...... FileNotFoundError
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('roberta-large-nli-stsb-mean-tokens')
请注意您要询问的异常正上方的异常。它无法保存文件,您的磁盘空间不足。
你试过这个吗?
model = SentenceTransformer('sentence-transformers/roberta-large-nli-stsb-mean-tokens')
如果你想使用从磁盘下载的模型,它看起来像这样:
word_embedding_model = models.Transformer(model_path)
pooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension())
model = SentenceTransformer(modules=[word_embedding_model, pooling_model])