alpindale commited on
Commit
f8ecdef
1 Parent(s): 0fcc1d2

added special tokens

Browse files
README.md DELETED
@@ -1,111 +0,0 @@
1
- ---
2
- license: apache-2.0
3
- language:
4
- - en
5
- ---
6
- <h1 style="text-align: center">Metharme 1.3B</h1>
7
- <h2 style="text-align: center">An instruction-tuned Pythia biased towards fiction writing and conversation.</h2>
8
-
9
- ## Model Details
10
-
11
- Metharme 1.3B is an instruct model based on EleutherAI's [Pythia 1.4B Deduped](https://huggingface.co/EleutherAI/pythia-1.4b-deduped).
12
-
13
- This is an experiment to try and get a model that is usable for conversation, roleplaying and storywriting, but which can be guided using natural language like other instruct models. See the [prompting](#prompting) section below for examples.
14
-
15
- It was trained by doing supervised fine-tuning over a mixture of regular instruction data alongside roleplay, fictional stories and conversations with synthetically generated instructions attached.
16
-
17
- ## Prompting
18
-
19
- The current model version has been trained on prompts using three different roles, which are denoted by the following tokens: `<|system|>`, `<|user|>` and `<|model|>`.
20
-
21
- The `<|system|>` prompt can be used to inject out-of-channel information behind the scenes, while the `<|user|>` prompt should be used to indicate user input. The `<|model|>` token should then be used to indicate that the model should generate a response. These tokens can happen multiple times and be chained up to form a conversation history.
22
-
23
- ### Prompting example
24
-
25
- Here's a concrete example. Let's say you have the following system prompt:
26
-
27
- > This is a text adventure game. Describe the scenario to the user and give him three options to pick from on each turn.
28
-
29
- And the user has typed in the following message:
30
-
31
- > Start!
32
-
33
- To perform inference against the model, the prompt should be formatted like this:
34
-
35
- ```
36
- <|system|>This is a text adventure game. Describe the scenario to the user and give him three options to pick from on each turn.<|user|>Start!<|model|>
37
- ```
38
-
39
- The model might generate something like:
40
-
41
- > You are standing in front of an old, abandoned house. The windows are boarded up, and there's no sign of life around it. As you approach, you notice a strange feeling emanating from within. Suddenly, you hear a voice calling out to you... 'Come inside!'
42
- >
43
- > - Go inside the house.
44
- > - Ignore the call and move away.
45
- > - Run as fast as you can.
46
-
47
- It will automatically emit an end-of-text token (`<|endoftext|>`) when it judges that the response is complete.
48
-
49
- Pretend then that the user has replied with `go inside`. The next prompt should then be:
50
-
51
- ```
52
- <|system|>This is a text adventure game. Describe the scenario to the user and give him three options to pick from on each turn.<|user|>Start!<|model|>You are standing in front of an old, abandoned house. The windows are boarded up, and there's no sign of life around it. As you approach, you notice a strange feeling emanating from within. Suddenly, you hear a voice calling out to you... 'Come inside!'
53
-
54
- - Go inside the house.
55
- - Ignore the call and move away.
56
- - Run as fast as you can.<|user|>go inside<|model|>
57
- ```
58
-
59
- Which might generate something like:
60
-
61
- > You enter the house, and immediately, a wave of unsettling energy washes over you. Your senses seem heightened, but your mind feels foggy. A figure appears before you - a tall man with piercing eyes. He speaks to you in a language you don't understand.
62
- >
63
- > - Ask him what he wants.
64
- > - Attack him.
65
- > - Run away.
66
-
67
- Same process applies. Usually, it is best to do a sliding window over the user and model turns, but keep the system prompt fixed at the start of the context window.
68
-
69
- ## Training Procedure
70
-
71
- This model was trained using the Metharme-v2 dataset (1 epoch) with 4x A100-40G GPUs. The run took 12 hours with `bsz=2` and `gradient_accumulation_steps=1024`.
72
-
73
- ## Evaluation Metrics
74
- The model was evaluated using EleutherAI's [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness) test suite. It was evaluated on the following tasks:
75
-
76
-
77
- | Task |Version| Metric |Value | |Stderr|
78
- |-------------|------:|--------|-----:|---|-----:|
79
- |anli_r1 | 0|acc |0.3310|± |0.0149|
80
- |anli_r2 | 0|acc |0.3360|± |0.0149|
81
- |anli_r3 | 0|acc |0.3333|± |0.0136|
82
- |arc_challenge| 0|acc |0.2765|± |0.0131|
83
- | | |acc_norm|0.3131|± |0.0136|
84
- |arc_easy | 0|acc |0.6221|± |0.0099|
85
- | | |acc_norm|0.5652|± |0.0102|
86
- |boolq | 1|acc |0.6208|± |0.0085|
87
- |cb | 1|acc |0.2143|± |0.0553|
88
- | | |f1 |0.1687| | |
89
- |hellaswag | 0|acc |0.4298|± |0.0049|
90
- | | |acc_norm|0.5505|± |0.0050|
91
- |openbookqa | 0|acc |0.2300|± |0.0188|
92
- | | |acc_norm|0.3420|± |0.0212|
93
- |piqa | 0|acc |0.7231|± |0.0104|
94
- | | |acc_norm|0.7334|± |0.0103|
95
- |rte | 0|acc |0.5235|± |0.0301|
96
- |truthfulqa_mc| 1|mc1 |0.2448|± |0.0151|
97
- | | |mc2 |0.3800|± |0.0142|
98
- |wic | 0|acc |0.5000|�� |0.0198|
99
- |winogrande | 0|acc |0.5675|± |0.0139|
100
- |wsc | 0|acc |0.3654|± |0.0474|
101
-
102
- Illustrated comparison of Metharme-1.3B's performance on benchmarks to Pygmalion-6B, Metharme-7B, and [RedPajama-INCITE-Chat-3B-v1](https://huggingface.co/togethercomputer/RedPajama-INCITE-Chat-3B-v1):
103
- ![Metharme 1.3B Evaluation Results](https://files.catbox.moe/mqemcg.png)
104
-
105
- ## Limitations and biases
106
-
107
- Due to being a smaller model than Metharme 7B and 13B, the coherency will very likely suffer.
108
-
109
- The intended use-case for this model is fictional writing for entertainment purposes. Any other sort of usage is out of scope.
110
-
111
- As such, it was **not** fine-tuned to be safe and harmless: the base model _and_ this fine-tune have been trained on data known to contain profanity and texts that are lewd or otherwise offensive. It may produce socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive. Outputs might often be factually wrong or misleading.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "/home/alpin/ramdisk/trained-models/model/metharme-1.3b",
3
  "architectures": [
4
  "GPTNeoXForCausalLM"
5
  ],
 
1
  {
2
+ "_name_or_path": "/home/alpin/ramdisk/trained-models/metharme-1.3b",
3
  "architectures": [
4
  "GPTNeoXForCausalLM"
5
  ],
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a4471ad60fa19b2b85bd7701ac3acfbe953e8398776ceb25dc5a3e2d4d384b01
3
  size 2930003008
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9cc9d21a1036f9efd2f258104254cfe0b5d6cd569540cdaa8b928a9f19a7c6a
3
  size 2930003008
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ce7fb9b12ece38be47d8edab7fd6019d1a6868f1680a2d14140404896caee96e
3
  size 2930083453
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdf01554e4d49a3029c6c61e1a8d5938511dce9da4b8f1d278e8c16ce00bd946
3
  size 2930083453
special_tokens_map.json CHANGED
@@ -1,4 +1,27 @@
1
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  "bos_token": "<|endoftext|>",
3
  "eos_token": "<|endoftext|>",
4
  "unk_token": "<|endoftext|>"
 
1
  {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<|system|>",
5
+ "lstrip": true,
6
+ "normalized": false,
7
+ "rstrip": true,
8
+ "single_word": false
9
+ },
10
+ {
11
+ "content": "<|user|>",
12
+ "lstrip": true,
13
+ "normalized": false,
14
+ "rstrip": true,
15
+ "single_word": false
16
+ },
17
+ {
18
+ "content": "<|model|>",
19
+ "lstrip": true,
20
+ "normalized": false,
21
+ "rstrip": true,
22
+ "single_word": false
23
+ }
24
+ ],
25
  "bos_token": "<|endoftext|>",
26
  "eos_token": "<|endoftext|>",
27
  "unk_token": "<|endoftext|>"
tokenizer.json CHANGED
@@ -227,6 +227,33 @@
227
  "rstrip": false,
228
  "normalized": true,
229
  "special": false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  }
231
  ],
