Model save
Browse files
README.md
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: google/gemma-7b
|
3 |
+
library_name: transformers
|
4 |
+
model_name: gemma7b-lora-alpaca-11-v1
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
- trl
|
8 |
+
- sft
|
9 |
+
licence: license
|
10 |
+
---
|
11 |
+
|
12 |
+
# Model Card for gemma7b-lora-alpaca-11-v1
|
13 |
+
|
14 |
+
This model is a fine-tuned version of [google/gemma-7b](https://huggingface.co/google/gemma-7b).
|
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="klcsp/gemma7b-lora-alpaca-11-v1", 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 |
+
|
31 |
+
|
32 |
+
This model was trained with SFT.
|
33 |
+
|
34 |
+
### Framework versions
|
35 |
+
|
36 |
+
- TRL: 0.12.1
|
37 |
+
- Transformers: 4.46.2
|
38 |
+
- Pytorch: 2.3.1+cu121
|
39 |
+
- Datasets: 3.1.0
|
40 |
+
- Tokenizers: 0.20.3
|
41 |
+
|
42 |
+
## Citations
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
Cite TRL as:
|
47 |
+
|
48 |
+
```bibtex
|
49 |
+
@misc{vonwerra2022trl,
|
50 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
51 |
+
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},
|
52 |
+
year = 2020,
|
53 |
+
journal = {GitHub repository},
|
54 |
+
publisher = {GitHub},
|
55 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
56 |
+
}
|
57 |
+
```
|
all_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 1.0,
|
3 |
+
"total_flos": 1.997211509414953e+17,
|
4 |
+
"train_loss": 9.48385227727526,
|
5 |
+
"train_runtime": 978.6384,
|
6 |
+
"train_samples": 46801,
|
7 |
+
"train_samples_per_second": 8.555,
|
8 |
+
"train_steps_per_second": 0.134
|
9 |
+
}
|
runs/Nov14_19-08-40_main-ah-train-0-0/events.out.tfevents.1731629881.main-ah-train-0-0.518.0
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:057a075bd958e510f6fe7d351c339565f837cd5dfe863ebfe6cc35cf7cbd9199
|
3 |
+
size 12869
|
train_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 1.0,
|
3 |
+
"total_flos": 1.997211509414953e+17,
|
4 |
+
"train_loss": 9.48385227727526,
|
5 |
+
"train_runtime": 978.6384,
|
6 |
+
"train_samples": 46801,
|
7 |
+
"train_samples_per_second": 8.555,
|
8 |
+
"train_steps_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|
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 1.0,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 131,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 0.007633587786259542,
|
13 |
+
"grad_norm": 177.0470733642578,
|
14 |
+
"learning_rate": 1.4285714285714285e-05,
|
15 |
+
"loss": 47.6977,
|
16 |
+
"step": 1
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"epoch": 0.03816793893129771,
|
20 |
+
"grad_norm": 85.53282928466797,
|
21 |
+
"learning_rate": 7.142857142857143e-05,
|
22 |
+
"loss": 43.3877,
|
23 |
+
"step": 5
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"epoch": 0.07633587786259542,
|
27 |
+
"grad_norm": 22.510236740112305,
|
28 |
+
"learning_rate": 0.00014285714285714287,
|
29 |
+
"loss": 32.4733,
|
30 |
+
"step": 10
|
31 |
+
},
|
32 |
+
{
|
33 |
+
"epoch": 0.11450381679389313,
|
34 |
+
"grad_norm": 12.498698234558105,
|
35 |
+
"learning_rate": 0.00019996395276708856,
|
36 |
+
"loss": 26.351,
|
37 |
+
"step": 15
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"epoch": 0.15267175572519084,
|
41 |
+
"grad_norm": 6.203436374664307,
|
42 |
+
"learning_rate": 0.00019870502626379127,
|
43 |
+
"loss": 23.7881,
|
44 |
+
"step": 20
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 0.19083969465648856,
|
48 |
+
"grad_norm": 9.39486026763916,
|
49 |
+
"learning_rate": 0.00019566964208274254,
|
50 |
+
"loss": 22.3006,
|
51 |
+
"step": 25
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 0.22900763358778625,
|
55 |
+
"grad_norm": 16.644630432128906,
|
56 |
+
"learning_rate": 0.0001909124299802724,
|
57 |
+
"loss": 20.7561,
|
58 |
+
"step": 30
|
59 |
+
},
|
60 |
+
{
|
61 |
+
"epoch": 0.26717557251908397,
|
62 |
+
"grad_norm": 27.660444259643555,
|
63 |
+
"learning_rate": 0.0001845190085543795,
|
64 |
+
"loss": 17.8024,
|
65 |
+
"step": 35
|
66 |
+
},
|
67 |
+
{
|
68 |
+
"epoch": 0.3053435114503817,
|
69 |
+
"grad_norm": 36.0783576965332,
|
70 |
+
"learning_rate": 0.0001766044443118978,
|
71 |
+
"loss": 12.6524,
|
72 |
+
"step": 40
|
73 |
+
},
|
74 |
+
{
|
75 |
+
"epoch": 0.3435114503816794,
|
76 |
+
"grad_norm": 29.33449935913086,
|
77 |
+
"learning_rate": 0.00016731118074275704,
|
78 |
+
"loss": 7.2194,
|
79 |
+
"step": 45
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"epoch": 0.3816793893129771,
|
83 |
+
"grad_norm": 12.601388931274414,
|
84 |
+
"learning_rate": 0.00015680647467311557,
|
85 |
+
"loss": 4.0924,
|
86 |
+
"step": 50
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"epoch": 0.4198473282442748,
|
90 |
+
"grad_norm": 9.754684448242188,
|
91 |
+
"learning_rate": 0.00014527938603696376,
|
92 |
+
"loss": 3.4586,
|
93 |
+
"step": 55
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"epoch": 0.4580152671755725,
|
97 |
+
"grad_norm": 4.331730365753174,
|
98 |
+
"learning_rate": 0.00013293737524320797,
|
99 |
+
"loss": 2.8724,
|
100 |
+
"step": 60
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"epoch": 0.4961832061068702,
|
104 |
+
"grad_norm": 2.0886597633361816,
|
105 |
+
"learning_rate": 0.00012000256937760445,
|
106 |
+
"loss": 2.5936,
|
107 |
+
"step": 65
|
108 |
+
},
|
109 |
+
{
|
110 |
+
"epoch": 0.5343511450381679,
|
111 |
+
"grad_norm": 3.618898391723633,
|
112 |
+
"learning_rate": 0.00010670776443910024,
|
113 |
+
"loss": 2.3879,
|
114 |
+
"step": 70
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"epoch": 0.5725190839694656,
|
118 |
+
"grad_norm": 2.9894490242004395,
|
119 |
+
"learning_rate": 9.329223556089975e-05,
|
120 |
+
"loss": 2.3015,
|
121 |
+
"step": 75
|
122 |
+
},
|
123 |
+
{
|
124 |
+
"epoch": 0.6106870229007634,
|
125 |
+
"grad_norm": 1.006581425666809,
|
126 |
+
"learning_rate": 7.999743062239557e-05,
|
127 |
+
"loss": 2.1923,
|
128 |
+
"step": 80
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"epoch": 0.648854961832061,
|
132 |
+
"grad_norm": 2.1273112297058105,
|
133 |
+
"learning_rate": 6.706262475679205e-05,
|
134 |
+
"loss": 2.1478,
|
135 |
+
"step": 85
|
136 |
+
},
|
137 |
+
{
|
138 |
+
"epoch": 0.6870229007633588,
|
139 |
+
"grad_norm": 1.1924976110458374,
|
140 |
+
"learning_rate": 5.472061396303629e-05,
|
141 |
+
"loss": 2.1165,
|
142 |
+
"step": 90
|
143 |
+
},
|
144 |
+
{
|
145 |
+
"epoch": 0.7251908396946565,
|
146 |
+
"grad_norm": 1.0700017213821411,
|
147 |
+
"learning_rate": 4.3193525326884435e-05,
|
148 |
+
"loss": 2.0777,
|
149 |
+
"step": 95
|
150 |
+
},
|
151 |
+
{
|
152 |
+
"epoch": 0.7633587786259542,
|
153 |
+
"grad_norm": 1.6817359924316406,
|
154 |
+
"learning_rate": 3.268881925724297e-05,
|
155 |
+
"loss": 2.0685,
|
156 |
+
"step": 100
|
157 |
+
},
|
158 |
+
{
|
159 |
+
"epoch": 0.8015267175572519,
|
160 |
+
"grad_norm": 1.3535586595535278,
|
161 |
+
"learning_rate": 2.339555568810221e-05,
|
162 |
+
"loss": 2.0324,
|
163 |
+
"step": 105
|
164 |
+
},
|
165 |
+
{
|
166 |
+
"epoch": 0.8396946564885496,
|
167 |
+
"grad_norm": 2.411160469055176,
|
168 |
+
"learning_rate": 1.5480991445620542e-05,
|
169 |
+
"loss": 2.0028,
|
170 |
+
"step": 110
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"epoch": 0.8778625954198473,
|
174 |
+
"grad_norm": 0.9103240966796875,
|
175 |
+
"learning_rate": 9.08757001972762e-06,
|
176 |
+
"loss": 2.0373,
|
177 |
+
"step": 115
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"epoch": 0.916030534351145,
|
181 |
+
"grad_norm": 2.0278823375701904,
|
182 |
+
"learning_rate": 4.3303579172574885e-06,
|
183 |
+
"loss": 2.0072,
|
184 |
+
"step": 120
|
185 |
+
},
|
186 |
+
{
|
187 |
+
"epoch": 0.9541984732824428,
|
188 |
+
"grad_norm": 1.3454054594039917,
|
189 |
+
"learning_rate": 1.2949737362087156e-06,
|
190 |
+
"loss": 2.0293,
|
191 |
+
"step": 125
|
192 |
+
},
|
193 |
+
{
|
194 |
+
"epoch": 0.9923664122137404,
|
195 |
+
"grad_norm": 1.3187837600708008,
|
196 |
+
"learning_rate": 3.60472329114625e-08,
|
197 |
+
"loss": 2.0339,
|
198 |
+
"step": 130
|
199 |
+
},
|
200 |
+
{
|
201 |
+
"epoch": 1.0,
|
202 |
+
"eval_loss": 2.0268003940582275,
|
203 |
+
"eval_runtime": 27.6818,
|
204 |
+
"eval_samples_per_second": 33.271,
|
205 |
+
"eval_steps_per_second": 1.409,
|
206 |
+
"step": 131
|
207 |
+
},
|
208 |
+
{
|
209 |
+
"epoch": 1.0,
|
210 |
+
"step": 131,
|
211 |
+
"total_flos": 1.997211509414953e+17,
|
212 |
+
"train_loss": 9.48385227727526,
|
213 |
+
"train_runtime": 978.6384,
|
214 |
+
"train_samples_per_second": 8.555,
|
215 |
+
"train_steps_per_second": 0.134
|
216 |
+
}
|
217 |
+
],
|
218 |
+
"logging_steps": 5,
|
219 |
+
"max_steps": 131,
|
220 |
+
"num_input_tokens_seen": 0,
|
221 |
+
"num_train_epochs": 1,
|
222 |
+
"save_steps": 100,
|
223 |
+
"stateful_callbacks": {
|
224 |
+
"TrainerControl": {
|
225 |
+
"args": {
|
226 |
+
"should_epoch_stop": false,
|
227 |
+
"should_evaluate": false,
|
228 |
+
"should_log": false,
|
229 |
+
"should_save": true,
|
230 |
+
"should_training_stop": true
|
231 |
+
},
|
232 |
+
"attributes": {}
|
233 |
+
}
|
234 |
+
},
|
235 |
+
"total_flos": 1.997211509414953e+17,
|
236 |
+
"train_batch_size": 4,
|
237 |
+
"trial_name": null,
|
238 |
+
"trial_params": null
|
239 |
+
}
|