Replies: 1 comment 1 reply
-
thank you for providing this alternative method. the option within the book wasn't working but Option 1 above did the trick :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In case the official weights from OpenAI ever become unavailable, I wanted to share a few tips for working around the issue.
1) Connection checks
It could be a temporary internet connection issue or a problem with your IP address. I recommend double-checking using a different machine (e.g., Google Colab).
For your convenience, use the following code to download the download script and the GPT-2 weights:
2) Alternative download
In case the above doesn't work, you can download the weights from this alternative link here.
Click on "Download" to download the respective weights.
Then,
gpt2
in the location where you are planning to execute the code for loading the weightsgpt2
folder3) Alternative weight loading
In case you are still having problems, for example, because of a TensorFlow incompatibility (the original weights were stored as TensorFlow tensors. Hence, we need TensorFlow for the weight conversion to PyTorch), consider this alternative way of loading the weights from the Hugging Face Hub.
Beta Was this translation helpful? Give feedback.
All reactions