-1

我已经下载了“roberta-large-nli-stsb-mean-tokens”模型,但它开始一次又一次地下载。注意:这与空间无关,机器有空间。这个错误来了...... FileNotFoundError

from sentence_transformers import SentenceTransformer

model = SentenceTransformer('roberta-large-nli-stsb-mean-tokens')
4

2 回答 2

2

请注意您要询问的异常正上方的异常。它无法保存文件,您的磁盘空间不足。

于 2021-05-06T17:51:50.270 回答
0

你试过这个吗?

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])
于 2021-09-03T13:13:46.070 回答