232
  "normalizer": {
 
227
  "rstrip": false,
228
  "normalized": true,
229
  "special": false
230
+ },
231
+ {
232
+ "id": 50277,
233
+ "content": "<|system|>",
234
+ "single_word": false,
235
+ "lstrip": true,
236
+ "rstrip": true,
237
+ "normalized": false,
238
+ "special": true
239
+ },
240
+ {
241
+ "id": 50278,
242
+ "content": "<|user|>",
243
+ "single_word": false,
244
+ "lstrip": true,
245
+ "rstrip": true,
246
+ "normalized": false,
247
+ "special": true
248
+ },
249
+ {
250
+ "id": 50279,
251
+ "content": "<|model|>",
252
+ "single_word": false,
253
+ "lstrip": true,
254
+ "rstrip": true,
255
+ "normalized": false,
256
+ "special": true
257
  }
258
  ],
259
  "normalizer": {
trainer_state.json CHANGED
@@ -69,16 +69,16 @@
69
  },
70
  {
71
  "epoch": 0.1,
72
- "eval_loss": 0.20294944941997528,
73
- "eval_runtime": 7.7949,
74
- "eval_samples_per_second": 122.387,
75
- "eval_steps_per_second": 15.395,
76
  "step": 10
77
  },
78
  {
79
  "epoch": 0.11,
80
  "learning_rate": 6.875e-06,
81
- "loss": 0.2064,
82
  "step": 11
83
  },
84
  {
@@ -102,7 +102,7 @@
102
  {
103
  "epoch": 0.15,
104
  "learning_rate": 9.375000000000001e-06,
105
- "loss": 0.193,
106
  "step": 15
107
  },
108
  {
@@ -114,7 +114,7 @@
114
  {
115
  "epoch": 0.17,
116
  "learning_rate": 9.681174353198687e-06,
117
- "loss": 0.1893,
118
  "step": 17
119
  },
120
  {
@@ -132,15 +132,15 @@
132
  {
133
  "epoch": 0.2,
134
  "learning_rate": 5.671166329088278e-06,
135
- "loss": 0.1822,
136
  "step": 20
137
  },
138
  {
139
  "epoch": 0.2,
140
- "eval_loss": 0.18006880581378937,
141
- "eval_runtime": 7.7156,
142
- "eval_samples_per_second": 123.646,
143
- "eval_steps_per_second": 15.553,
144
  "step": 20
145
  },
146
  {
@@ -176,7 +176,7 @@
176
  {
177
  "epoch": 0.26,
178
  "learning_rate": 4.951556604879043e-07,
179
- "loss": 0.1795,
180
  "step": 26
181
  },
182
  {
@@ -205,10 +205,10 @@
205
  },
206
  {
207
  "epoch": 0.3,
208
- "eval_loss": 0.17900113761425018,
209
- "eval_runtime": 7.6855,
210
- "eval_samples_per_second": 124.129,
211
- "eval_steps_per_second": 15.614,
212
  "step": 30
213
  },
214
  {
@@ -220,7 +220,7 @@
220
  {
221
  "epoch": 0.32,
222
  "learning_rate": 9.292243968009332e-06,
223
- "loss": 0.1796,
224
  "step": 32
225
  },
226
  {
@@ -262,21 +262,21 @@
262
  {
263
  "epoch": 0.39,
264
  "learning_rate": 3.0348748417303834e-06,
265
- "loss": 0.1758,
266
  "step": 39
267
  },
268
  {
269
  "epoch": 0.4,
270
  "learning_rate": 1.544686755065678e-06,
271
- "loss": 0.1756,
272
  "step": 40
273
  },
274
  {
275
  "epoch": 0.4,
276
- "eval_loss": 0.17418844997882843,
277
- "eval_runtime": 7.8587,
278
- "eval_samples_per_second": 121.394,
279
- "eval_steps_per_second": 15.27,
280
  "step": 40
281
  },
282
  {
@@ -288,7 +288,7 @@
288
  {
289
  "epoch": 0.42,
290
  "learning_rate": 2.0128530023805216e-08,
291
- "loss": 0.1764,
292
  "step": 42
293
  },
294
  {
@@ -341,10 +341,10 @@
341
  },
342
  {
343
  "epoch": 0.5,
344
- "eval_loss": 0.17353740334510803,
345
- "eval_runtime": 7.7334,
346
- "eval_samples_per_second": 123.361,
347
- "eval_steps_per_second": 15.517,
348
  "step": 50
349
  },
350
  {
@@ -380,7 +380,7 @@
380
  {
381
  "epoch": 0.56,
382
  "learning_rate": 3.887395330218431e-06,
383
- "loss": 0.1736,
384
  "step": 56
385
  },
386
  {
@@ -409,10 +409,10 @@
409
  },
410
  {
411
  "epoch": 0.6,
412
- "eval_loss": 0.17227524518966675,
413
- "eval_runtime": 7.7647,
414
- "eval_samples_per_second": 122.863,
415
- "eval_steps_per_second": 15.455,
416
  "step": 60
417
  },
418
  {
@@ -454,7 +454,7 @@
454
  {
455
  "epoch": 0.68,
456
  "learning_rate": 9.292243968009328e-06,
457
- "loss": 0.1758,
458
  "step": 67
459
  },
460
  {
@@ -477,10 +477,10 @@
477
  },
478
  {
479
  "epoch": 0.71,
480
- "eval_loss": 0.17139491438865662,
481
- "eval_runtime": 8.0933,
482
- "eval_samples_per_second": 117.875,
483
- "eval_steps_per_second": 14.827,
484
  "step": 70
485
  },
486
  {
@@ -492,7 +492,7 @@
492
  {
493
  "epoch": 0.73,
494
  "learning_rate": 6.545084971874741e-06,
495
- "loss": 0.1739,
496
  "step": 72
497
  },
498
  {
@@ -516,7 +516,7 @@
516
  {
517
  "epoch": 0.77,
518
  "learning_rate": 4.951556604879059e-07,
519
- "loss": 0.1741,
520
  "step": 76
521
  },
522
  {
@@ -545,22 +545,22 @@
545
  },
546
  {
547
  "epoch": 0.81,
548
- "eval_loss": 0.17101411521434784,
549
- "eval_runtime": 7.7464,
550
- "eval_samples_per_second": 123.153,
551
- "eval_steps_per_second": 15.491,
552
  "step": 80
553
  },
554
  {
555
  "epoch": 0.82,
556
  "learning_rate": 3.8873953302184244e-06,
557
- "loss": 0.1726,
558
  "step": 81
559
  },
560
  {
561
  "epoch": 0.83,
562
  "learning_rate": 5.671166329088274e-06,
563
- "loss": 0.1726,
564
  "step": 82
565
  },
566
  {
@@ -613,16 +613,16 @@
613
  },
614
  {
615
  "epoch": 0.91,
616
- "eval_loss": 0.17012353241443634,
617
- "eval_runtime": 7.792,
618
- "eval_samples_per_second": 122.433,
619
- "eval_steps_per_second": 15.4,
620
  "step": 90
621
  },
622
  {
623
  "epoch": 0.92,
624
  "learning_rate": 3.887395330218433e-06,
625
- "loss": 0.173,
626
  "step": 91
627
  },
628
  {
@@ -634,7 +634,7 @@
634
  {
635
  "epoch": 0.94,
636
  "learning_rate": 9.549150281252557e-07,
637
- "loss": 0.1727,
638
  "step": 93
639
  },
640
  {
@@ -677,9 +677,9 @@
677
  "epoch": 1.0,
678
  "step": 99,
679
  "total_flos": 6.416685198968095e+18,
680
- "train_loss": 0.18112580719018223,
681
- "train_runtime": 16993.0978,
682
- "train_samples_per_second": 47.816,
683
  "train_steps_per_second": 0.006
684
  }
685
  ],
 
69
  },
70
  {
71
  "epoch": 0.1,
72
+ "eval_loss": 0.20295506715774536,
73
+ "eval_runtime": 7.6664,
74
+ "eval_samples_per_second": 124.439,
75
+ "eval_steps_per_second": 15.653,
76
  "step": 10
77
  },
78
  {
79
  "epoch": 0.11,
80
  "learning_rate": 6.875e-06,
81
+ "loss": 0.2063,
82
  "step": 11
83
  },
84
  {
 
102
  {
103
  "epoch": 0.15,
104
  "learning_rate": 9.375000000000001e-06,
105
+ "loss": 0.1929,
106
  "step": 15
107
  },
108
  {
 
114
  {
115
  "epoch": 0.17,
116
  "learning_rate": 9.681174353198687e-06,
117
+ "loss": 0.1894,
118
  "step": 17
119
  },
120
  {
 
132
  {
133
  "epoch": 0.2,
134
  "learning_rate": 5.671166329088278e-06,
135
+ "loss": 0.1823,
136
  "step": 20
137
  },
138
  {
139
  "epoch": 0.2,
140
+ "eval_loss": 0.18013226985931396,
141
+ "eval_runtime": 7.9493,
142
+ "eval_samples_per_second": 120.011,
143
+ "eval_steps_per_second": 15.096,
144
  "step": 20
145
  },
146
  {
 
176
  {
177
  "epoch": 0.26,
178
  "learning_rate": 4.951556604879043e-07,
179
+ "loss": 0.1796,
180
  "step": 26
181
  },
182
  {
 
205
  },
206
  {
207
  "epoch": 0.3,
208
+ "eval_loss": 0.17906256020069122,
209
+ "eval_runtime": 7.8801,
210
+ "eval_samples_per_second": 121.065,
211
+ "eval_steps_per_second": 15.228,
212
  "step": 30
213
  },
214
  {
 
220
  {
221
  "epoch": 0.32,
222
  "learning_rate": 9.292243968009332e-06,
223
+ "loss": 0.1797,
224
  "step": 32
225
  },
226
  {
 
262
  {
263
  "epoch": 0.39,
264
  "learning_rate": 3.0348748417303834e-06,
265
+ "loss": 0.1757,
266
  "step": 39
267
  },
268
  {
269
  "epoch": 0.4,
270
  "learning_rate": 1.544686755065678e-06,
271
+ "loss": 0.1755,
272
  "step": 40
273
  },
274
  {
275
  "epoch": 0.4,
276
+ "eval_loss": 0.17424167692661285,
277
+ "eval_runtime": 7.7899,
278
+ "eval_samples_per_second": 122.466,
279
+ "eval_steps_per_second": 15.405,
280
  "step": 40
281
  },
282
  {
 
288
  {
289
  "epoch": 0.42,
290
  "learning_rate": 2.0128530023805216e-08,
291
+ "loss": 0.1763,
292
  "step": 42
293
  },
294
  {
 
341
  },
342
  {
343
  "epoch": 0.5,
344
+ "eval_loss": 0.17338795959949493,
345
+ "eval_runtime": 7.6323,
346
+ "eval_samples_per_second": 124.995,
347
+ "eval_steps_per_second": 15.723,
348
  "step": 50
349
  },
350
  {
 
380
  {
381
  "epoch": 0.56,
382
  "learning_rate": 3.887395330218431e-06,
383
+ "loss": 0.1735,
384
  "step": 56
385
  },
386
  {
 
409
  },
410
  {
411
  "epoch": 0.6,
412
+ "eval_loss": 0.1722276508808136,
413
+ "eval_runtime": 7.8157,
414
+ "eval_samples_per_second": 122.061,
415
+ "eval_steps_per_second": 15.354,
416
  "step": 60
417
  },
418
  {
 
454
  {
455
  "epoch": 0.68,
456
  "learning_rate": 9.292243968009328e-06,
457
+ "loss": 0.1757,
458
  "step": 67
459
  },
460
  {
 
477
  },
478
  {
479
  "epoch": 0.71,
480
+ "eval_loss": 0.17138364911079407,
481
+ "eval_runtime": 7.8154,
482
+ "eval_samples_per_second": 122.067,
483
+ "eval_steps_per_second": 15.354,
484
  "step": 70
485
  },
486
  {
 
492
  {
493
  "epoch": 0.73,
494
  "learning_rate": 6.545084971874741e-06,
495
+ "loss": 0.1738,
496
  "step": 72
497
  },
498
  {
 
516
  {
517
  "epoch": 0.77,
518
  "learning_rate": 4.951556604879059e-07,
519
+ "loss": 0.174,
520
  "step": 76
521
  },
522
  {
 
545
  },
546
  {
547
  "epoch": 0.81,
548
+ "eval_loss": 0.17097879946231842,
549
+ "eval_runtime": 7.8584,
550
+ "eval_samples_per_second": 121.399,
551
+ "eval_steps_per_second": 15.27,
552
  "step": 80
553
  },
554
  {
555
  "epoch": 0.82,
556
  "learning_rate": 3.8873953302184244e-06,
557
+ "loss": 0.1725,
558
  "step": 81
559
  },
560
  {
561
  "epoch": 0.83,
562
  "learning_rate": 5.671166329088274e-06,
563
+ "loss": 0.1725,
564
  "step": 82
565
  },
566
  {
 
613
  },
614
  {
615
  "epoch": 0.91,
616
+ "eval_loss": 0.17013530433177948,
617
+ "eval_runtime": 7.7133,
618
+ "eval_samples_per_second": 123.683,
619
+ "eval_steps_per_second": 15.558,
620
  "step": 90
621
  },
622
  {
623
  "epoch": 0.92,
624
  "learning_rate": 3.887395330218433e-06,
625
+ "loss": 0.1729,
626
  "step": 91
627
  },
628
  {
 
634
  {
635
  "epoch": 0.94,
636
  "learning_rate": 9.549150281252557e-07,
637
+ "loss": 0.1726,
638
  "step": 93
639
  },
640
  {
 
677
  "epoch": 1.0,
678
  "step": 99,
679
  "total_flos": 6.416685198968095e+18,
680
+ "train_loss": 0.18111299429879044,
681
+ "train_runtime": 16732.1456,
682
+ "train_samples_per_second": 48.562,
683
  "train_steps_per_second": 0.006
684
  }
685
  ],