lewtun HF Staff commited on
Commit
d520680
·
verified ·
1 Parent(s): 2082f79

Model save

Browse files
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen3-0.6B
3
+ library_name: transformers
4
+ model_name: Qwen3-0.6B-SFT-Demo
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for Qwen3-0.6B-SFT-Demo
13
+
14
+ This model is a fine-tuned version of [Qwen/Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B).
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="lewtun/Qwen3-0.6B-SFT-Demo", 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/huggingface/trl-internal/runs/wb3m2gpd)
31
+
32
+
33
+ This model was trained with SFT.
34
+
35
+ ### Framework versions
36
+
37
+ - TRL: 0.19.0
38
+ - Transformers: 4.55.0
39
+ - Pytorch: 2.7.1
40
+ - Datasets: 4.0.0
41
+ - Tokenizers: 0.21.0
42
+
43
+ ## Citations
44
+
45
+
46
+
47
+ Cite TRL as:
48
+
49
+ ```bibtex
50
+ @misc{vonwerra2022trl,
51
+ title = {{TRL: Transformer Reinforcement Learning}},
52
+ 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{\'e}dec},
53
+ year = 2020,
54
+ journal = {GitHub repository},
55
+ publisher = {GitHub},
56
+ howpublished = {\url{https://github.com/huggingface/trl}}
57
+ }
58
+ ```
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 3885629177856.0,
3
+ "train_loss": 1.0970390737056732,
4
+ "train_runtime": 169.3752,
5
+ "train_samples": 1000,
6
+ "train_samples_per_second": 3.773,
7
+ "train_steps_per_second": 0.118
8
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": 151645,
5
+ "pad_token_id": 151643,
6
+ "temperature": 0.6,
7
+ "top_k": 20,
8
+ "top_p": 0.95,
9
+ "transformers_version": "4.55.0"
10
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 3885629177856.0,
3
+ "train_loss": 1.0970390737056732,
4
+ "train_runtime": 169.3752,
5
+ "train_samples": 1000,
6
+ "train_samples_per_second": 3.773,
7
+ "train_steps_per_second": 0.118
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 1.0,
6
+ "eval_steps": 500,
7
+ "global_step": 20,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.05,
14
+ "grad_norm": 10.05365753572626,
15
+ "learning_rate": 0.0,
16
+ "loss": 1.2299,
17
+ "num_tokens": 501787.0,
18
+ "step": 1
19
+ },
20
+ {
21
+ "epoch": 0.1,
22
+ "grad_norm": 9.482123566319494,
23
+ "learning_rate": 5e-05,
24
+ "loss": 1.159,
25
+ "num_tokens": 1002916.0,
26
+ "step": 2
27
+ },
28
+ {
29
+ "epoch": 0.15,
30
+ "grad_norm": 10.259735454268379,
31
+ "learning_rate": 4.9693129326561254e-05,
32
+ "loss": 1.2425,
33
+ "num_tokens": 1480457.0,
34
+ "step": 3
35
+ },
36
+ {
37
+ "epoch": 0.2,
38
+ "grad_norm": 4.821200180996124,
39
+ "learning_rate": 4.878088793826428e-05,
40
+ "loss": 1.2297,
41
+ "num_tokens": 1979742.0,
42
+ "step": 4
43
+ },
44
+ {
45
+ "epoch": 0.25,
46
+ "grad_norm": 3.0070250913052474,
47
+ "learning_rate": 4.7288159402146e-05,
48
+ "loss": 1.1539,
49
+ "num_tokens": 2476229.0,
50
+ "step": 5
51
+ },
52
+ {
53
+ "epoch": 0.3,
54
+ "grad_norm": 2.1754790595930604,
55
+ "learning_rate": 4.5255661461418854e-05,
56
+ "loss": 1.1228,
57
+ "num_tokens": 2960633.0,
58
+ "step": 6
59
+ },
60
+ {
61
+ "epoch": 0.35,
62
+ "grad_norm": 2.0683036864290556,
63
+ "learning_rate": 4.2738835361579175e-05,
64
+ "loss": 1.123,
65
+ "num_tokens": 3454569.0,
66
+ "step": 7
67
+ },
68
+ {
69
+ "epoch": 0.4,
70
+ "grad_norm": 1.389990090772057,
71
+ "learning_rate": 3.980633355775461e-05,
72
+ "loss": 1.0552,
73
+ "num_tokens": 3939834.0,
74
+ "step": 8
75
+ },
76
+ {
77
+ "epoch": 0.45,
78
+ "grad_norm": 1.2125255937365316,
79
+ "learning_rate": 3.6538147054691817e-05,
80
+ "loss": 1.0732,
81
+ "num_tokens": 4433355.0,
82
+ "step": 9
83
+ },
84
+ {
85
+ "epoch": 0.5,
86
+ "grad_norm": 1.117458553102917,
87
+ "learning_rate": 3.3023423460667985e-05,
88
+ "loss": 1.0976,
89
+ "num_tokens": 4935613.0,
90
+ "step": 10
91
+ },
92
+ {
93
+ "epoch": 0.55,
94
+ "grad_norm": 0.9766602249318409,
95
+ "learning_rate": 2.9358035273127483e-05,
96
+ "loss": 1.0256,
97
+ "num_tokens": 5436210.0,
98
+ "step": 11
99
+ },
100
+ {
101
+ "epoch": 0.6,
102
+ "grad_norm": 0.9508884137253885,
103
+ "learning_rate": 2.5641964726872526e-05,
104
+ "loss": 1.036,
105
+ "num_tokens": 5933522.0,
106
+ "step": 12
107
+ },
108
+ {
109
+ "epoch": 0.65,
110
+ "grad_norm": 0.8300153853817842,
111
+ "learning_rate": 2.1976576539332024e-05,
112
+ "loss": 0.9845,
113
+ "num_tokens": 6424027.0,
114
+ "step": 13
115
+ },
116
+ {
117
+ "epoch": 0.7,
118
+ "grad_norm": 0.7487582487742539,
119
+ "learning_rate": 1.8461852945308196e-05,
120
+ "loss": 1.0592,
121
+ "num_tokens": 6924948.0,
122
+ "step": 14
123
+ },
124
+ {
125
+ "epoch": 0.75,
126
+ "grad_norm": 0.7808830523384,
127
+ "learning_rate": 1.5193666442245402e-05,
128
+ "loss": 1.0775,
129
+ "num_tokens": 7411259.0,
130
+ "step": 15
131
+ },
132
+ {
133
+ "epoch": 0.8,
134
+ "grad_norm": 0.7553843244722568,
135
+ "learning_rate": 1.2261164638420832e-05,
136
+ "loss": 1.0404,
137
+ "num_tokens": 7920797.0,
138
+ "step": 16
139
+ },
140
+ {
141
+ "epoch": 0.85,
142
+ "grad_norm": 0.6050895005060064,
143
+ "learning_rate": 9.744338538581147e-06,
144
+ "loss": 1.0315,
145
+ "num_tokens": 8406609.0,
146
+ "step": 17
147
+ },
148
+ {
149
+ "epoch": 0.9,
150
+ "grad_norm": 0.6742447569908884,
151
+ "learning_rate": 7.711840597853998e-06,
152
+ "loss": 1.0589,
153
+ "num_tokens": 8895037.0,
154
+ "step": 18
155
+ },
156
+ {
157
+ "epoch": 0.95,
158
+ "grad_norm": 0.6927947197799839,
159
+ "learning_rate": 6.219112061735721e-06,
160
+ "loss": 1.0777,
161
+ "num_tokens": 9380894.0,
162
+ "step": 19
163
+ },
164
+ {
165
+ "epoch": 1.0,
166
+ "grad_norm": 0.6597120375527342,
167
+ "learning_rate": 5.3068706734387484e-06,
168
+ "loss": 1.0625,
169
+ "num_tokens": 9881666.0,
170
+ "step": 20
171
+ },
172
+ {
173
+ "epoch": 1.0,
174
+ "step": 20,
175
+ "total_flos": 3885629177856.0,
176
+ "train_loss": 1.0970390737056732,
177
+ "train_runtime": 169.3752,
178
+ "train_samples_per_second": 3.773,
179
+ "train_steps_per_second": 0.118
180
+ }
181
+ ],
182
+ "logging_steps": 1,
183
+ "max_steps": 20,
184
+ "num_input_tokens_seen": 0,
185
+ "num_train_epochs": 1,
186
+ "save_steps": 500,
187
+ "stateful_callbacks": {
188
+ "TrainerControl": {
189
+ "args": {
190
+ "should_epoch_stop": false,
191
+ "should_evaluate": false,
192
+ "should_log": false,
193
+ "should_save": true,
194
+ "should_training_stop": true
195
+ },
196
+ "attributes": {}
197
+ }
198
+ },
199
+ "total_flos": 3885629177856.0,
200
+ "train_batch_size": 4,
201
+ "trial_name": null,
202
+ "trial_params": null
203
+ }