ml-explore / ml-explore/mlx-examples
GatedRepoError: 401 Client Error; "You must be authenticated to access it."
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
when i run the code below
model,tokenizer = load("mistralai/Mistral-7B-Instruct-v0.2")
error:
GatedRepoError: 401 Client Error. (Request ID: Root=1-66389f5d-0f09a9387397c642253a3cab;07f44087-7a0e-4f26-a444-29193404cbc8)
Cannot access gated repo for url https://huggingface.co/api/models/mistralai/Mistral-7B-Instruct-v0.2/revision/main.
Access to model mistralai/Mistral-7B-Instruct-v0.2 is restricted. You must be authenticated to access it.
I add the parameter named "token" in the "snapshot_download" function in "utils.py", then the error is gone.
should we expose the "token" parameter in the "load" function?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in utils.py by tracing how load calls snapshot_download and how the model identifier is passed. Expose the token through load so authenticated access to the gated Mistral model works, then verify the existing unauthenticated path remains usable and the reported error is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100