TangQiaoYu commited on
Commit
1119dd9
1 Parent(s): 9057439

upload files

Browse files
README.md CHANGED
@@ -1,3 +1,7 @@
1
- ---
2
- license: other
3
- ---
 
 
 
 
 
1
+ ## Introduction
2
+ `ToolAlpaca` is a large language model demonstrating generalized tool-use alibities, trained only on 3.9k simulated tool-use instances. See [our paper](https://arxiv.org/abs/2306.05301) for more details.
3
+
4
+ ## Links
5
+ - Paper: https://arxiv.org/abs/2306.05301
6
+ - Code & Data: https://github.com/tangqiaoyu/ToolAlpaca
7
+ - ToolAlpaca-7B: https://huggingface.co/TangQiaoYu/ToolAlpaca-7B
config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "models/vicuna-13b/",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "bos_token_id": 1,
7
+ "eos_token_id": 2,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 5120,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 13824,
12
+ "max_position_embeddings": 2048,
13
+ "model_type": "llama",
14
+ "num_attention_heads": 40,
15
+ "num_hidden_layers": 40,
16
+ "pad_token_id": 0,
17
+ "rms_norm_eps": 1e-06,
18
+ "tie_word_embeddings": false,
19
+ "torch_dtype": "bfloat16",
20
+ "transformers_version": "4.29.2",
21
+ "use_cache": true,
22
+ "vocab_size": 32000
23
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "4.29.2"
7
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<unk>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "bos_token": {
5
+ "__type": "AddedToken",
6
+ "content": "<s>",
7
+ "lstrip": false,
8
+ "normalized": true,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "clean_up_tokenization_spaces": false,
13
+ "eos_token": {
14
+ "__type": "AddedToken",
15
+ "content": "</s>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "model_max_length": 2048,
22
+ "pad_token": null,
23
+ "padding_side": "right",
24
+ "sp_model_kwargs": {},
25
+ "tokenizer_class": "LlamaTokenizer",
26
+ "unk_token": {
27
+ "__type": "AddedToken",
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false
33
+ }
34
+ }
trainer_state.json ADDED
@@ -0,0 +1,583 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 0.03,
12
+ "learning_rate": 0.0,
13
+ "loss": 0.4775,
14
+ "step": 1
15
+ },
16
+ {
17
+ "epoch": 0.06,
18
+ "learning_rate": 1.2618595071429148e-05,
19
+ "loss": 0.3184,
20
+ "step": 2
21
+ },
22
+ {
23
+ "epoch": 0.1,
24
+ "learning_rate": 2e-05,
25
+ "loss": 0.3267,
26
+ "step": 3
27
+ },
28
+ {
29
+ "epoch": 0.13,
30
+ "learning_rate": 2e-05,
31
+ "loss": 0.2603,
32
+ "step": 4
33
+ },
34
+ {
35
+ "epoch": 0.16,
36
+ "learning_rate": 2e-05,
37
+ "loss": 0.2483,
38
+ "step": 5
39
+ },
40
+ {
41
+ "epoch": 0.19,
42
+ "learning_rate": 2e-05,
43
+ "loss": 0.2056,
44
+ "step": 6
45
+ },
46
+ {
47
+ "epoch": 0.23,
48
+ "learning_rate": 2e-05,
49
+ "loss": 0.2126,
50
+ "step": 7
51
+ },
52
+ {
53
+ "epoch": 0.26,
54
+ "learning_rate": 2e-05,
55
+ "loss": 0.2026,
56
+ "step": 8
57
+ },
58
+ {
59
+ "epoch": 0.29,
60
+ "learning_rate": 2e-05,
61
+ "loss": 0.1997,
62
+ "step": 9
63
+ },
64
+ {
65
+ "epoch": 0.32,
66
+ "learning_rate": 2e-05,
67
+ "loss": 0.1829,
68
+ "step": 10
69
+ },
70
+ {
71
+ "epoch": 0.35,
72
+ "learning_rate": 2e-05,
73
+ "loss": 0.186,
74
+ "step": 11
75
+ },
76
+ {
77
+ "epoch": 0.39,
78
+ "learning_rate": 2e-05,
79
+ "loss": 0.1743,
80
+ "step": 12
81
+ },
82
+ {
83
+ "epoch": 0.42,
84
+ "learning_rate": 2e-05,
85
+ "loss": 0.1682,
86
+ "step": 13
87
+ },
88
+ {
89
+ "epoch": 0.45,
90
+ "learning_rate": 2e-05,
91
+ "loss": 0.1836,
92
+ "step": 14
93
+ },
94
+ {
95
+ "epoch": 0.48,
96
+ "learning_rate": 2e-05,
97
+ "loss": 0.1721,
98
+ "step": 15
99
+ },
100
+ {
101
+ "epoch": 0.52,
102
+ "learning_rate": 2e-05,
103
+ "loss": 0.1807,
104
+ "step": 16
105
+ },
106
+ {
107
+ "epoch": 0.55,
108
+ "learning_rate": 2e-05,
109
+ "loss": 0.1714,
110
+ "step": 17
111
+ },
112
+ {
113
+ "epoch": 0.58,
114
+ "learning_rate": 2e-05,
115
+ "loss": 0.1646,
116
+ "step": 18
117
+ },
118
+ {
119
+ "epoch": 0.61,
120
+ "learning_rate": 2e-05,
121
+ "loss": 0.1763,
122
+ "step": 19
123
+ },
124
+ {
125
+ "epoch": 0.65,
126
+ "learning_rate": 2e-05,
127
+ "loss": 0.1614,
128
+ "step": 20
129
+ },
130
+ {
131
+ "epoch": 0.68,
132
+ "learning_rate": 2e-05,
133
+ "loss": 0.1533,
134
+ "step": 21
135
+ },
136
+ {
137
+ "epoch": 0.71,
138
+ "learning_rate": 2e-05,
139
+ "loss": 0.1616,
140
+ "step": 22
141
+ },
142
+ {
143
+ "epoch": 0.74,
144
+ "learning_rate": 2e-05,
145
+ "loss": 0.1736,
146
+ "step": 23
147
+ },
148
+ {
149
+ "epoch": 0.77,
150
+ "learning_rate": 2e-05,
151
+ "loss": 0.1558,
152
+ "step": 24
153
+ },
154
+ {
155
+ "epoch": 0.81,
156
+ "learning_rate": 2e-05,
157
+ "loss": 0.1572,
158
+ "step": 25
159
+ },
160
+ {
161
+ "epoch": 0.84,
162
+ "learning_rate": 2e-05,
163
+ "loss": 0.1584,
164
+ "step": 26
165
+ },
166
+ {
167
+ "epoch": 0.87,
168
+ "learning_rate": 2e-05,
169
+ "loss": 0.1638,
170
+ "step": 27
171
+ },
172
+ {
173
+ "epoch": 0.9,
174
+ "learning_rate": 2e-05,
175
+ "loss": 0.1465,
176
+ "step": 28
177
+ },
178
+ {
179
+ "epoch": 0.94,
180
+ "learning_rate": 2e-05,
181
+ "loss": 0.1521,
182
+ "step": 29
183
+ },
184
+ {
185
+ "epoch": 0.97,
186
+ "learning_rate": 2e-05,
187
+ "loss": 0.1482,
188
+ "step": 30
189
+ },
190
+ {
191
+ "epoch": 1.0,
192
+ "learning_rate": 2e-05,
193
+ "loss": 0.1616,
194
+ "step": 31
195
+ },
196
+ {
197
+ "epoch": 1.03,
198
+ "learning_rate": 2e-05,
199
+ "loss": 0.0868,
200
+ "step": 32
201
+ },
202
+ {
203
+ "epoch": 1.06,
204
+ "learning_rate": 2e-05,
205
+ "loss": 0.0803,
206
+ "step": 33
207
+ },
208
+ {
209
+ "epoch": 1.1,
210
+ "learning_rate": 2e-05,
211
+ "loss": 0.0834,
212
+ "step": 34
213
+ },
214
+ {
215
+ "epoch": 1.13,
216
+ "learning_rate": 2e-05,
217
+ "loss": 0.0759,
218
+ "step": 35
219
+ },
220
+ {
221
+ "epoch": 1.16,
222
+ "learning_rate": 2e-05,
223
+ "loss": 0.0704,
224
+ "step": 36
225
+ },
226
+ {
227
+ "epoch": 1.19,
228
+ "learning_rate": 2e-05,
229
+ "loss": 0.0672,
230
+ "step": 37
231
+ },
232
+ {
233
+ "epoch": 1.23,
234
+ "learning_rate": 2e-05,
235
+ "loss": 0.0763,
236
+ "step": 38
237
+ },
238
+ {
239
+ "epoch": 1.26,
240
+ "learning_rate": 2e-05,
241
+ "loss": 0.0711,
242
+ "step": 39
243
+ },
244
+ {
245
+ "epoch": 1.29,
246
+ "learning_rate": 2e-05,
247
+ "loss": 0.0661,
248
+ "step": 40
249
+ },
250
+ {
251
+ "epoch": 1.32,
252
+ "learning_rate": 2e-05,
253
+ "loss": 0.0707,
254
+ "step": 41
255
+ },
256
+ {
257
+ "epoch": 1.35,
258
+ "learning_rate": 2e-05,
259
+ "loss": 0.0725,
260
+ "step": 42
261
+ },
262
+ {
263
+ "epoch": 1.39,
264
+ "learning_rate": 2e-05,
265
+ "loss": 0.0702,
266
+ "step": 43
267
+ },
268
+ {
269
+ "epoch": 1.42,
270
+ "learning_rate": 2e-05,
271
+ "loss": 0.0664,
272
+ "step": 44
273
+ },
274
+ {
275
+ "epoch": 1.45,
276
+ "learning_rate": 2e-05,
277
+ "loss": 0.0623,
278
+ "step": 45
279
+ },
280
+ {
281
+ "epoch": 1.48,
282
+ "learning_rate": 2e-05,
283
+ "loss": 0.0659,
284
+ "step": 46
285
+ },
286
+ {
287
+ "epoch": 1.52,
288
+ "learning_rate": 2e-05,
289
+ "loss": 0.0704,
290
+ "step": 47
291
+ },
292
+ {
293
+ "epoch": 1.55,
294
+ "learning_rate": 2e-05,
295
+ "loss": 0.0677,
296
+ "step": 48
297
+ },
298
+ {
299
+ "epoch": 1.58,
300
+ "learning_rate": 2e-05,
301
+ "loss": 0.0682,
302
+ "step": 49
303
+ },
304
+ {
305
+ "epoch": 1.61,
306
+ "learning_rate": 2e-05,
307
+ "loss": 0.0605,
308
+ "step": 50
309
+ },
310
+ {
311
+ "epoch": 1.65,
312
+ "learning_rate": 2e-05,
313
+ "loss": 0.0675,
314
+ "step": 51
315
+ },
316
+ {
317
+ "epoch": 1.68,
318
+ "learning_rate": 2e-05,
319
+ "loss": 0.0659,
320
+ "step": 52
321
+ },
322
+ {
323
+ "epoch": 1.71,
324
+ "learning_rate": 2e-05,
325
+ "loss": 0.0597,
326
+ "step": 53
327
+ },
328
+ {
329
+ "epoch": 1.74,
330
+ "learning_rate": 2e-05,
331
+ "loss": 0.0614,
332
+ "step": 54
333
+ },
334
+ {
335
+ "epoch": 1.77,
336
+ "learning_rate": 2e-05,
337
+ "loss": 0.066,
338
+ "step": 55
339
+ },
340
+ {
341
+ "epoch": 1.81,
342
+ "learning_rate": 2e-05,
343
+ "loss": 0.0682,
344
+ "step": 56
345
+ },
346
+ {
347
+ "epoch": 1.84,
348
+ "learning_rate": 2e-05,
349
+ "loss": 0.0654,
350
+ "step": 57
351
+ },
352
+ {
353
+ "epoch": 1.87,
354
+ "learning_rate": 2e-05,
355
+ "loss": 0.0692,
356
+ "step": 58
357
+ },
358
+ {
359
+ "epoch": 1.9,
360
+ "learning_rate": 2e-05,
361
+ "loss": 0.0706,
362
+ "step": 59
363
+ },
364
+ {
365
+ "epoch": 1.94,
366
+ "learning_rate": 2e-05,
367
+ "loss": 0.0628,
368
+ "step": 60
369
+ },
370
+ {
371
+ "epoch": 1.97,
372
+ "learning_rate": 2e-05,
373
+ "loss": 0.0714,
374
+ "step": 61
375
+ },
376
+ {
377
+ "epoch": 2.0,
378
+ "learning_rate": 2e-05,
379
+ "loss": 0.067,
380
+ "step": 62
381
+ },
382
+ {
383
+ "epoch": 2.03,
384
+ "learning_rate": 2e-05,
385
+ "loss": 0.0299,
386
+ "step": 63
387
+ },
388
+ {
389
+ "epoch": 2.06,
390
+ "learning_rate": 2e-05,
391
+ "loss": 0.0343,
392
+ "step": 64
393
+ },
394
+ {
395
+ "epoch": 2.1,
396
+ "learning_rate": 2e-05,
397
+ "loss": 0.0326,
398
+ "step": 65
399
+ },
400
+ {
401
+ "epoch": 2.13,
402
+ "learning_rate": 2e-05,
403
+ "loss": 0.0286,
404
+ "step": 66
405
+ },
406
+ {
407
+ "epoch": 2.16,
408
+ "learning_rate": 2e-05,
409
+ "loss": 0.0299,
410
+ "step": 67
411
+ },
412
+ {
413
+ "epoch": 2.19,
414
+ "learning_rate": 2e-05,
415
+ "loss": 0.0268,
416
+ "step": 68
417
+ },
418
+ {
419
+ "epoch": 2.23,
420
+ "learning_rate": 2e-05,
421
+ "loss": 0.0327,
422
+ "step": 69
423
+ },
424
+ {
425
+ "epoch": 2.26,
426
+ "learning_rate": 2e-05,
427
+ "loss": 0.0294,
428
+ "step": 70
429
+ },
430
+ {
431
+ "epoch": 2.29,
432
+ "learning_rate": 2e-05,
433
+ "loss": 0.0314,
434
+ "step": 71
435
+ },
436
+ {
437
+ "epoch": 2.32,
438
+ "learning_rate": 2e-05,
439
+ "loss": 0.0317,
440
+ "step": 72
441
+ },
442
+ {
443
+ "epoch": 2.35,
444
+ "learning_rate": 2e-05,
445
+ "loss": 0.0312,
446
+ "step": 73
447
+ },
448
+ {
449
+ "epoch": 2.39,
450
+ "learning_rate": 2e-05,
451
+ "loss": 0.0291,
452
+ "step": 74
453
+ },
454
+ {
455
+ "epoch": 2.42,
456
+ "learning_rate": 2e-05,
457
+ "loss": 0.0332,
458
+ "step": 75
459
+ },
460
+ {
461
+ "epoch": 2.45,
462
+ "learning_rate": 2e-05,
463
+ "loss": 0.0325,
464
+ "step": 76
465
+ },
466
+ {
467
+ "epoch": 2.48,
468
+ "learning_rate": 2e-05,
469
+ "loss": 0.0323,
470
+ "step": 77
471
+ },
472
+ {
473
+ "epoch": 2.52,
474
+ "learning_rate": 2e-05,
475
+ "loss": 0.0321,
476
+ "step": 78
477
+ },
478
+ {
479
+ "epoch": 2.55,
480
+ "learning_rate": 2e-05,
481
+ "loss": 0.0302,
482
+ "step": 79
483
+ },
484
+ {
485
+ "epoch": 2.58,
486
+ "learning_rate": 2e-05,
487
+ "loss": 0.0303,
488
+ "step": 80
489
+ },
490
+ {
491
+ "epoch": 2.61,
492
+ "learning_rate": 2e-05,
493
+ "loss": 0.0305,
494
+ "step": 81
495
+ },
496
+ {
497
+ "epoch": 2.65,
498
+ "learning_rate": 2e-05,
499
+ "loss": 0.0353,
500
+ "step": 82
501
+ },
502
+ {
503
+ "epoch": 2.68,
504
+ "learning_rate": 2e-05,
505
+ "loss": 0.0315,
506
+ "step": 83
507
+ },
508
+ {
509
+ "epoch": 2.71,
510
+ "learning_rate": 2e-05,
511
+ "loss": 0.0296,
512
+ "step": 84
513
+ },
514
+ {
515
+ "epoch": 2.74,
516
+ "learning_rate": 2e-05,
517
+ "loss": 0.0347,
518
+ "step": 85
519
+ },
520
+ {
521
+ "epoch": 2.77,
522
+ "learning_rate": 2e-05,
523
+ "loss": 0.0323,
524
+ "step": 86
525
+ },
526
+ {
527
+ "epoch": 2.81,
528
+ "learning_rate": 2e-05,
529
+ "loss": 0.0351,
530
+ "step": 87
531
+ },
532
+ {
533
+ "epoch": 2.84,
534
+ "learning_rate": 2e-05,
535
+ "loss": 0.0326,
536
+ "step": 88
537
+ },
538
+ {
539
+ "epoch": 2.87,
540
+ "learning_rate": 2e-05,
541
+ "loss": 0.033,
542
+ "step": 89
543
+ },
544
+ {
545
+ "epoch": 2.9,
546
+ "learning_rate": 2e-05,
547
+ "loss": 0.0353,
548
+ "step": 90
549
+ },
550
+ {
551
+ "epoch": 2.94,
552
+ "learning_rate": 2e-05,
553
+ "loss": 0.035,
554
+ "step": 91
555
+ },
556
+ {
557
+ "epoch": 2.97,
558
+ "learning_rate": 2e-05,
559
+ "loss": 0.0375,
560
+ "step": 92
561
+ },
562
+ {
563
+ "epoch": 3.0,
564
+ "learning_rate": 2e-05,
565
+ "loss": 0.0309,
566
+ "step": 93
567
+ },
568
+ {
569
+ "epoch": 3.0,
570
+ "step": 93,
571
+ "total_flos": 59878932480000.0,
572
+ "train_loss": 0.09940362745715726,
573
+ "train_runtime": 10240.8014,
574
+ "train_samples_per_second": 1.153,
575
+ "train_steps_per_second": 0.009
576
+ }
577
+ ],
578
+ "max_steps": 93,
579
+ "num_train_epochs": 3,
580
+ "total_flos": 59878932480000.0,
581
+ "trial_name": null,
582
+ "trial_params": null
583
+ }