slenk commited on
Commit
bc82c3e
·
verified ·
1 Parent(s): cca7c49

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -37,3 +37,4 @@ checkpoint-50/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
  checkpoint-88/tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
39
  checkpoint-92/tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
37
  checkpoint-88/tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
39
  checkpoint-92/tokenizer.json filter=lfs diff=lfs merge=lfs -text
40
+ checkpoint-84/tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
  base_model: unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit
3
  library_name: peft
4
- model_name: codewraith-lora-3b-v3
5
  tags:
6
  - base_model:adapter:unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit
7
  - lora
@@ -13,7 +13,7 @@ licence: license
13
  pipeline_tag: text-generation
14
  ---
15
 
16
- # Model Card for codewraith-lora-3b-v3
17
 
18
  This model is a fine-tuned version of [unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit](https://huggingface.co/unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit).
19
  It has been trained using [TRL](https://github.com/huggingface/trl).
 
1
  ---
2
  base_model: unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit
3
  library_name: peft
4
+ model_name: codewraith-lora-3b-v4
5
  tags:
6
  - base_model:adapter:unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit
7
  - lora
 
13
  pipeline_tag: text-generation
14
  ---
15
 
16
+ # Model Card for codewraith-lora-3b-v4
17
 
18
  This model is a fine-tuned version of [unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit](https://huggingface.co/unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit).
19
  It has been trained using [TRL](https://github.com/huggingface/trl).
adapter_config.json CHANGED
@@ -33,13 +33,13 @@
33
  "rank_pattern": {},
34
  "revision": null,
35
  "target_modules": [
 
 
 
36
  "gate_proj",
37
  "down_proj",
38
- "k_proj",
39
- "o_proj",
40
  "v_proj",
41
- "up_proj",
42
- "q_proj"
43
  ],
44
  "target_parameters": null,
45
  "task_type": "CAUSAL_LM",
 
33
  "rank_pattern": {},
34
  "revision": null,
35
  "target_modules": [
36
+ "o_proj",
37
+ "up_proj",
38
+ "q_proj",
39
  "gate_proj",
40
  "down_proj",
 
 
41
  "v_proj",
42
+ "k_proj"
 
43
  ],
44
  "target_parameters": null,
45
  "task_type": "CAUSAL_LM",
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a6c659345a3e6ba4af5995c288a4f8b48ed2f1a3efd1c4e960324fd32e634840
3
  size 194563400
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:043556955c06ce77ec2285df5a6365178f0161acbe642dc71c6d9ffb4fae6e7e
3
  size 194563400
checkpoint-50/adapter_config.json CHANGED
@@ -33,13 +33,13 @@
33
  "rank_pattern": {},
34
  "revision": null,
35
  "target_modules": [
 
 
 
36
  "gate_proj",
37
  "down_proj",
38
- "k_proj",
39
- "o_proj",
40
  "v_proj",
41
- "up_proj",
42
- "q_proj"
43
  ],
44
  "target_parameters": null,
45
  "task_type": "CAUSAL_LM",
 
33
  "rank_pattern": {},
34
  "revision": null,
35
  "target_modules": [
36
+ "o_proj",
37
+ "up_proj",
38
+ "q_proj",
39
  "gate_proj",
40
  "down_proj",
 
 
41
  "v_proj",
42
+ "k_proj"
 
43
  ],
44
  "target_parameters": null,
45
  "task_type": "CAUSAL_LM",
checkpoint-50/adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:13ca364b702fdc30af6ee41a5b1b35afdb277e700fb904415f613062bd68310f
3
  size 194563400
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4ceb6e8ebb4e899283eef788d1ac6790995984509ebeb2f745ef060e7c3efb5
3
  size 194563400
checkpoint-50/optimizer.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2d0f04c9a525f450698453b8e38228dc913d4eb40ad0dc52bf0eefd379c83c1c
3
  size 99240133
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:112f1b01a84bf4b8dd831a309471616b9ebf2afddcd70e5943bcc26d45d436ed
3
  size 99240133
checkpoint-50/rng_state.pth CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e83120c3d881127dc484d1212b5e3f3be4cd0790780c0656a6b861052dbc0838
3
  size 14645
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6cea7375002e99c9ab5a0a69923c54abb9561c3b0f4fd32fe6b0258894dd81f6
3
  size 14645
checkpoint-50/scheduler.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8879d2112d2d2a6843b2de6db12b1d27f886b71db0d9f863b5b077dcd30027c2
3
  size 1465
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:277d557f73460820092ea86679478b7daf0a4f93e11bb07094838ab694f56629
3
  size 1465
checkpoint-50/trainer_state.json CHANGED
@@ -2,7 +2,7 @@
2
  "best_global_step": null,
3
  "best_metric": null,
4
  "best_model_checkpoint": null,
5
- "epoch": 2.1777777777777776,
6
  "eval_steps": 500,
7
  "global_step": 50,
8
  "is_hyper_param_search": false,
@@ -10,78 +10,78 @@
10
  "is_world_process_zero": true,
11
  "log_history": [
12
  {
13
- "epoch": 0.2222222222222222,
14
- "grad_norm": 0.3584189713001251,
15
- "learning_rate": 8e-05,
16
- "loss": 1.0947793006896973,
17
  "step": 5
18
  },
19
  {
20
- "epoch": 0.4444444444444444,
21
- "grad_norm": 0.32905852794647217,
22
- "learning_rate": 0.00018,
23
- "loss": 0.935941219329834,
24
  "step": 10
25
  },
26
  {
27
- "epoch": 0.6666666666666666,
28
- "grad_norm": 0.3259493410587311,
29
- "learning_rate": 0.0001902439024390244,
30
- "loss": 0.8043601036071777,
31
  "step": 15
32
  },
33
  {
34
- "epoch": 0.8888888888888888,
35
- "grad_norm": 0.29462185502052307,
36
- "learning_rate": 0.00017804878048780488,
37
- "loss": 0.8039141654968261,
38
  "step": 20
39
  },
40
  {
41
- "epoch": 1.0888888888888888,
42
- "grad_norm": 0.24384929239749908,
43
- "learning_rate": 0.00016585365853658536,
44
- "loss": 0.781571626663208,
45
  "step": 25
46
  },
47
  {
48
- "epoch": 1.3111111111111111,
49
- "grad_norm": 0.22671706974506378,
50
- "learning_rate": 0.00015365853658536586,
51
- "loss": 0.7156254768371582,
52
  "step": 30
53
  },
54
  {
55
- "epoch": 1.5333333333333332,
56
- "grad_norm": 0.24103912711143494,
57
- "learning_rate": 0.00014146341463414634,
58
- "loss": 0.6995349407196045,
59
  "step": 35
60
  },
61
  {
62
- "epoch": 1.7555555555555555,
63
- "grad_norm": 0.3071809709072113,
64
- "learning_rate": 0.00012926829268292684,
65
- "loss": 0.6471355438232422,
66
  "step": 40
67
  },
68
  {
69
- "epoch": 1.9777777777777779,
70
- "grad_norm": 0.30578622221946716,
71
- "learning_rate": 0.00011707317073170732,
72
- "loss": 0.6253304481506348,
73
  "step": 45
74
  },
75
  {
76
- "epoch": 2.1777777777777776,
77
- "grad_norm": 0.28660672903060913,
78
- "learning_rate": 0.00010487804878048781,
79
- "loss": 0.6118562698364258,
80
  "step": 50
81
  }
82
  ],
83
  "logging_steps": 5,
84
- "max_steps": 92,
85
  "num_input_tokens_seen": 0,
86
  "num_train_epochs": 4,
87
  "save_steps": 50,
@@ -97,7 +97,7 @@
97
  "attributes": {}
98
  }
99
  },
100
- "total_flos": 1.7334951315990528e+16,
101
  "train_batch_size": 2,
102
  "trial_name": null,
103
  "trial_params": null
 
2
  "best_global_step": null,
3
  "best_metric": null,
4
  "best_model_checkpoint": null,
5
+ "epoch": 2.3855421686746987,
6
  "eval_steps": 500,
7
  "global_step": 50,
8
  "is_hyper_param_search": false,
 
10
  "is_world_process_zero": true,
11
  "log_history": [
12
  {
13
+ "epoch": 0.24096385542168675,
14
+ "grad_norm": 0.28208473324775696,
15
+ "learning_rate": 8.888888888888889e-05,
16
+ "loss": 1.0793883323669433,
17
  "step": 5
18
  },
19
  {
20
+ "epoch": 0.4819277108433735,
21
+ "grad_norm": 0.28007975220680237,
22
+ "learning_rate": 0.0002,
23
+ "loss": 1.037606430053711,
24
  "step": 10
25
  },
26
  {
27
+ "epoch": 0.7228915662650602,
28
+ "grad_norm": 0.20863637328147888,
29
+ "learning_rate": 0.0001866666666666667,
30
+ "loss": 1.014635181427002,
31
  "step": 15
32
  },
33
  {
34
+ "epoch": 0.963855421686747,
35
+ "grad_norm": 0.21166877448558807,
36
+ "learning_rate": 0.00017333333333333334,
37
+ "loss": 0.8656803131103515,
38
  "step": 20
39
  },
40
  {
41
+ "epoch": 1.1927710843373494,
42
+ "grad_norm": 0.20437344908714294,
43
+ "learning_rate": 0.00016,
44
+ "loss": 0.7858738899230957,
45
  "step": 25
46
  },
47
  {
48
+ "epoch": 1.4337349397590362,
49
+ "grad_norm": 0.2418038249015808,
50
+ "learning_rate": 0.00014666666666666666,
51
+ "loss": 0.8250644683837891,
52
  "step": 30
53
  },
54
  {
55
+ "epoch": 1.6746987951807228,
56
+ "grad_norm": 0.22985580563545227,
57
+ "learning_rate": 0.00013333333333333334,
58
+ "loss": 0.7688564777374267,
59
  "step": 35
60
  },
61
  {
62
+ "epoch": 1.9156626506024095,
63
+ "grad_norm": 0.25983402132987976,
64
+ "learning_rate": 0.00012,
65
+ "loss": 0.7662355899810791,
66
  "step": 40
67
  },
68
  {
69
+ "epoch": 2.144578313253012,
70
+ "grad_norm": 0.24481230974197388,
71
+ "learning_rate": 0.00010666666666666667,
72
+ "loss": 0.7485552787780761,
73
  "step": 45
74
  },
75
  {
76
+ "epoch": 2.3855421686746987,
77
+ "grad_norm": 0.2914965748786926,
78
+ "learning_rate": 9.333333333333334e-05,
79
+ "loss": 0.6992795467376709,
80
  "step": 50
81
  }
82
  ],
83
  "logging_steps": 5,
84
+ "max_steps": 84,
85
  "num_input_tokens_seen": 0,
86
  "num_train_epochs": 4,
87
  "save_steps": 50,
 
97
  "attributes": {}
98
  }
99
  },
100
+ "total_flos": 1.9059574215542784e+16,
101
  "train_batch_size": 2,
102
  "trial_name": null,
103
  "trial_params": null
checkpoint-50/training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9b399b89e9ae5eb79e30ecf35667d9ec0c6f34f86e26f2e5d8843612a5d31a4d
3
  size 5713
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21802bdae0f32f165e782237bf70a9c814806ab8591a6154639b25c94b1e3158
3
  size 5713
checkpoint-84/README.md ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit
7
+ - lora
8
+ - sft
9
+ - transformers
10
+ - trl
11
+ - unsloth
12
+ ---
13
+
14
+ # Model Card for Model ID
15
+
16
+ <!-- Provide a quick summary of what the model is/does. -->
17
+
18
+
19
+
20
+ ## Model Details
21
+
22
+ ### Model Description
23
+
24
+ <!-- Provide a longer summary of what this model is. -->
25
+
26
+
27
+
28
+ - **Developed by:** [More Information Needed]
29
+ - **Funded by [optional]:** [More Information Needed]
30
+ - **Shared by [optional]:** [More Information Needed]
31
+ - **Model type:** [More Information Needed]
32
+ - **Language(s) (NLP):** [More Information Needed]
33
+ - **License:** [More Information Needed]
34
+ - **Finetuned from model [optional]:** [More Information Needed]
35
+
36
+ ### Model Sources [optional]
37
+
38
+ <!-- Provide the basic links for the model. -->
39
+
40
+ - **Repository:** [More Information Needed]
41
+ - **Paper [optional]:** [More Information Needed]
42
+ - **Demo [optional]:** [More Information Needed]
43
+
44
+ ## Uses
45
+
46
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
47
+
48
+ ### Direct Use
49
+
50
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
51
+
52
+ [More Information Needed]
53
+
54
+ ### Downstream Use [optional]
55
+
56
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
57
+
58
+ [More Information Needed]
59
+
60
+ ### Out-of-Scope Use
61
+
62
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
63
+
64
+ [More Information Needed]
65
+
66
+ ## Bias, Risks, and Limitations
67
+
68
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
69
+
70
+ [More Information Needed]
71
+
72
+ ### Recommendations
73
+
74
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
75
+
76
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
77
+
78
+ ## How to Get Started with the Model
79
+
80
+ Use the code below to get started with the model.
81
+
82
+ [More Information Needed]
83
+
84
+ ## Training Details
85
+
86
+ ### Training Data
87
+
88
+ <!-- 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. -->
89
+
90
+ [More Information Needed]
91
+
92
+ ### Training Procedure
93
+
94
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
95
+
96
+ #### Preprocessing [optional]
97
+
98
+ [More Information Needed]
99
+
100
+
101
+ #### Training Hyperparameters
102
+
103
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
104
+
105
+ #### Speeds, Sizes, Times [optional]
106
+
107
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
108
+
109
+ [More Information Needed]
110
+
111
+ ## Evaluation
112
+
113
+ <!-- This section describes the evaluation protocols and provides the results. -->
114
+
115
+ ### Testing Data, Factors & Metrics
116
+
117
+ #### Testing Data
118
+
119
+ <!-- This should link to a Dataset Card if possible. -->
120
+
121
+ [More Information Needed]
122
+
123
+ #### Factors
124
+
125
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
126
+
127
+ [More Information Needed]
128
+
129
+ #### Metrics
130
+
131
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
132
+
133
+ [More Information Needed]
134
+
135
+ ### Results
136
+
137
+ [More Information Needed]
138
+
139
+ #### Summary
140
+
141
+
142
+
143
+ ## Model Examination [optional]
144
+
145
+ <!-- Relevant interpretability work for the model goes here -->
146
+
147
+ [More Information Needed]
148
+
149
+ ## Environmental Impact
150
+
151
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
152
+
153
+ 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).
154
+
155
+ - **Hardware Type:** [More Information Needed]
156
+ - **Hours used:** [More Information Needed]
157
+ - **Cloud Provider:** [More Information Needed]
158
+ - **Compute Region:** [More Information Needed]
159
+ - **Carbon Emitted:** [More Information Needed]
160
+
161
+ ## Technical Specifications [optional]
162
+
163
+ ### Model Architecture and Objective
164
+
165
+ [More Information Needed]
166
+
167
+ ### Compute Infrastructure
168
+
169
+ [More Information Needed]
170
+
171
+ #### Hardware
172
+
173
+ [More Information Needed]
174
+
175
+ #### Software
176
+
177
+ [More Information Needed]
178
+
179
+ ## Citation [optional]
180
+
181
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
182
+
183
+ **BibTeX:**
184
+
185
+ [More Information Needed]
186
+
187
+ **APA:**
188
+
189
+ [More Information Needed]
190
+
191
+ ## Glossary [optional]
192
+
193
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
194
+
195
+ [More Information Needed]
196
+
197
+ ## More Information [optional]
198
+
199
+ [More Information Needed]
200
+
201
+ ## Model Card Authors [optional]
202
+
203
+ [More Information Needed]
204
+
205
+ ## Model Card Contact
206
+
207
+ [More Information Needed]
208
+ ### Framework versions
209
+
210
+ - PEFT 0.18.1
checkpoint-84/adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "LlamaForCausalLM",
7
+ "parent_library": "transformers.models.llama.modeling_llama",
8
+ "unsloth_fixed": true
9
+ },
10
+ "base_model_name_or_path": "unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit",
11
+ "bias": "none",
12
+ "corda_config": null,
13
+ "ensure_weight_tying": false,
14
+ "eva_config": null,
15
+ "exclude_modules": null,
16
+ "fan_in_fan_out": false,
17
+ "inference_mode": true,
18
+ "init_lora_weights": true,
19
+ "layer_replication": null,
20
+ "layers_pattern": null,
21
+ "layers_to_transform": null,
22
+ "loftq_config": {},
23
+ "lora_alpha": 32,
24
+ "lora_bias": false,
25
+ "lora_dropout": 0.05,
26
+ "megatron_config": null,
27
+ "megatron_core": "megatron.core",
28
+ "modules_to_save": null,
29
+ "peft_type": "LORA",
30
+ "peft_version": "0.18.1",
31
+ "qalora_group_size": 16,
32
+ "r": 32,
33
+ "rank_pattern": {},
34
+ "revision": null,
35
+ "target_modules": [
36
+ "o_proj",
37
+ "up_proj",
38
+ "q_proj",
39
+ "gate_proj",
40
+ "down_proj",
41
+ "v_proj",
42
+ "k_proj"
43
+ ],
44
+ "target_parameters": null,
45
+ "task_type": "CAUSAL_LM",
46
+ "trainable_token_indices": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false
50
+ }
checkpoint-84/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:043556955c06ce77ec2285df5a6365178f0161acbe642dc71c6d9ffb4fae6e7e
3
+ size 194563400
checkpoint-84/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 %}
checkpoint-84/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5650634684e032957534f6dcad7702d32bb733e8eadbb52a6f5723754c369548
3
+ size 99240133
checkpoint-84/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:efd5d0829f9631beffb92aa0e6cfa88a108349da8da768753136700d49de5c3a
3
+ size 14645
checkpoint-84/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a9bc9a38486c58ac27b0158e1e1443ad50b7e5bb529123e259ccf4c661ed068
3
+ size 1465
checkpoint-84/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
3
+ size 17209920
checkpoint-84/tokenizer_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|begin_of_text|>",
4
+ "clean_up_tokenization_spaces": true,
5
+ "eos_token": "<|eot_id|>",
6
+ "from_slow": true,
7
+ "is_local": false,
8
+ "legacy": false,
9
+ "model_input_names": [
10
+ "input_ids",
11
+ "attention_mask"
12
+ ],
13
+ "model_max_length": 131072,
14
+ "pad_token": "<|finetune_right_pad_id|>",
15
+ "padding_side": "right",
16
+ "tokenizer_class": "TokenizersBackend",
17
+ "unk_token": null
18
+ }
checkpoint-84/trainer_state.json ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 4.0,
6
+ "eval_steps": 500,
7
+ "global_step": 84,
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.24096385542168675,
14
+ "grad_norm": 0.28208473324775696,
15
+ "learning_rate": 8.888888888888889e-05,
16
+ "loss": 1.0793883323669433,
17
+ "step": 5
18
+ },
19
+ {
20
+ "epoch": 0.4819277108433735,
21
+ "grad_norm": 0.28007975220680237,
22
+ "learning_rate": 0.0002,
23
+ "loss": 1.037606430053711,
24
+ "step": 10
25
+ },
26
+ {
27
+ "epoch": 0.7228915662650602,
28
+ "grad_norm": 0.20863637328147888,
29
+ "learning_rate": 0.0001866666666666667,
30
+ "loss": 1.014635181427002,
31
+ "step": 15
32
+ },
33
+ {
34
+ "epoch": 0.963855421686747,
35
+ "grad_norm": 0.21166877448558807,
36
+ "learning_rate": 0.00017333333333333334,
37
+ "loss": 0.8656803131103515,
38
+ "step": 20
39
+ },
40
+ {
41
+ "epoch": 1.1927710843373494,
42
+ "grad_norm": 0.20437344908714294,
43
+ "learning_rate": 0.00016,
44
+ "loss": 0.7858738899230957,
45
+ "step": 25
46
+ },
47
+ {
48
+ "epoch": 1.4337349397590362,
49
+ "grad_norm": 0.2418038249015808,
50
+ "learning_rate": 0.00014666666666666666,
51
+ "loss": 0.8250644683837891,
52
+ "step": 30
53
+ },
54
+ {
55
+ "epoch": 1.6746987951807228,
56
+ "grad_norm": 0.22985580563545227,
57
+ "learning_rate": 0.00013333333333333334,
58
+ "loss": 0.7688564777374267,
59
+ "step": 35
60
+ },
61
+ {
62
+ "epoch": 1.9156626506024095,
63
+ "grad_norm": 0.25983402132987976,
64
+ "learning_rate": 0.00012,
65
+ "loss": 0.7662355899810791,
66
+ "step": 40
67
+ },
68
+ {
69
+ "epoch": 2.144578313253012,
70
+ "grad_norm": 0.24481230974197388,
71
+ "learning_rate": 0.00010666666666666667,
72
+ "loss": 0.7485552787780761,
73
+ "step": 45
74
+ },
75
+ {
76
+ "epoch": 2.3855421686746987,
77
+ "grad_norm": 0.2914965748786926,
78
+ "learning_rate": 9.333333333333334e-05,
79
+ "loss": 0.6992795467376709,
80
+ "step": 50
81
+ },
82
+ {
83
+ "epoch": 2.6265060240963853,
84
+ "grad_norm": 0.32068315148353577,
85
+ "learning_rate": 8e-05,
86
+ "loss": 0.6396950721740723,
87
+ "step": 55
88
+ },
89
+ {
90
+ "epoch": 2.8674698795180724,
91
+ "grad_norm": 0.25515061616897583,
92
+ "learning_rate": 6.666666666666667e-05,
93
+ "loss": 0.6195734024047852,
94
+ "step": 60
95
+ },
96
+ {
97
+ "epoch": 3.0963855421686746,
98
+ "grad_norm": 0.24448628723621368,
99
+ "learning_rate": 5.333333333333333e-05,
100
+ "loss": 0.6165074825286865,
101
+ "step": 65
102
+ },
103
+ {
104
+ "epoch": 3.337349397590361,
105
+ "grad_norm": 0.34485942125320435,
106
+ "learning_rate": 4e-05,
107
+ "loss": 0.5609269618988038,
108
+ "step": 70
109
+ },
110
+ {
111
+ "epoch": 3.5783132530120483,
112
+ "grad_norm": 0.3577536344528198,
113
+ "learning_rate": 2.6666666666666667e-05,
114
+ "loss": 0.6185156345367432,
115
+ "step": 75
116
+ },
117
+ {
118
+ "epoch": 3.819277108433735,
119
+ "grad_norm": 0.3738943338394165,
120
+ "learning_rate": 1.3333333333333333e-05,
121
+ "loss": 0.5909633159637451,
122
+ "step": 80
123
+ }
124
+ ],
125
+ "logging_steps": 5,
126
+ "max_steps": 84,
127
+ "num_input_tokens_seen": 0,
128
+ "num_train_epochs": 4,
129
+ "save_steps": 50,
130
+ "stateful_callbacks": {
131
+ "TrainerControl": {
132
+ "args": {
133
+ "should_epoch_stop": false,
134
+ "should_evaluate": false,
135
+ "should_log": false,
136
+ "should_save": true,
137
+ "should_training_stop": true
138
+ },
139
+ "attributes": {}
140
+ }
141
+ },
142
+ "total_flos": 3.1773171341666304e+16,
143
+ "train_batch_size": 2,
144
+ "trial_name": null,
145
+ "trial_params": null
146
+ }
checkpoint-84/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21802bdae0f32f165e782237bf70a9c814806ab8591a6154639b25c94b1e3158
3
+ size 5713