KeyBERT icon indicating copy to clipboard operation
KeyBERT copied to clipboard

RepositoryNotFoundError: 401 Client Error

Open yudhiesh opened this issue 1 year ago • 1 comments

Issue

The default value of model="all-MiniLM-L6-v2" throws an error due to the model not being found on HuggingFace:

RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-64599ec7-55ee4d860d9461c170c5b5d6)

Repository Not Found for url: https://huggingface.co/multi-qa-MiniLM-L6-cos-v1/resolve/main/config.json.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.

Link to the model on HuggingFace which throws a 404 Error.

Workaround

I switched over to another model that was still available on HuggingFace like so:

from transformers.pipelines import pipeline
from keybert import KeyBERT

hf_model = pipeline("feature-extraction", model="DataikuNLP/paraphrase-albert-small-v2")
kw_model = KeyBERT(model=hf_model)

Reference

Others are facing the same issue as per this thread https://github.com/UKPLab/sentence-transformers/issues/1915

yudhiesh avatar May 09 '23 01:05 yudhiesh

Thanks for sharing this! You can also find more information at their Twitter handle. You could also see if you have any of the models cached and load them locally but I am quite sure HuggingFace is working hard on a fix seeing the large dependencies of OSS on sentence-transformers.

MaartenGr avatar May 09 '23 08:05 MaartenGr