-
Notifications
You must be signed in to change notification settings - Fork 202
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
Formatting training text files for discriminator training script #33
Comments
Hi, yes, correct, for larger GPT2 need to retrain the discriminator. The
so we use eval(d) to convert the string to a dictionary. Then we used I hope this help. let me know if you have other doubts. Andrea |
Hi Andrea, Thank you for the response! To clarify, does that mean that an example is counted as a positive example (i.e. toxic) if any one of the toxicity subcategories ( Alisa |
Hi, in our experiment the first, meaning: if any one of the toxicity subcategories (toxic, severe_toxic, obscene, threat, insult, identity_hate) is 1 then we consider it toxic. I think it is possible thou to train the discriminator for a specific subcategory 😊 Andrea |
Hi Andrea, Thank you for your help!! I have trained a discriminator with a larger embedding size compatible with GPT2-large, and am able to use this discriminator to steer generations from GPT2-large. Would you mind double-checking that I trained the discriminator in the right way? I used the command
Crucially, I used Thanks again! Alisa |
Hi Alisa, to the best of my knowledge, yes. Maybe @dathath can confirm. In general, I cannot guarantee that these hyperparameters work best also for GPT2-large. The best way is to check a bit the generated text and the accuracy of the discriminator. Sometimes, we experienced that a strong discriminator (high accuracy in the test set) was suboptimal in the generation. For your paper, I guess using this setting should be okay 😊 I hope this helps. Andrea |
Hi there, I hope to try discriminator-based PPLM with different sizes of GPT2. To do this, I believe we need to retrain the discriminator with a different embedding size using the
paper_code/gpt2tunediscrim.py
script. (Please correct me if I'm wrong here!) However, I am a little unclear on how the training text files should be formatted to be compatible with this code. It looks like each line intoxic_train.txt
is processed witheval(d)
to become a dictionary or json-like object with the keys'text'
and'label'
. Here is the excerpt of code I am looking at:Is there any chance you can share your training text files (e.g.
datasets/toxic/toxic_train.txt
) or the script you used to create the text files from the original datasets? Thank you!The text was updated successfully, but these errors were encountered: