Python package to easily retrain OpenAI's GPT-2 text-generating model on new texts
load_gpt2()
in a fresh session is much faster and uses much less memory when loaded. (for the 117M model, the system will stay under <2 GB RAM which is the critical point for cloud services)start_tf_sess()
now accepts a threads
parameter, which is useful if you know exactly how many threads will be used.Number of CSV tokens was inadvertently doubled. (#25)
.csv
files as an input dataset to finetune
(will parse the CSV as if it was done via encode_csv()
).restore_from='fresh
uses the counter from a previously-trained checkpoint.restore_from='latest
, steps
will now train for the specified amount of steps, instead of the training until the specified number of steps. (#13, #14)include_prefix
parameter to give an option to exclude the input prefix.is_gpt2_downloaded
: Check if the model is downloaded.encode_csv
: Convert a CSV to a format suitable for GPT-2.