Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authorizationRequired error when calling AutoTokenizer.from #36

Open
hassanzadeh opened this issue Jan 11, 2024 · 4 comments
Open

authorizationRequired error when calling AutoTokenizer.from #36

hassanzadeh opened this issue Jan 11, 2024 · 4 comments

Comments

@hassanzadeh
Copy link

Hey Guys,
I'm trying to load a tokenizer whose files are stored in Application Support directory, but I get this exception: authorizationRequired when calling:
let tokenizer = try await AutoTokenizer.from(pretrained: modelPath)

What am I missing?

@pcuenca
Copy link
Member

pcuenca commented Jan 12, 2024

Hi @hassanzadeh! What does modelPath contain? Is it a private or gated repo?

@hassanzadeh
Copy link
Author

Hi @pcuenca
Thanks for your response it’s the local path on my macOS where model is downloaded.

@pcuenca
Copy link
Member

pcuenca commented Jan 17, 2024

This is a bug then, will take a look soon! Thanks for reporting! 🙌

@xcphantomxc
Copy link

I also encountered this problem, but I solved it by hardcoding my hf account Token on the hfToken attribute of the HubApi file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants