Konark Verma commited on
Commit
9fb1e49
·
verified ·
1 Parent(s): 8fe5d20

Add AdaLoRA adapter: llama3.2-1b_A_1k

Browse files
.gitattributes CHANGED
@@ -53,3 +53,4 @@ AdaLoRA/qwen3-0.6b_A_1k/tokenizer.json filter=lfs diff=lfs merge=lfs -text
53
  AdaLoRA/qwen3-0.6b_B_1k/tokenizer.json filter=lfs diff=lfs merge=lfs -text
54
  AdaLoRA/qwen3-0.6b_C_1k/tokenizer.json filter=lfs diff=lfs merge=lfs -text
55
  AdaLoRA/qwen3-0.6b_D_1k/tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
53
  AdaLoRA/qwen3-0.6b_B_1k/tokenizer.json filter=lfs diff=lfs merge=lfs -text
54
  AdaLoRA/qwen3-0.6b_C_1k/tokenizer.json filter=lfs diff=lfs merge=lfs -text
55
  AdaLoRA/qwen3-0.6b_D_1k/tokenizer.json filter=lfs diff=lfs merge=lfs -text
56
+ AdaLoRA/llama3.2-1b_A_1k/tokenizer.json filter=lfs diff=lfs merge=lfs -text
AdaLoRA/llama3.2-1b_A_1k/README.md ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: meta-llama/Llama-3.2-1B-Instruct
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:meta-llama/Llama-3.2-1B-Instruct
7
+ - sft
8
+ - transformers
9
+ - trl
10
+ ---
11
+
12
+ # Model Card for Model ID
13
+
14
+ <!-- Provide a quick summary of what the model is/does. -->
15
+
16
+
17
+
18
+ ## Model Details
19
+
20
+ ### Model Description
21
+
22
+ <!-- Provide a longer summary of what this model is. -->
23
+
24
+
25
+
26
+ - **Developed by:** [More Information Needed]
27
+ - **Funded by [optional]:** [More Information Needed]
28
+ - **Shared by [optional]:** [More Information Needed]
29
+ - **Model type:** [More Information Needed]
30
+ - **Language(s) (NLP):** [More Information Needed]
31
+ - **License:** [More Information Needed]
32
+ - **Finetuned from model [optional]:** [More Information Needed]
33
+
34
+ ### Model Sources [optional]
35
+
36
+ <!-- Provide the basic links for the model. -->
37
+
38
+ - **Repository:** [More Information Needed]
39
+ - **Paper [optional]:** [More Information Needed]
40
+ - **Demo [optional]:** [More Information Needed]
41
+
42
+ ## Uses
43
+
44
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
45
+
46
+ ### Direct Use
47
+
48
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Downstream Use [optional]
53
+
54
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
55
+
56
+ [More Information Needed]
57
+
58
+ ### Out-of-Scope Use
59
+
60
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ## Bias, Risks, and Limitations
65
+
66
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
67
+
68
+ [More Information Needed]
69
+
70
+ ### Recommendations
71
+
72
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
73
+
74
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
75
+
76
+ ## How to Get Started with the Model
77
+
78
+ Use the code below to get started with the model.
79
+
80
+ [More Information Needed]
81
+
82
+ ## Training Details
83
+
84
+ ### Training Data
85
+
86
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
87
+
88
+ [More Information Needed]
89
+
90
+ ### Training Procedure
91
+
92
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
93
+
94
+ #### Preprocessing [optional]
95
+
96
+ [More Information Needed]
97
+
98
+
99
+ #### Training Hyperparameters
100
+
101
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
102
+
103
+ #### Speeds, Sizes, Times [optional]
104
+
105
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
106
+
107
+ [More Information Needed]
108
+
109
+ ## Evaluation
110
+
111
+ <!-- This section describes the evaluation protocols and provides the results. -->
112
+
113
+ ### Testing Data, Factors & Metrics
114
+
115
+ #### Testing Data
116
+
117
+ <!-- This should link to a Dataset Card if possible. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Factors
122
+
123
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
124
+
125
+ [More Information Needed]
126
+
127
+ #### Metrics
128
+
129
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
130
+
131
+ [More Information Needed]
132
+
133
+ ### Results
134
+
135
+ [More Information Needed]
136
+
137
+ #### Summary
138
+
139
+
140
+
141
+ ## Model Examination [optional]
142
+
143
+ <!-- Relevant interpretability work for the model goes here -->
144
+
145
+ [More Information Needed]
146
+
147
+ ## Environmental Impact
148
+
149
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
150
+
151
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
152
+
153
+ - **Hardware Type:** [More Information Needed]
154
+ - **Hours used:** [More Information Needed]
155
+ - **Cloud Provider:** [More Information Needed]
156
+ - **Compute Region:** [More Information Needed]
157
+ - **Carbon Emitted:** [More Information Needed]
158
+
159
+ ## Technical Specifications [optional]
160
+
161
+ ### Model Architecture and Objective
162
+
163
+ [More Information Needed]
164
+
165
+ ### Compute Infrastructure
166
+
167
+ [More Information Needed]
168
+
169
+ #### Hardware
170
+
171
+ [More Information Needed]
172
+
173
+ #### Software
174
+
175
+ [More Information Needed]
176
+
177
+ ## Citation [optional]
178
+
179
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
180
+
181
+ **BibTeX:**
182
+
183
+ [More Information Needed]
184
+
185
+ **APA:**
186
+
187
+ [More Information Needed]
188
+
189
+ ## Glossary [optional]
190
+
191
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
192
+
193
+ [More Information Needed]
194
+
195
+ ## More Information [optional]
196
+
197
+ [More Information Needed]
198
+
199
+ ## Model Card Authors [optional]
200
+
201
+ [More Information Needed]
202
+
203
+ ## Model Card Contact
204
+
205
+ [More Information Needed]
206
+ ### Framework versions
207
+
208
+ - PEFT 0.19.1
AdaLoRA/llama3.2-1b_A_1k/adapter_config.json ADDED
@@ -0,0 +1,501 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "meta-llama/Llama-3.2-1B-Instruct",
7
+ "beta1": 0.85,
8
+ "beta2": 0.85,
9
+ "bias": "none",
10
+ "corda_config": null,
11
+ "deltaT": 1,
12
+ "ensure_weight_tying": false,
13
+ "eva_config": null,
14
+ "exclude_modules": null,
15
+ "fan_in_fan_out": false,
16
+ "inference_mode": true,
17
+ "init_lora_weights": true,
18
+ "init_r": 12,
19
+ "layer_replication": null,
20
+ "layers_pattern": null,
21
+ "layers_to_transform": null,
22
+ "loftq_config": {},
23
+ "lora_alpha": 24,
24
+ "lora_bias": false,
25
+ "lora_dropout": 0.0,
26
+ "lora_ga_config": null,
27
+ "megatron_config": null,
28
+ "megatron_core": "megatron.core",
29
+ "modules_to_save": null,
30
+ "orth_reg_weight": 0.1,
31
+ "peft_type": "ADALORA",
32
+ "peft_version": "0.19.1",
33
+ "qalora_group_size": 16,
34
+ "r": 8,
35
+ "rank_pattern": {
36
+ "model.layers.0.self_attn.q_proj.lora_E": [
37
+ false,
38
+ false,
39
+ false,
40
+ false,
41
+ false,
42
+ false,
43
+ false,
44
+ false,
45
+ false,
46
+ false,
47
+ false,
48
+ false
49
+ ],
50
+ "model.layers.0.self_attn.v_proj.lora_E": [
51
+ true,
52
+ false,
53
+ true,
54
+ true,
55
+ false,
56
+ true,
57
+ true,
58
+ false,
59
+ true,
60
+ false,
61
+ true,
62
+ true
63
+ ],
64
+ "model.layers.1.self_attn.q_proj.lora_E": [
65
+ false,
66
+ false,
67
+ false,
68
+ false,
69
+ false,
70
+ false,
71
+ false,
72
+ false,
73
+ false,
74
+ false,
75
+ false,
76
+ false
77
+ ],
78
+ "model.layers.1.self_attn.v_proj.lora_E": [
79
+ false,
80
+ true,
81
+ true,
82
+ true,
83
+ true,
84
+ true,
85
+ true,
86
+ true,
87
+ false,
88
+ true,
89
+ false,
90
+ true
91
+ ],
92
+ "model.layers.10.self_attn.q_proj.lora_E": [
93
+ false,
94
+ false,
95
+ false,
96
+ false,
97
+ true,
98
+ true,
99
+ false,
100
+ true,
101
+ false,
102
+ false,
103
+ false,
104
+ false
105
+ ],
106
+ "model.layers.10.self_attn.v_proj.lora_E": [
107
+ true,
108
+ true,
109
+ false,
110
+ false,
111
+ true,
112
+ true,
113
+ true,
114
+ false,
115
+ false,
116
+ true,
117
+ true,
118
+ true
119
+ ],
120
+ "model.layers.11.self_attn.q_proj.lora_E": [
121
+ false,
122
+ false,
123
+ false,
124
+ false,
125
+ false,
126
+ false,
127
+ false,
128
+ false,
129
+ false,
130
+ false,
131
+ false,
132
+ false
133
+ ],
134
+ "model.layers.11.self_attn.v_proj.lora_E": [
135
+ false,
136
+ false,
137
+ false,
138
+ false,
139
+ false,
140
+ true,
141
+ false,
142
+ false,
143
+ false,
144
+ false,
145
+ false,
146
+ false
147
+ ],
148
+ "model.layers.12.self_attn.q_proj.lora_E": [
149
+ false,
150
+ false,
151
+ false,
152
+ false,
153
+ false,
154
+ false,
155
+ false,
156
+ false,
157
+ false,
158
+ false,
159
+ false,
160
+ false
161
+ ],
162
+ "model.layers.12.self_attn.v_proj.lora_E": [
163
+ false,
164
+ false,
165
+ true,
166
+ false,
167
+ false,
168
+ false,
169
+ true,
170
+ false,
171
+ true,
172
+ false,
173
+ false,
174
+ false
175
+ ],
176
+ "model.layers.13.self_attn.q_proj.lora_E": [
177
+ false,
178
+ false,
179
+ false,
180
+ true,
181
+ true,
182
+ false,
183
+ false,
184
+ false,
185
+ false,
186
+ false,
187
+ false,
188
+ false
189
+ ],
190
+ "model.layers.13.self_attn.v_proj.lora_E": [
191
+ false,
192
+ false,
193
+ false,
194
+ false,
195
+ false,
196
+ false,
197
+ false,
198
+ false,
199
+ false,
200
+ false,
201
+ false,
202
+ false
203
+ ],
204
+ "model.layers.14.self_attn.q_proj.lora_E": [
205
+ true,
206
+ false,
207
+ false,
208
+ false,
209
+ true,
210
+ false,
211
+ false,
212
+ false,
213
+ false,
214
+ false,
215
+ false,
216
+ false
217
+ ],
218
+ "model.layers.14.self_attn.v_proj.lora_E": [
219
+ false,
220
+ false,
221
+ false,
222
+ false,
223
+ false,
224
+ false,
225
+ true,
226
+ false,
227
+ false,
228
+ false,
229
+ false,
230
+ false
231
+ ],
232
+ "model.layers.15.self_attn.q_proj.lora_E": [
233
+ false,
234
+ false,
235
+ false,
236
+ false,
237
+ false,
238
+ false,
239
+ false,
240
+ false,
241
+ false,
242
+ false,
243
+ false,
244
+ false
245
+ ],
246
+ "model.layers.15.self_attn.v_proj.lora_E": [
247
+ false,
248
+ false,
249
+ false,
250
+ false,
251
+ false,
252
+ false,
253
+ false,
254
+ false,
255
+ false,
256
+ false,
257
+ false,
258
+ false
259
+ ],
260
+ "model.layers.2.self_attn.q_proj.lora_E": [
261
+ false,
262
+ false,
263
+ false,
264
+ false,
265
+ false,
266
+ false,
267
+ false,
268
+ false,
269
+ false,
270
+ false,
271
+ false,
272
+ false
273
+ ],
274
+ "model.layers.2.self_attn.v_proj.lora_E": [
275
+ true,
276
+ false,
277
+ true,
278
+ false,
279
+ false,
280
+ true,
281
+ false,
282
+ true,
283
+ true,
284
+ true,
285
+ false,
286
+ false
287
+ ],
288
+ "model.layers.3.self_attn.q_proj.lora_E": [
289
+ false,
290
+ false,
291
+ false,
292
+ false,
293
+ false,
294
+ false,
295
+ false,
296
+ false,
297
+ false,
298
+ false,
299
+ false,
300
+ false
301
+ ],
302
+ "model.layers.3.self_attn.v_proj.lora_E": [
303
+ true,
304
+ false,
305
+ true,
306
+ true,
307
+ true,
308
+ true,
309
+ true,
310
+ true,
311
+ true,
312
+ true,
313
+ true,
314
+ true
315
+ ],
316
+ "model.layers.4.self_attn.q_proj.lora_E": [
317
+ false,
318
+ false,
319
+ false,
320
+ false,
321
+ false,
322
+ false,
323
+ false,
324
+ false,
325
+ false,
326
+ true,
327
+ false,
328
+ false
329
+ ],
330
+ "model.layers.4.self_attn.v_proj.lora_E": [
331
+ true,
332
+ true,
333
+ true,
334
+ true,
335
+ true,
336
+ false,
337
+ true,
338
+ true,
339
+ false,
340
+ false,
341
+ true,
342
+ true
343
+ ],
344
+ "model.layers.5.self_attn.q_proj.lora_E": [
345
+ false,
346
+ false,
347
+ false,
348
+ true,
349
+ false,
350
+ false,
351
+ false,
352
+ false,
353
+ true,
354
+ false,
355
+ false,
356
+ true
357
+ ],
358
+ "model.layers.5.self_attn.v_proj.lora_E": [
359
+ true,
360
+ true,
361
+ true,
362
+ true,
363
+ true,
364
+ true,
365
+ true,
366
+ true,
367
+ true,
368
+ true,
369
+ false,
370
+ true
371
+ ],
372
+ "model.layers.6.self_attn.q_proj.lora_E": [
373
+ false,
374
+ false,
375
+ true,
376
+ true,
377
+ true,
378
+ true,
379
+ false,
380
+ false,
381
+ false,
382
+ false,
383
+ false,
384
+ false
385
+ ],
386
+ "model.layers.6.self_attn.v_proj.lora_E": [
387
+ true,
388
+ true,
389
+ true,
390
+ false,
391
+ true,
392
+ false,
393
+ true,
394
+ true,
395
+ true,
396
+ false,
397
+ false,
398
+ false
399
+ ],
400
+ "model.layers.7.self_attn.q_proj.lora_E": [
401
+ true,
402
+ true,
403
+ false,
404
+ false,
405
+ false,
406
+ false,
407
+ false,
408
+ false,
409
+ false,
410
+ false,
411
+ false,
412
+ false
413
+ ],
414
+ "model.layers.7.self_attn.v_proj.lora_E": [
415
+ true,
416
+ true,
417
+ true,
418
+ false,
419
+ true,
420
+ true,
421
+ false,
422
+ true,
423
+ false,
424
+ true,
425
+ true,
426
+ false
427
+ ],
428
+ "model.layers.8.self_attn.q_proj.lora_E": [
429
+ true,
430
+ true,
431
+ true,
432
+ false,
433
+ false,
434
+ true,
435
+ true,
436
+ true,
437
+ false,
438
+ false,
439
+ true,
440
+ false
441
+ ],
442
+ "model.layers.8.self_attn.v_proj.lora_E": [
443
+ true,
444
+ true,
445
+ true,
446
+ false,
447
+ true,
448
+ true,
449
+ true,
450
+ true,
451
+ false,
452
+ true,
453
+ false,
454
+ true
455
+ ],
456
+ "model.layers.9.self_attn.q_proj.lora_E": [
457
+ false,
458
+ false,
459
+ false,
460
+ false,
461
+ false,
462
+ true,
463
+ true,
464
+ false,
465
+ true,
466
+ false,
467
+ false,
468
+ false
469
+ ],
470
+ "model.layers.9.self_attn.v_proj.lora_E": [
471
+ true,
472
+ true,
473
+ true,
474
+ false,
475
+ true,
476
+ false,
477
+ true,
478
+ true,
479
+ true,
480
+ true,
481
+ true,
482
+ true
483
+ ]
484
+ },
485
+ "revision": null,
486
+ "target_modules": [
487
+ "q_proj",
488
+ "v_proj"
489
+ ],
490
+ "target_parameters": null,
491
+ "target_r": 4,
492
+ "task_type": "CAUSAL_LM",
493
+ "tfinal": 0,
494
+ "tinit": 0,
495
+ "total_step": 150,
496
+ "trainable_token_indices": null,
497
+ "use_bdlora": null,
498
+ "use_dora": false,
499
+ "use_qalora": false,
500
+ "use_rslora": false
501
+ }
AdaLoRA/llama3.2-1b_A_1k/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd6941c03b29c54daba685677498fa2ec1bc6ddb9b96e19120c7e43b977f3e78
3
+ size 1488800
AdaLoRA/llama3.2-1b_A_1k/chat_template.jinja ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- bos_token }}
2
+ {%- if custom_tools is defined %}
3
+ {%- set tools = custom_tools %}
4
+ {%- endif %}
5
+ {%- if not tools_in_user_message is defined %}
6
+ {%- set tools_in_user_message = true %}
7
+ {%- endif %}
8
+ {%- if not date_string is defined %}
9
+ {%- if strftime_now is defined %}
10
+ {%- set date_string = strftime_now("%d %b %Y") %}
11
+ {%- else %}
12
+ {%- set date_string = "26 Jul 2024" %}
13
+ {%- endif %}
14
+ {%- endif %}
15
+ {%- if not tools is defined %}
16
+ {%- set tools = none %}
17
+ {%- endif %}
18
+
19
+ {#- This block extracts the system message, so we can slot it into the right place. #}
20
+ {%- if messages[0]['role'] == 'system' %}
21
+ {%- set system_message = messages[0]['content']|trim %}
22
+ {%- set messages = messages[1:] %}
23
+ {%- else %}
24
+ {%- set system_message = "" %}
25
+ {%- endif %}
26
+
27
+ {#- System message #}
28
+ {{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
29
+ {%- if tools is not none %}
30
+ {{- "Environment: ipython\n" }}
31
+ {%- endif %}
32
+ {{- "Cutting Knowledge Date: December 2023\n" }}
33
+ {{- "Today Date: " + date_string + "\n\n" }}
34
+ {%- if tools is not none and not tools_in_user_message %}
35
+ {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
36
+ {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
37
+ {{- "Do not use variables.\n\n" }}
38
+ {%- for t in tools %}
39
+ {{- t | tojson(indent=4) }}
40
+ {{- "\n\n" }}
41
+ {%- endfor %}
42
+ {%- endif %}
43
+ {{- system_message }}
44
+ {{- "<|eot_id|>" }}
45
+
46
+ {#- Custom tools are passed in a user message with some extra guidance #}
47
+ {%- if tools_in_user_message and not tools is none %}
48
+ {#- Extract the first user message so we can plug it in here #}
49
+ {%- if messages | length != 0 %}
50
+ {%- set first_user_message = messages[0]['content']|trim %}
51
+ {%- set messages = messages[1:] %}
52
+ {%- else %}
53
+ {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
54
+ {%- endif %}
55
+ {{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
56
+ {{- "Given the following functions, please respond with a JSON for a function call " }}
57
+ {{- "with its proper arguments that best answers the given prompt.\n\n" }}
58
+ {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
59
+ {{- "Do not use variables.\n\n" }}
60
+ {%- for t in tools %}
61
+ {{- t | tojson(indent=4) }}
62
+ {{- "\n\n" }}
63
+ {%- endfor %}
64
+ {{- first_user_message + "<|eot_id|>"}}
65
+ {%- endif %}
66
+
67
+ {%- for message in messages %}
68
+ {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
69
+ {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }}
70
+ {%- elif 'tool_calls' in message %}
71
+ {%- if not message.tool_calls|length == 1 %}
72
+ {{- raise_exception("This model only supports single tool-calls at once!") }}
73
+ {%- endif %}
74
+ {%- set tool_call = message.tool_calls[0].function %}
75
+ {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
76
+ {{- '{"name": "' + tool_call.name + '", ' }}
77
+ {{- '"parameters": ' }}
78
+ {{- tool_call.arguments | tojson }}
79
+ {{- "}" }}
80
+ {{- "<|eot_id|>" }}
81
+ {%- elif message.role == "tool" or message.role == "ipython" %}
82
+ {{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
83
+ {%- if message.content is mapping or message.content is iterable %}
84
+ {{- message.content | tojson }}
85
+ {%- else %}
86
+ {{- message.content }}
87
+ {%- endif %}
88
+ {{- "<|eot_id|>" }}
89
+ {%- endif %}
90
+ {%- endfor %}
91
+ {%- if add_generation_prompt %}
92
+ {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
93
+ {%- endif %}
AdaLoRA/llama3.2-1b_A_1k/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
3
+ size 17209920
AdaLoRA/llama3.2-1b_A_1k/tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|begin_of_text|>",
4
+ "clean_up_tokenization_spaces": true,
5
+ "eos_token": "<|eot_id|>",
6
+ "is_local": false,
7
+ "local_files_only": false,
8
+ "model_input_names": [
9
+ "input_ids",
10
+ "attention_mask"
11
+ ],
12
+ "model_max_length": 131072,
13
+ "pad_token": "<|eot_id|>",
14
+ "tokenizer_class": "TokenizersBackend"
15
+ }