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

Does anyone success to load gpt2 from transformers? Please help me #89

Open
qsuzer opened this issue Dec 15, 2024 · 0 comments
Open

Does anyone success to load gpt2 from transformers? Please help me #89

qsuzer opened this issue Dec 15, 2024 · 0 comments

Comments

@qsuzer
Copy link

qsuzer commented Dec 15, 2024

When I runned the train.py with gpw2 fine-tunning
Here is the error reported:
Traceback (most recent call last):
File "train.py", line 370, in
main()
File "train.py", line 354, in main
dataset = ClipCocoDataset(args.data, prefix_length, normalize_prefix=args.normalize_prefix)
File "train.py", line 51, in init
self.tokenizer = GPT2Tokenizer.from_pretrained(gpt2_type)
File "/data/anaconda3/envs/langwmz/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 2197, in from_pretrained
raise EnvironmentError(
OSError: Can't load tokenizer for 'gpt2'. 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 'gpt2' is the correct path to a directory containing all relevant files for a GPT2Tokenizer tokenizer.

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