-
-
Notifications
You must be signed in to change notification settings - Fork 675
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
Cannot convert to pytorch using huggingface #178
Comments
Not sure how it works in the cli but in python you could do
Where index_path is the tensorflow index checkpoint So something like "checkpoint/run1/model-XXX.index". Docs on loading pretrained models |
I managed to load the model, thanks to your advice.
but
outputs the same input_ids [33, 27705, 18] which made me suspect something was wrong. But I guess I was wrong since I have a finetuned model and finetuning does not change the tokenizer as far as I am aware of. Anyways maybe this helps someone. |
For those of you who seem to get an tensor error, make sure you load the correct config.
|
Hello! Have this been figured out? I tried to follow the same from here with this code
But I'm seeing this error:
Has anybody seen this and know how to fix it? Thanks! |
Typically the GPT2Model.from_pretrained should point to a folder rather then a specific file. Try If that doesn't work print off your file structure in your content directory so we can debug Linux Or give us the code on how you downloaded the model |
Doing the above solved the issue from before but raised a new issue I can't seem to find much information about this error, just 2 so discussions that mention memory not being enough or corrupted weight files. I didn't see Colab crashing and I'm unsure how to check for corrupted weight files. I could retrain and try with those files instead. Have you seen that issue before? As to how I downloaded the model, I just used what was provided in the gpt2-simple colab.
Followed by downloading it to my local computer. So there is a chance something got corrupted along the way but I figured I'd ask anyways just in case. Many thanks for all the help so far! |
Huggingface requires "/path/to/gpt2/pretrained/weights" and I just don't understand what path should I enter here. It's not like I haven't tried everything - checkpoint, the folder inside it and even the checkpoint itself. But it just doesn't work.
Any help will be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: