Migrate model card from transformers-repo
Browse filesRead announcement at https://discuss.huggingface.co/t/announcement-all-model-cards-will-be-migrated-to-hf-co-model-repos/2755
Original file history: https://github.com/huggingface/transformers/commits/master/model_cards/mrm8488/gpt2-imdb-neg/README.md
README.md
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# GPT2-IMDB-neg (LM + RL) 🎞😡✍
|
2 |
+
|
3 |
+
All credits to [@lvwerra](https://twitter.com/lvwerra)
|
4 |
+
|
5 |
+
## What is it?
|
6 |
+
A small GPT2 (`lvwerra/gpt2-imdb`) language model fine-tuned to produce **negative** movie reviews based the [IMDB dataset](https://www.kaggle.com/lakshmi25npathi/imdb-dataset-of-50k-movie-reviews). The model is trained with rewards from a BERT sentiment classifier (`lvwerra/gpt2-imdb`) via **PPO**.
|
7 |
+
|
8 |
+
## Why?
|
9 |
+
I wanted to reproduce the experiment [lvwerra/gpt2-imdb-pos](https://huggingface.co/lvwerra/gpt2-imdb-pos) but for generating **negative** movie reviews.
|
10 |
+
|
11 |
+
## Training setting
|
12 |
+
The model was trained for `100` optimisation steps with a batch size of `256` which corresponds to `25600` training samples. The full experiment setup (for positive samples) in [trl repo](https://lvwerra.github.io/trl/04-gpt2-sentiment-ppo-training/).
|
13 |
+
|
14 |
+
## Examples
|
15 |
+
A few examples of the model response to a query before and after optimisation:
|
16 |
+
|
17 |
+
| query | response (before) | response (after) | rewards (before) | rewards (after) |
|
18 |
+
|-------|-------------------|------------------|------------------|-----------------|
|
19 |
+
|This movie is a fine | attempt as far as live action is concerned, n...|example of how bad Hollywood in theatrics pla...| 2.118391 | -3.31625|
|
20 |
+
|I have watched 3 episodes |with this guy and he is such a talented actor...| but the show is just plain awful and there ne...| 2.681171| -4.512792|
|
21 |
+
|We know that firefighters and| police officers are forced to become populari...| other chains have going to get this disaster ...| 1.367811| -3.34017|
|
22 |
+
|
23 |
+
## Training logs and metrics <img src="https://gblobscdn.gitbook.com/spaces%2F-Lqya5RvLedGEWPhtkjU%2Favatar.png?alt=media" width="25" height="25">
|
24 |
+
Watch the whole training logs and metrics on [W&B](https://app.wandb.ai/mrm8488/gpt2-sentiment-negative?workspace=user-mrm8488)
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
> Created by [Manuel Romero/@mrm8488](https://twitter.com/mrm8488)
|
29 |
+
|
30 |
+
> Made with <span style="color: #e25555;">♥</span> in Spain
|