ml-explore / ml-explore/mlx-examples

GatedRepoError: 401 Client Error; "You must be authenticated to access it."

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

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

Open the contributing guide

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.