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

OSError: Can't load tokenizer for 'bert-base-uncased' #39

Open
orzgugu opened this issue Oct 15, 2024 · 1 comment
Open

OSError: Can't load tokenizer for 'bert-base-uncased' #39

orzgugu opened this issue Oct 15, 2024 · 1 comment

Comments

@orzgugu
Copy link

orzgugu commented Oct 15, 2024

Hello!
I ran python minigpt4_video_inference.py and reported an error File "/ home/pai/envs/goldfish/lib/python3.9 / site - packages/transformers/tokenization_utils_base. Py", line 2013, in from_pretrained
raise EnvironmentError(
OSError: Can't load tokenizer for 'bert-base-uncased'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'bert-base-uncased' is the correct path to a directory containing all relevant files for a BertTokenizer tokenizer.
I refer to the methods on the Internet, and some say it is caused by the version of the transformers package, but I used the latest Transformers package or transformers==4.37.2 to solve this problem.
Looking forward to your reply and help!

@orzgugu
Copy link
Author

orzgugu commented Oct 16, 2024

Already solved, download the model and replace the path

你好! 我运行python minigpt4_video_inference.py时报错File "/home/pai/envs/goldfish/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 2013, in from_pretrained raise EnvironmentError( OSError: Can't load tokenizer for 'bert-base-uncased'. If you were trying to load it from ' https://huggingface.co/models ', make sure you don't have a local directory with the same name. Others, make sure 'bert-base-uncased' is the correct path to a directory including all related files for a BertTokenizer tokenizer. 我参考了网上的方法,有的说是transformers包版本导致的,不过我用了最新的Transformers包或者transformers==4.37.2才解决了这个问题。 期待你的回复和帮助!

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

1 participant