sravanthib commited on
Commit
afc6261
·
verified ·
1 Parent(s): cc26bd8

Model save

Browse files
README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: sai-lakkshmii/Finetuned-llama-8b_SFT_step5000
3
+ library_name: transformers
4
+ model_name: Final-try-Llama3.1-8b-instruct-RL
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - grpo
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for Final-try-Llama3.1-8b-instruct-RL
13
+
14
+ This model is a fine-tuned version of [sai-lakkshmii/Finetuned-llama-8b_SFT_step5000](https://huggingface.co/sai-lakkshmii/Finetuned-llama-8b_SFT_step5000).
15
+ It has been trained using [TRL](https://github.com/huggingface/trl).
16
+
17
+ ## Quick start
18
+
19
+ ```python
20
+ from transformers import pipeline
21
+
22
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
+ generator = pipeline("text-generation", model="sravanthib/Final-try-Llama3.1-8b-instruct-RL", device="cuda")
24
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
+ print(output["generated_text"])
26
+ ```
27
+
28
+ ## Training procedure
29
+
30
+ [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/golden-goose/huggingface/runs/qvf6i4dv)
31
+
32
+
33
+ This model was trained with GRPO, a method introduced in [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://huggingface.co/papers/2402.03300).
34
+
35
+ ### Framework versions
36
+
37
+ - TRL: 0.16.0.dev0
38
+ - Transformers: 4.49.0
39
+ - Pytorch: 2.5.1
40
+ - Datasets: 3.3.2
41
+ - Tokenizers: 0.21.0
42
+
43
+ ## Citations
44
+
45
+ Cite GRPO as:
46
+
47
+ ```bibtex
48
+ @article{zhihong2024deepseekmath,
49
+ title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
50
+ author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
51
+ year = 2024,
52
+ eprint = {arXiv:2402.03300},
53
+ }
54
+
55
+ ```
56
+
57
+ Cite TRL as:
58
+
59
+ ```bibtex
60
+ @misc{vonwerra2022trl,
61
+ title = {{TRL: Transformer Reinforcement Learning}},
62
+ author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
63
+ year = 2020,
64
+ journal = {GitHub repository},
65
+ publisher = {GitHub},
66
+ howpublished = {\url{https://github.com/huggingface/trl}}
67
+ }
68
+ ```
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 0.0,
3
+ "train_loss": -0.0886706564703892,
4
+ "train_runtime": 9867.8585,
5
+ "train_samples": 7500,
6
+ "train_samples_per_second": 0.76,
7
+ "train_steps_per_second": 0.006
8
+ }
generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 128000,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 128001,
6
+ 128008,
7
+ 128009
8
+ ],
9
+ "temperature": 0.6,
10
+ "top_p": 0.9,
11
+ "transformers_version": "4.49.0"
12
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 0.0,
3
+ "train_loss": -0.0886706564703892,
4
+ "train_runtime": 9867.8585,
5
+ "train_samples": 7500,
6
+ "train_samples_per_second": 0.76,
7
+ "train_steps_per_second": 0.006
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 0.9893390191897654,
5
+ "eval_steps": 100,
6
+ "global_step": 58,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "clip_ratio": 0.0,
13
+ "completion_length": 465.1015853881836,
14
+ "epoch": 0.017057569296375266,
15
+ "grad_norm": 0.46851029992103577,
16
+ "kl": 0.0,
17
+ "learning_rate": 5e-07,
18
+ "loss": 0.0311,
19
+ "reward": 0.3024553693830967,
20
+ "reward_std": 0.2792186979204416,
21
+ "rewards/accuracy_reward": 0.3024553693830967,
22
+ "rewards/format_reward": 0.0,
23
+ "step": 1
24
+ },
25
+ {
26
+ "clip_ratio": 0.0,
27
+ "completion_length": 479.50532627105713,
28
+ "epoch": 0.08528784648187633,
29
+ "grad_norm": 4.368417263031006,
30
+ "kl": 0.011774897575378418,
31
+ "learning_rate": 2.5e-06,
32
+ "loss": 0.0178,
33
+ "reward": 0.3108259071595967,
34
+ "reward_std": 0.282580086030066,
35
+ "rewards/accuracy_reward": 0.3108259071595967,
36
+ "rewards/format_reward": 0.0,
37
+ "step": 5
38
+ },
39
+ {
40
+ "clip_ratio": 0.0,
41
+ "completion_length": 493.8828353881836,
42
+ "epoch": 0.17057569296375266,
43
+ "grad_norm": 0.43728089332580566,
44
+ "kl": 0.0563232421875,
45
+ "learning_rate": 2.956412726139078e-06,
46
+ "loss": 0.0367,
47
+ "reward": 0.5104910925030708,
48
+ "reward_std": 0.28240326046943665,
49
+ "rewards/accuracy_reward": 0.5104910925030708,
50
+ "rewards/format_reward": 0.0,
51
+ "step": 10
52
+ },
53
+ {
54
+ "clip_ratio": 0.0,
55
+ "completion_length": 539.2189956665039,
56
+ "epoch": 0.255863539445629,
57
+ "grad_norm": 3.359680652618408,
58
+ "kl": 0.243646240234375,
59
+ "learning_rate": 2.7836719084521715e-06,
60
+ "loss": 0.0724,
61
+ "reward": 0.44196430668234826,
62
+ "reward_std": 0.2963893756270409,
63
+ "rewards/accuracy_reward": 0.44196430668234826,
64
+ "rewards/format_reward": 0.0,
65
+ "step": 15
66
+ },
67
+ {
68
+ "clip_ratio": 0.0,
69
+ "completion_length": 636.4513717651367,
70
+ "epoch": 0.3411513859275053,
71
+ "grad_norm": 2.16961669921875,
72
+ "kl": 0.4969482421875,
73
+ "learning_rate": 2.4946839873611927e-06,
74
+ "loss": 0.1423,
75
+ "reward": 0.31763394474983214,
76
+ "reward_std": 0.28798535354435445,
77
+ "rewards/accuracy_reward": 0.31763394474983214,
78
+ "rewards/format_reward": 0.0,
79
+ "step": 20
80
+ },
81
+ {
82
+ "clip_ratio": 0.0,
83
+ "completion_length": 533.4765838623047,
84
+ "epoch": 0.42643923240938164,
85
+ "grad_norm": 8.851544380187988,
86
+ "kl": 0.75478515625,
87
+ "learning_rate": 2.1156192081791355e-06,
88
+ "loss": 0.0974,
89
+ "reward": 0.3165178719907999,
90
+ "reward_std": 0.2697611689567566,
91
+ "rewards/accuracy_reward": 0.3165178719907999,
92
+ "rewards/format_reward": 0.0,
93
+ "step": 25
94
+ },
95
+ {
96
+ "clip_ratio": 0.0,
97
+ "completion_length": 486.86542587280275,
98
+ "epoch": 0.511727078891258,
99
+ "grad_norm": 1.5197241306304932,
100
+ "kl": 0.635107421875,
101
+ "learning_rate": 1.6808050203829845e-06,
102
+ "loss": -0.0795,
103
+ "reward": 0.37879465594887735,
104
+ "reward_std": 0.28313881531357765,
105
+ "rewards/accuracy_reward": 0.37879465594887735,
106
+ "rewards/format_reward": 0.0,
107
+ "step": 30
108
+ },
109
+ {
110
+ "clip_ratio": 0.0,
111
+ "completion_length": 651.0556098937989,
112
+ "epoch": 0.5970149253731343,
113
+ "grad_norm": 251.43299865722656,
114
+ "kl": 1.340673828125,
115
+ "learning_rate": 1.2296174432791415e-06,
116
+ "loss": -0.1861,
117
+ "reward": 0.35892858989536763,
118
+ "reward_std": 0.2909108128398657,
119
+ "rewards/accuracy_reward": 0.35892858989536763,
120
+ "rewards/format_reward": 0.0,
121
+ "step": 35
122
+ },
123
+ {
124
+ "clip_ratio": 0.0,
125
+ "completion_length": 531.6004737854004,
126
+ "epoch": 0.6823027718550106,
127
+ "grad_norm": 0.8638615012168884,
128
+ "kl": 1.24169921875,
129
+ "learning_rate": 8.029152419343472e-07,
130
+ "loss": -0.2823,
131
+ "reward": 0.2919642984867096,
132
+ "reward_std": 0.30123363584280016,
133
+ "rewards/accuracy_reward": 0.2919642984867096,
134
+ "rewards/format_reward": 0.0,
135
+ "step": 40
136
+ },
137
+ {
138
+ "clip_ratio": 0.0,
139
+ "completion_length": 535.4821655273438,
140
+ "epoch": 0.767590618336887,
141
+ "grad_norm": 0.8260723948478699,
142
+ "kl": 1.6283203125,
143
+ "learning_rate": 4.3933982822017883e-07,
144
+ "loss": -0.2886,
145
+ "reward": 0.2575892962515354,
146
+ "reward_std": 0.28938031755387783,
147
+ "rewards/accuracy_reward": 0.2575892962515354,
148
+ "rewards/format_reward": 0.0,
149
+ "step": 45
150
+ },
151
+ {
152
+ "clip_ratio": 0.0,
153
+ "completion_length": 574.5600708007812,
154
+ "epoch": 0.8528784648187633,
155
+ "grad_norm": 0.8665443658828735,
156
+ "kl": 1.6455078125,
157
+ "learning_rate": 1.718159615201853e-07,
158
+ "loss": -0.2452,
159
+ "reward": 0.2620535843074322,
160
+ "reward_std": 0.2727984722703695,
161
+ "rewards/accuracy_reward": 0.2620535843074322,
162
+ "rewards/format_reward": 0.0,
163
+ "step": 50
164
+ },
165
+ {
166
+ "clip_ratio": 0.0,
167
+ "completion_length": 633.8752510070801,
168
+ "epoch": 0.9381663113006397,
169
+ "grad_norm": 0.7306084036827087,
170
+ "kl": 1.2185546875,
171
+ "learning_rate": 2.4570139579284723e-08,
172
+ "loss": -0.1955,
173
+ "reward": 0.2723214395344257,
174
+ "reward_std": 0.2689169988036156,
175
+ "rewards/accuracy_reward": 0.2723214395344257,
176
+ "rewards/format_reward": 0.0,
177
+ "step": 55
178
+ },
179
+ {
180
+ "clip_ratio": 0.0,
181
+ "completion_length": 655.2425740559896,
182
+ "epoch": 0.9893390191897654,
183
+ "kl": 1.1414388020833333,
184
+ "reward": 0.2812500136593978,
185
+ "reward_std": 0.2797961321969827,
186
+ "rewards/accuracy_reward": 0.2812500136593978,
187
+ "rewards/format_reward": 0.0,
188
+ "step": 58,
189
+ "total_flos": 0.0,
190
+ "train_loss": -0.0886706564703892,
191
+ "train_runtime": 9867.8585,
192
+ "train_samples_per_second": 0.76,
193
+ "train_steps_per_second": 0.006
194
+ }
195
+ ],
196
+ "logging_steps": 5,
197
+ "max_steps": 58,
198
+ "num_input_tokens_seen": 0,
199
+ "num_train_epochs": 1,
200
+ "save_steps": 10,
201
+ "stateful_callbacks": {
202
+ "TrainerControl": {
203
+ "args": {
204
+ "should_epoch_stop": false,
205
+ "should_evaluate": false,
206
+ "should_log": false,
207
+ "should_save": true,
208
+ "should_training_stop": true
209
+ },
210
+ "attributes": {}
211
+ }
212
+ },
213
+ "total_flos": 0.0,
214
+ "train_batch_size": 16,
215
+ "trial_name": null,
216
+ "trial_params": null
217
+ }