yzhuang commited on
Commit
484b217
·
verified ·
1 Parent(s): 084329d

Training in progress, step 1000

Browse files
config.json ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "yzhuang/llava-jamba-1.5-Mini-linear-anyres-patch",
3
+ "architectures": [
4
+ "LlavaJambaForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "attn_layer_offset": 4,
8
+ "attn_layer_period": 8,
9
+ "bos_token_id": 1,
10
+ "eos_token_id": [
11
+ 2,
12
+ 518
13
+ ],
14
+ "expert_layer_offset": 1,
15
+ "expert_layer_period": 2,
16
+ "freeze_mm_mlp_adapter": false,
17
+ "hidden_act": "silu",
18
+ "hidden_size": 4096,
19
+ "image_aspect_ratio": "anyres",
20
+ "image_grid_pinpoints": [
21
+ [
22
+ 336,
23
+ 336
24
+ ],
25
+ [
26
+ 336,
27
+ 672
28
+ ],
29
+ [
30
+ 336,
31
+ 1008
32
+ ],
33
+ [
34
+ 336,
35
+ 1344
36
+ ],
37
+ [
38
+ 336,
39
+ 1680
40
+ ],
41
+ [
42
+ 336,
43
+ 2016
44
+ ],
45
+ [
46
+ 336,
47
+ 2352
48
+ ],
49
+ [
50
+ 336,
51
+ 2688
52
+ ],
53
+ [
54
+ 336,
55
+ 3024
56
+ ],
57
+ [
58
+ 336,
59
+ 3360
60
+ ],
61
+ [
62
+ 336,
63
+ 3696
64
+ ],
65
+ [
66
+ 336,
67
+ 4032
68
+ ],
69
+ [
70
+ 336,
71
+ 4368
72
+ ],
73
+ [
74
+ 336,
75
+ 4704
76
+ ],
77
+ [
78
+ 336,
79
+ 5040
80
+ ],
81
+ [
82
+ 672,
83
+ 336
84
+ ],
85
+ [
86
+ 672,
87
+ 672
88
+ ],
89
+ [
90
+ 672,
91
+ 1008
92
+ ],
93
+ [
94
+ 672,
95
+ 1344
96
+ ],
97
+ [
98
+ 672,
99
+ 1680
100
+ ],
101
+ [
102
+ 672,
103
+ 2016
104
+ ],
105
+ [
106
+ 672,
107
+ 2352
108
+ ],
109
+ [
110
+ 672,
111
+ 2688
112
+ ],
113
+ [
114
+ 1008,
115
+ 336
116
+ ],
117
+ [
118
+ 1008,
119
+ 672
120
+ ],
121
+ [
122
+ 1008,
123
+ 1008
124
+ ],
125
+ [
126
+ 1008,
127
+ 1344
128
+ ],
129
+ [
130
+ 1008,
131
+ 1680
132
+ ],
133
+ [
134
+ 1344,
135
+ 336
136
+ ],
137
+ [
138
+ 1344,
139
+ 672
140
+ ],
141
+ [
142
+ 1344,
143
+ 1008
144
+ ],
145
+ [
146
+ 1344,
147
+ 1344
148
+ ],
149
+ [
150
+ 1680,
151
+ 336
152
+ ],
153
+ [
154
+ 1680,
155
+ 672
156
+ ],
157
+ [
158
+ 1680,
159
+ 1008
160
+ ],
161
+ [
162
+ 2016,
163
+ 336
164
+ ],
165
+ [
166
+ 2016,
167
+ 672
168
+ ],
169
+ [
170
+ 2352,
171
+ 336
172
+ ],
173
+ [
174
+ 2352,
175
+ 672
176
+ ],
177
+ [
178
+ 2688,
179
+ 336
180
+ ],
181
+ [
182
+ 2688,
183
+ 672
184
+ ],
185
+ [
186
+ 3024,
187
+ 336
188
+ ],
189
+ [
190
+ 3360,
191
+ 336
192
+ ],
193
+ [
194
+ 3696,
195
+ 336
196
+ ],
197
+ [
198
+ 4032,
199
+ 336
200
+ ],
201
+ [
202
+ 4368,
203
+ 336
204
+ ],
205
+ [
206
+ 4704,
207
+ 336
208
+ ],
209
+ [
210
+ 5040,
211
+ 336
212
+ ]
213
+ ],
214
+ "initializer_range": 0.02,
215
+ "intermediate_size": 14336,
216
+ "mamba_conv_bias": true,
217
+ "mamba_d_conv": 4,
218
+ "mamba_d_state": 16,
219
+ "mamba_dt_rank": 256,
220
+ "mamba_expand": 2,
221
+ "mamba_proj_bias": false,
222
+ "max_position_embeddings": 262144,
223
+ "mm_hidden_size": 1024,
224
+ "mm_patch_merge_type": "spatial_unpad",
225
+ "mm_projector_lr": null,
226
+ "mm_projector_type": "linear",
227
+ "mm_use_im_patch_token": false,
228
+ "mm_use_im_start_end": false,
229
+ "mm_vision_select_feature": "patch",
230
+ "mm_vision_select_layer": -2,
231
+ "mm_vision_tower": "openai/clip-vit-large-patch14-336",
232
+ "mm_vision_tower_lr": 2e-06,
233
+ "model_type": "jamba",
234
+ "num_attention_heads": 32,
235
+ "num_experts": 16,
236
+ "num_experts_per_tok": 2,
237
+ "num_hidden_layers": 32,
238
+ "num_key_value_heads": 8,
239
+ "num_logits_to_keep": 1,
240
+ "output_router_logits": false,
241
+ "pad_token_id": 0,
242
+ "rms_norm_eps": 1e-06,
243
+ "router_aux_loss_coef": 0.001,
244
+ "sliding_window": null,
245
+ "tie_word_embeddings": false,
246
+ "tokenizer_model_max_length": 18240,
247
+ "tokenizer_padding_side": "right",
248
+ "torch_dtype": "bfloat16",
249
+ "transformers_version": "4.45.0.dev0",
250
+ "tune_mm_mlp_adapter": false,
251
+ "unfreeze_mm_vision_tower": false,
252
+ "use_cache": false,
253
+ "use_image_rope": false,
254
+ "use_mamba_kernels": true,
255
+ "use_mm_proj": true,
256
+ "vocab_size": 65536
257
+ }
model-00001-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:386e4f9c479995ec5a326c07b24bc33dc03fcbaeb0592c1f6c70d8e09f0fec45
3
+ size 4951245440
model-00002-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b6750b585caa3809a9ef3ef2fdaf008cd893f3836271c3ef18c1465dc0aa777
3
+ size 4884145352
model-00003-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58bb948cc02087d03a70212a5940f784f4cea446ec9e1b5646613928b2747ed1
3
+ size 4992294984
model-00004-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a368260808cfc18d11bed405b5ed75c096cd31c7e3dd0f2196d6153f7b9b00b
3
+ size 4958591424
model-00005-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3b6a5e1b88295b97b21a4b85d43b283d0aa5844f9485fa868e3cda68bfd9a99
3
+ size 4975501696
model-00006-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:315230b502c15ccc6ee90b0035b2b5a142f7bad5037e2f8341d0148b2b0b1f75
3
+ size 4884145344
model-00007-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c126bf443931fff1581cfdcf1362dcac59b2c61bca5a33163dae0e0872df469
3
+ size 4884145368
model-00008-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:515893de665c2fc7f1a908667165ad7a1c01a70d79d781bc4bdf3b4666cf63f9
3
+ size 4992295040
model-00009-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5d88c9c1d3228ea043eba7f696a8bc8226d5f6008652a6c96c176e779b680b5
3
+ size 4932507176
model-00010-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:347938f7a1838c2d6c66c9c452af05ece830328cff57d15ac874373eb190f5e3
3
+ size 4884145400
model-00011-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb23167465182b73203f1c28bd3b492945fb9868bc8dd43bb7fbf3f516c1100a
3
+ size 4884145424
model-00012-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0b480a19dd22bc9fed4bb45642761286e64fbfe75cc48faaa5f4c791118a87d
3
+ size 4884145416
model-00013-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e6831e75c75beb2e6f8b838b387a89c6cf44a78f96892e3b106e9835ba49f47
3
+ size 4932507176
model-00014-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9082d1523e22ccc2687ba7eabd1e9bdb61367b59af21e78316741d64033e2e7
3
+ size 4992295016
model-00015-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4d6be766121d456d87ed9dc9d4f04f4ebb49596dc1761432e6f180a8e489da9
3
+ size 4884145416
model-00016-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5067fbcc4cc365fe01d2813b4f33d1abbb8e2438ca4620ff723443201b02e444
3
+ size 4884145416
model-00017-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8dccf7a44bcaa9d79706ac00abe3222c452d4319f21cb134b162eb2195e04e9a
3
+ size 4908260720
model-00018-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d82f829bc79e3e0b4037465f710c29f83eb2e70ef7a43a7f3a427c8a26518fd
3
+ size 4908391864
model-00019-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dcbc4153087dcb9d4e270b65eba87ed6275903d04b87ba44b48eb4647defc8e4
3
+ size 4992295032
model-00020-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b01fe19b2d204b1cb37de4e4b73de77acc5126eaa588719198f3231bde2850b
3
+ size 4884145424
model-00021-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0acb0c82b608df6145048f56ba79ca0d0fd34776dfe4c5a42d36ca3b0e6456a
3
+ size 4725920848
model-00022-of-00022.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e3bff97069e2c9f077649c8e32ee4db6a4a68df2ff5b8d1d6336330afd99ee0
3
+ size 536872144
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|eom|>",
4
+ "<|bom|>",
5
+ "<|system|>",
6
+ "<|user|>",
7
+ "<|assistant|>",
8
+ "<|tool|>",
9
+ "<documents>",
10
+ "</documents>",
11
+ "<tool_definitions>",
12
+ "</tool_definitions>",
13
+ "<active_output_modes>",
14
+ "</active_output_modes>",
15
+ "<citations>",
16
+ "</citations>",
17
+ "<tool_calls>",
18
+ "</tool_calls>"
19
+ ],
20
+ "bos_token": {
21
+ "content": "<|startoftext|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false
26
+ },
27
+ "eos_token": {
28
+ "content": "<|endoftext|>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false
33
+ },
34
+ "pad_token": {
35
+ "content": "<|pad|>",
36
+ "lstrip": false,
37
+ "normalized": false,
38
+ "rstrip": false,
39
+ "single_word": false
40
+ },
41
+ "unk_token": {
42
+ "content": "<|unk|>",
43
+ "lstrip": false,
44
+ "normalized": false,
45
+ "rstrip": false,
46
+ "single_word": false
47
+ }
48
+ }
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b0df4fb43262c452ef37061951a06df4c63ca191d02a60ea08f14428af24376
3
+ size 1124714
tokenizer_config.json ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": true,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<|pad|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<|startoftext|>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "<|endoftext|>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "3": {
31
+ "content": "<|unk|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "518": {
39
+ "content": "<|eom|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "519": {
47
+ "content": "<|bom|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": true
53
+ },
54
+ "520": {
55
+ "content": "<|system|>",
56
+ "lstrip": false,
57
+ "normalized": false,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": true
61
+ },
62
+ "521": {
63
+ "content": "<|user|>",
64
+ "lstrip": false,
65
+ "normalized": false,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": true
69
+ },
70
+ "522": {
71
+ "content": "<|assistant|>",
72
+ "lstrip": false,
73
+ "normalized": false,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": true
77
+ },
78
+ "523": {
79
+ "content": "<|tool|>",
80
+ "lstrip": false,
81
+ "normalized": false,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": true
85
+ },
86
+ "524": {
87
+ "content": "<documents>",
88
+ "lstrip": false,
89
+ "normalized": false,
90
+ "rstrip": false,
91
+ "single_word": false,
92
+ "special": true
93
+ },
94
+ "525": {
95
+ "content": "</documents>",
96
+ "lstrip": false,
97
+ "normalized": false,
98
+ "rstrip": false,
99
+ "single_word": false,
100
+ "special": true
101
+ },
102
+ "526": {
103
+ "content": "<tool_definitions>",
104
+ "lstrip": false,
105
+ "normalized": false,
106
+ "rstrip": false,
107
+ "single_word": false,
108
+ "special": true
109
+ },
110
+ "527": {
111
+ "content": "</tool_definitions>",
112
+ "lstrip": false,
113
+ "normalized": false,
114
+ "rstrip": false,
115
+ "single_word": false,
116
+ "special": true
117
+ },
118
+ "528": {
119
+ "content": "<active_output_modes>",
120
+ "lstrip": false,
121
+ "normalized": false,
122
+ "rstrip": false,
123
+ "single_word": false,
124
+ "special": true
125
+ },
126
+ "529": {
127
+ "content": "</active_output_modes>",
128
+ "lstrip": false,
129
+ "normalized": false,
130
+ "rstrip": false,
131
+ "single_word": false,
132
+ "special": true
133
+ },
134
+ "530": {
135
+ "content": "<citations>",
136
+ "lstrip": false,
137
+ "normalized": false,
138
+ "rstrip": false,
139
+ "single_word": false,
140
+ "special": true
141
+ },
142
+ "531": {
143
+ "content": "</citations>",
144
+ "lstrip": false,
145
+ "normalized": false,
146
+ "rstrip": false,
147
+ "single_word": false,
148
+ "special": true
149
+ },
150
+ "532": {
151
+ "content": "<tool_calls>",
152
+ "lstrip": false,
153
+ "normalized": false,
154
+ "rstrip": false,
155
+ "single_word": false,
156
+ "special": true
157
+ },
158
+ "533": {
159
+ "content": "</tool_calls>",
160
+ "lstrip": false,
161
+ "normalized": false,
162
+ "rstrip": false,
163
+ "single_word": false,
164
+ "special": true
165
+ }
166
+ },
167
+ "additional_special_tokens": [
168
+ "<|eom|>",
169
+ "<|bom|>",
170
+ "<|system|>",
171
+ "<|user|>",
172
+ "<|assistant|>",
173
+ "<|tool|>",
174
+ "<documents>",
175
+ "</documents>",
176
+ "<tool_definitions>",
177
+ "</tool_definitions>",
178
+ "<active_output_modes>",
179
+ "</active_output_modes>",
180
+ "<citations>",
181
+ "</citations>",
182
+ "<tool_calls>",
183
+ "</tool_calls>"
184
+ ],
185
+ "bos_token": "<|startoftext|>",
186
+ "chat_template": "{# Variables #}\n{% set ns = namespace(message_count=0, is_last_checked_defined=False) %}\n{##}\n{% set bom_str = bom_str or \"<|bom|>\" %}\n{% set eom_str = eom_str or \"<|eom|>\" %}\n{% set default_system_message = \"\" %}\n{##}\n{% set documents_prefix = \"<documents>\" %}\n{% set documents_suffix = \"</documents>\" %}\n{% set tool_definitions_prefix = \"<tool_definitions>\" %}\n{% set tool_definitions_suffix = \"</tool_definitions>\" %}\n{% set active_modes_prefix = \"<active_output_modes>\" %}\n{% set active_modes_suffix = \"</active_output_modes>\" %}\n{##}\n{% set tool_calls_prefix = \"<tool_calls>\" %}\n{% set tool_calls_suffix = \"</tool_calls>\" %}\n{% set citations_prefix = \"<citations>\" %}\n{% set citations_suffix = \"</citations>\" %}\n{##}\n{% if add_generation_prompt is not defined %}\n {% set add_generation_prompt = True %}\n{% endif %}\n{% set role_to_predict = role_to_predict or \"assistant\" %}\n{% if messages|length > 0 and messages[0].role == \"system\" %}\n {% set system_message = messages[0].content %}\n {% set loop_messages = messages[1:] %}\n{% else %}\n {% set system_message = default_system_message %}\n {% set loop_messages = messages %}\n{% endif %}\n{##}\n{##}\n{# Macros #}\n{% macro handle_tool_definitions(tools) %}\n {{- tool_definitions_prefix -}}\n {{- \"\\n# Tools\" -}}\n {{- \"\\n\\n## Functions\" -}}\n {% for tool in tools %}\n {% set _ = is_param_set(tool, field=\"type\") %}\n {% set is_tool_type_set = ns.is_last_checked_defined %}\n {% if is_tool_type_set %}\n {% if tool.type == \"function\" %}\n {% set tool = tool.function %}\n {% else %}\n {{ raise_exception(\"Currently, the only supported tool type is `function`\") }}\n {% endif %}\n {% endif %}\n {{- \"\\n\\n\" + (tool|tojson(indent=2)) -}}\n {% endfor %}\n {{- \"\\n\" + tool_definitions_suffix -}}\n{% endmacro %}\n{##}\n{% macro handle_first_system_message(system_message, tools) %}\n {{- bom_str + handle_role(\"system\") -}}\n {% set _ = is_param_set(system_message) %}\n {% set is_system_message_set = ns.is_last_checked_defined %}\n {% if is_system_message_set %}\n {{- system_message -}}\n {% endif %}\n {% set _ = is_param_set(tools, is_list=True) %}\n {% set is_tools_set = ns.is_last_checked_defined %}\n {% if is_tools_set %}\n {% if system_message %}\n {{- \"\\n\\n\" -}}\n {% endif %}\n {{- handle_tool_definitions(tools) -}}\n {% endif %}\n {% set ns.message_count = ns.message_count + 1 %}\n{% endmacro %}\n{##}\n{% macro handle_tool_calls(tool_calls) %}\n {{- tool_calls_prefix + \"[\\n\" -}}\n {% for tool_call in tool_calls %}\n {% set _ = is_param_set(tool_call, field=\"function\") %}\n {% set is_tool_call_function_set = ns.is_last_checked_defined %}\n {% if is_tool_call_function_set %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {% set arguments = tool_call.arguments %}\n {% if arguments is not string %}\n {%- set arguments = arguments|tojson -%}\n {%- endif %}\n {{ \"{\\\"name\\\": \\\"\" + tool_call.name + \"\\\", \\\"arguments\\\": \" + arguments + \"}\" -}}\n {% if not loop.last %}\n {{- \",\" }}\n {% endif %}\n {% endfor %}\n {{- \"\\n]\" + tool_calls_suffix -}}\n{% endmacro %}\n{##}\n{% macro handle_documents(documents) %}\n {{- documents_prefix -}}\n {{- \"\\n# Documents\" -}}\n {{- \"\\n\\nYou can use the following documents for reference:\" -}}\n {% for doc in documents %}\n {{- \"\\n\\n## Document ID: \" + loop.index0|string -}}\n {% set _ = is_param_set(doc, field=\"title\") %}\n {% set is_doc_title_set = ns.is_last_checked_defined %}\n {% if is_doc_title_set %}\n {{- \"\\nTitle: \" + doc.title -}}\n {% endif %}\n {% for key, value in doc.items() %}\n {% if key not in [\"title\", \"text\"] %}\n {{- \"\\n\" + key|title + \": \" + value|string -}}\n {% endif %}\n {% endfor %}\n {{- \"\\nText: \" + doc.text -}}\n {% endfor %}\n {{- \"\\n\" + documents_suffix -}}\n{% endmacro %}\n{##}\n{% macro handle_knobs(knobs) %}\n {{- active_modes_prefix -}}\n {{- \"\\n# Active Modes\" -}}\n {{ \"\\n\\nThe following modes configure the format or style of your responses. You should adhere to all currently\" -}}\n {{ \" active modes simultaneously.\" -}}\n {% if knobs.citation_mode == \"fast\" %}\n {{- \"\\n\\n## Citation Mode\" -}}\n {{- \"\\n\\nProvide a list of references only for the documents you base your response on. Format your response\" -}}\n {{ \" with the original answer followed by a citation section. Use this template:\" -}}\n {{ \" `{answer}\" + citations_prefix + \"DOCUMENT_IDS\" + citations_suffix + \"`, where DOCUMENT_IDS are the relevant document numbers\" -}}\n {{ \" (e.g. [2, 5, 9]), or [] if the answer cannot be supported by the provided documents.\" -}}\n {% endif %}\n {% if knobs.response_format == \"json_object\" %}\n {{- \"\\n\\n## JSON Mode\" -}}\n {{ \"\\n\\nProvide your response in JSON format. Adhere strictly to any schema given by the user.\" -}}\n {{ \" If an appropriate JSON format exists, use it without modification.\" -}}\n {% endif %}\n {{- \"\\n\" + active_modes_suffix -}}\n{% endmacro %}\n{##}\n{% macro get_last_user_index(messages) %}\n {% set ns.last_user_index = 0 %}\n {% for message in messages %}\n {% if message.role == 'user' %}\n {% set ns.last_user_index = loop.index0 %}\n {% endif %}\n {% endfor %}\n {{- ns.last_user_index -}}\n{% endmacro %}\n{##}\n{% macro handle_last_system_message(documents, knobs, use_documents, use_knobs) %}\n {{- bom_str + handle_role(\"system\") -}}\n {% set macros_to_call = [] %}\n {% set params_for_macros = [] %}\n {% if use_documents %}\n {% set macros_to_call = macros_to_call + [handle_documents] %}\n {% set params_for_macros = params_for_macros + [[documents]] %}\n {% endif %}\n {% if use_knobs %}\n {% set macros_to_call = macros_to_call + [handle_knobs] %}\n {% set params_for_macros = params_for_macros + [[knobs]] %}\n {% endif %}\n {% for i in range(macros_to_call|length) %}\n {% if i > 0 %}\n {{- \"\\n\\n\" -}}\n {% endif %}\n {{- macros_to_call[i](*params_for_macros[i]) -}}\n {% endfor %}\n {% set ns.message_count = ns.message_count + 1 %}\n{% endmacro %}\n{##}\n{% macro handle_role(role, add_space=True) %}\n {{- \"<|\" + role + \"|>\" -}}\n {% if add_space %}\n {{- \" \" -}}\n {% endif %}\n{% endmacro %}\n{##}\n{% macro is_param_set(param, field=none, is_list=False) %}\n {% if field is not none %}\n {% if field in param %}\n {% set param = param[field] %}\n {% else %}\n {% set param = none %}\n {% endif %}\n {% endif %}\n {% set is_defined = param is defined and param is not none %}\n {% if is_list %}\n {% set ns.is_last_checked_defined = is_defined and param|length > 0 %}\n {% else %}\n {% set ns.is_last_checked_defined = is_defined %}\n {% endif %}\n{% endmacro %}\n{##}\n{##}\n{# Template #}\n{{- \"<|startoftext|>\" -}}\n{% set _ = is_param_set(system_message) %}\n{% set is_system_message_set = ns.is_last_checked_defined %}\n{% set _ = is_param_set(tools, is_list=True) %}\n{% set is_tools_set = ns.is_last_checked_defined %}\n{% set has_system_message = (is_system_message_set or is_tools_set) %}\n{% if has_system_message %}\n {{- handle_first_system_message(system_message, tools) -}}\n{% endif %}\n{% set last_user_index = get_last_user_index(loop_messages)|int %}\n{% for message in loop_messages %}\n {% if loop.index0 == last_user_index %}\n {% set _ = is_param_set(documents, is_list=True) %}\n {% set use_documents = ns.is_last_checked_defined %}\n {% set _ = is_param_set(knobs) %}\n {% set use_knobs = ns.is_last_checked_defined and knobs.is_set %}\n {% set add_last_system_message = use_documents or use_knobs %}\n {% if add_last_system_message %}\n {% if ns.message_count > 0 %}\n {{- eom_str -}}\n {% endif %}\n {{- handle_last_system_message(documents, knobs, use_documents, use_knobs) -}}\n {% endif %}\n {% endif %}\n {% set role = message.role %}\n {% set _ = is_param_set(message, field=\"name\") %}\n {% set is_message_name_set = ns.is_last_checked_defined %}\n {% if is_message_name_set %}\n {% set message_prefix = handle_role(role) + \"(\" + message.name + \")\" %}\n {% else %}\n {% set message_prefix = handle_role(role) %}\n {% endif %}\n {% set content = (message.content or \"\") %}\n {% if content is not string %}\n {% set content = content|tojson %}\n {% endif %}\n {% if ns.message_count > 0 %}\n {{- eom_str -}}\n {% endif %}\n {{- bom_str + message_prefix + content -}}\n {% set _ = is_param_set(message, field=\"tool_calls\", is_list=True) %}\n {% set is_tool_calls_set = ns.is_last_checked_defined %}\n {% if role == \"assistant\" and is_tool_calls_set %}\n {{- handle_tool_calls(message.tool_calls) -}}\n {% endif %}\n {% set _ = is_param_set(message, field=\"citations\", is_list=True) %}\n {% set is_citations_set = ns.is_last_checked_defined %}\n {% if role == \"assistant\" and is_citations_set %}\n {{- citations_prefix + message.citations|map(attribute=\"document_id\")|list|string + citations_suffix -}}\n {% endif %}\n {% set ns.message_count = ns.message_count + 1 %}\n{% endfor %}\n{% if add_generation_prompt %}\n {% if ns.message_count > 0 %}\n {{- eom_str -}}\n {% endif %}\n {{- bom_str + handle_role(role_to_predict, add_space=False) -}}\n {% set _ = is_param_set(generation_preamble) %}\n {% set is_generation_preamble_set = ns.is_last_checked_defined %}\n {% if is_generation_preamble_set and generation_preamble.strip() != \"\" %}\n {{- \" \" + generation_preamble -}}\n {% endif %}\n {% set ns.message_count = ns.message_count + 1 %}\n{% else %}\n {% if ns.message_count > 0 %}\n {{- eom_str -}}\n {% endif %}\n{% endif %}\n",
187
+ "clean_up_tokenization_spaces": false,
188
+ "eos_token": "<|endoftext|>",
189
+ "legacy": true,
190
+ "model_max_length": 18240,
191
+ "pad_token": "<|pad|>",
192
+ "padding_side": "right",
193
+ "sp_model_kwargs": {},
194
+ "spaces_between_special_tokens": false,
195
+ "tokenizer_class": "LlamaTokenizer",
196
+ "unk_token": "<|unk|>",
197
+ "use_default_system_prompt": false
198
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5c3ca75e2b57df5d17668a2d32e482d2d6ac23ad6bfb331c23c1ab1b5d4de5f
3
+ size 7672