MaartenGr / MaartenGr/KeyBERT

RepositoryNotFoundError: 401 Client Error

Open
#171 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.2k
Forks
385
PR merge metrics
No merged PRs in 30d

Description

# 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](https://huggingface.co/multi-qa-MiniLM-L6-cos-v1) 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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a source file or test. Start by locating where KeyBERT assigns the default model="all-MiniLM-L6-v2", then verify the referenced Hugging Face model and the reported 401/404 behavior. Done means the default no longer points to an unavailable model and the existing usage path works without the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.