CLIP_prefix_caption icon indicating copy to clipboard operation
CLIP_prefix_caption copied to clipboard

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

Open qsuzer opened this issue 1 year ago • 0 comments

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.

qsuzer avatar Dec 15 '24 05:12 qsuzer