Roaoch commited on
Commit
0e9eab5
·
verified ·
1 Parent(s): fb06de1

Create README.md

Browse files

This text generator is based on OpenAI GPT2 model from HuggingFace
Base model went through two step of learning
## First - Finetining of base model
On this step model is finetuned on dataset of single sentence from the texts of Dostovesky F.M.
Training parameters:
* Epoch = 10
* Learning Rate = 1e-3
* Optimizer = AdamW
* Scheduler = OneCycleLR
* Training env = PyTorch

![image.png](https://cdn-uploads.huggingface.co/production/uploads/645ced0dce72244df7b0f6d2/Mvp2ouBpVkK8t4CfuBvx7.png)

![image.png](https://cdn-uploads.huggingface.co/production/uploads/645ced0dce72244df7b0f6d2/_AiPUPQOi5-raYSyZNohh.png)

## Second - RL
On this step finetuned model went trough reinforcement learning pipline with TRL library.
Training parameters:
* Epoch = 30
* Trainer = PPO
* Query texts = first 100 texts from dataset, trimmed by first 3 words
* Reward = score from [binary classifier](https://huggingface.co/Roaoch/CyberClassic-Discriminator) multiplied by 10

![image.png](https://cdn-uploads.huggingface.co/production/uploads/645ced0dce72244df7b0f6d2/Mv_8ZAfml6tPcdXBOXcQG.png)


![image.png](https://cdn-uploads.huggingface.co/production/uploads/645ced0dce72244df7b0f6d2/ZbeI0Tq6eSy-_Tl_gK-sz.png)

Files changed (1) hide show
  1. README.md +11 -0
README.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - ru
5
+ metrics:
6
+ - perplexity
7
+ - bleu
8
+ - rouge
9
+ library_name: transformers
10
+ pipeline_tag: text-generation
11
+ ---