-
Notifications
You must be signed in to change notification settings - Fork 301
Add preset for finetuning GPT2 on CNN news #807
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
Add preset for finetuning GPT2 on CNN news #807
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice this seems useful to have. Just a few comments.
"merges_url": "https://storage.googleapis.com/keras-nlp/models/gpt2_extra_large_en/v1/merges.txt", | ||
"merges_hash": "75a37753dd7a28a2c5df80c28bf06e4e", | ||
}, | ||
"gpt2_base_en_news": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the most similar checkpoint we have here is the sst2
dataset for bert. So maybe we should stick to the more precise naming and call this, gpt2_base_en_cnn_dailymail
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving! Let's update our file paths before we merge.
"max_sequence_length": 1024, | ||
}, | ||
"preprocessor_config": {}, | ||
"weights_url": "https://storage.googleapis.com/keras-nlp/models/gpt2_base_en_news/model.h5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update URLs to the new path before we merge this. Also remember to add a /v1/
to the path as above, so we can update our checkpoints in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
With the finetuning, the generated text stops properly at end token, and the writing is better.
To play with the preset, install this branch:
then use the code below: