Last active
May 3, 2019 08:55
-
-
Save thomwolf/379ae303ec982f2e8dc713180e1ffbc2 to your computer and use it in GitHub Desktop.
Instantiate OpenAI GPT model and tokenizer from pretrained checkpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pytorch_pretrained_bert import OpenAIGPTDoubleHeadsModel, OpenAIGPTTokenizer | |
model = OpenAIGPTDoubleHeadsModel.from_pretrained('openai-gpt') | |
tokenizer = OpenAIGPTTokenizer.from_pretrained('openai-gpt') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment