Xenova HF Staff commited on
Commit
c737784
·
verified ·
1 Parent(s): bcb1a2f

Add files using upload-large-folder tool

Browse files
.gitattributes CHANGED
@@ -33,3 +33,34 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ onnx/model.onnx_data filter=lfs diff=lfs merge=lfs -text
37
+ onnx/model_fp16.onnx_data_7 filter=lfs diff=lfs merge=lfs -text
38
+ onnx/model.onnx_data_7 filter=lfs diff=lfs merge=lfs -text
39
+ onnx/model.onnx_data_9 filter=lfs diff=lfs merge=lfs -text
40
+ onnx/model.onnx_data_11 filter=lfs diff=lfs merge=lfs -text
41
+ onnx/model.onnx_data_10 filter=lfs diff=lfs merge=lfs -text
42
+ onnx/model_quantized.onnx_data_1 filter=lfs diff=lfs merge=lfs -text
43
+ onnx/model.onnx_data_6 filter=lfs diff=lfs merge=lfs -text
44
+ onnx/model.onnx_data_8 filter=lfs diff=lfs merge=lfs -text
45
+ onnx/model_quantized.onnx_data_3 filter=lfs diff=lfs merge=lfs -text
46
+ onnx/model_quantized.onnx_data filter=lfs diff=lfs merge=lfs -text
47
+ onnx/model_quantized.onnx_data_2 filter=lfs diff=lfs merge=lfs -text
48
+ onnx/model_fp16.onnx_data_6 filter=lfs diff=lfs merge=lfs -text
49
+ onnx/model.onnx_data_1 filter=lfs diff=lfs merge=lfs -text
50
+ onnx/model.onnx_data_12 filter=lfs diff=lfs merge=lfs -text
51
+ onnx/model.onnx_data_13 filter=lfs diff=lfs merge=lfs -text
52
+ onnx/model_fp16.onnx_data_1 filter=lfs diff=lfs merge=lfs -text
53
+ onnx/model_q4f16.onnx_data filter=lfs diff=lfs merge=lfs -text
54
+ onnx/model.onnx_data_14 filter=lfs diff=lfs merge=lfs -text
55
+ onnx/model_q4.onnx_data filter=lfs diff=lfs merge=lfs -text
56
+ onnx/model_fp16.onnx_data filter=lfs diff=lfs merge=lfs -text
57
+ onnx/model.onnx_data_5 filter=lfs diff=lfs merge=lfs -text
58
+ onnx/model_q4.onnx_data_1 filter=lfs diff=lfs merge=lfs -text
59
+ onnx/model.onnx_data_2 filter=lfs diff=lfs merge=lfs -text
60
+ onnx/model.onnx_data_3 filter=lfs diff=lfs merge=lfs -text
61
+ onnx/model_fp16.onnx_data_3 filter=lfs diff=lfs merge=lfs -text
62
+ onnx/model_q4f16.onnx_data_1 filter=lfs diff=lfs merge=lfs -text
63
+ onnx/model.onnx_data_4 filter=lfs diff=lfs merge=lfs -text
64
+ onnx/model_fp16.onnx_data_2 filter=lfs diff=lfs merge=lfs -text
65
+ onnx/model_fp16.onnx_data_4 filter=lfs diff=lfs merge=lfs -text
66
+ onnx/model_fp16.onnx_data_5 filter=lfs diff=lfs merge=lfs -text
chat_template.jinja ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 -%}{%- if not has_system -%}{{- '<|im_start|>system
2
+ You are a helpful function-calling AI assistant. ' -}}{%- if tools is none -%}{{- 'You do not currently have access to any functions. <functions></functions><|im_end|>
3
+ ' -}}{%- else -%}{{- 'You are provided with function signatures within <functions></functions> XML tags. You may call one or more functions to assist with the user query. Output any function calls within <function_calls></function_calls> XML tags. Do not make assumptions about what values to plug into functions.' -}}{{- '<functions>' -}}{{- tools | tojson -}}{{- '</functions><|im_end|>
4
+ ' -}}{%- endif -%}{%- endif -%}{%- for message in messages -%}{%- if message['role'] == 'system' -%}{{- '<|im_start|>system
5
+ ' + message['content'] -}}{%- if tools is not none -%}{{- '<functions>' -}}{{- tools | tojson -}}{{- '</functions>' -}}{%- elif message.get('functions', none) is not none -%}{{- ' <functions>' + message['functions'] + '</functions>' -}}{%- endif -%}{{- '<|im_end|>
6
+ ' -}}{%- elif message['role'] == 'user' -%}{{- '<|im_start|>user
7
+ ' + message['content'] + '<|im_end|>
8
+ ' -}}{%- elif message['role'] == 'assistant' -%}{{- '<|im_start|>assistant
9
+ ' -}}{%- if message.get('content', none) is not none -%}{{- message['content'] -}}{%- endif -%}{%- if message.get('function_calls', none) is not none -%}{{- '<function_calls>' + message['function_calls'] + '</function_calls>' -}}{% elif message.get('tool_calls', none) is not none %}{{- '<function_calls>' -}}{%- for tool_call in message['tool_calls'] %}{%- if tool_call is mapping and tool_call.get('function', none) is not none %}{%- set args = tool_call['function']['arguments'] -%}{%- set ns = namespace(arguments_list=[]) -%}{%- for key, value in args.items() -%}{%- set ns.arguments_list = ns.arguments_list + [key ~ '=' ~ (value | tojson)] -%}{%- endfor -%}{%- set arguments = ns.arguments_list | join(', ') -%}{{- tool_call['function']['name'] + '(' + arguments + ')' -}}{%- if not loop.last -%}{{ '
10
+ ' }}{%- endif -%}{% else %}{{- tool_call -}}{%- endif %}{%- endfor %}{{- '</function_calls>' -}}{%- endif -%}{%- if not loop.last -%}{{- '<|im_end|>' + '
11
+ ' -}}{%- else -%}{{- eos_token -}}{%- endif -%}{%- elif message['role'] == 'environment' -%}{{- '<|im_start|>environment
12
+ ' + message['content'] + '<|im_end|>
13
+ ' -}}{%- elif message['role'] == 'tool' -%}{{- '<|im_start|>environment
14
+ ' + message['content'] + '<|im_end|>
15
+ ' -}}{%- endif -%}{%- if loop.last and add_generation_prompt -%}{{- '<|im_start|>assistant
16
+ ' -}}{%- endif -%}{%- endfor -%}
config.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Olmo3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "dtype": "bfloat16",
8
+ "eos_token_id": 100257,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 4096,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 11008,
13
+ "layer_types": [
14
+ "sliding_attention",
15
+ "sliding_attention",
16
+ "sliding_attention",
17
+ "full_attention",
18
+ "sliding_attention",
19
+ "sliding_attention",
20
+ "sliding_attention",
21
+ "full_attention",
22
+ "sliding_attention",
23
+ "sliding_attention",
24
+ "sliding_attention",
25
+ "full_attention",
26
+ "sliding_attention",
27
+ "sliding_attention",
28
+ "sliding_attention",
29
+ "full_attention",
30
+ "sliding_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "full_attention",
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "sliding_attention",
37
+ "full_attention",
38
+ "sliding_attention",
39
+ "sliding_attention",
40
+ "sliding_attention",
41
+ "full_attention",
42
+ "sliding_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "full_attention"
46
+ ],
47
+ "max_position_embeddings": 65536,
48
+ "model_type": "olmo3",
49
+ "num_attention_heads": 32,
50
+ "num_hidden_layers": 32,
51
+ "num_key_value_heads": 32,
52
+ "pad_token_id": 100277,
53
+ "rms_norm_eps": 1e-06,
54
+ "rope_parameters": {
55
+ "attention_factor": 1.2079441541679836,
56
+ "beta_fast": 32.0,
57
+ "beta_slow": 1.0,
58
+ "factor": 8.0,
59
+ "original_max_position_embeddings": 8192,
60
+ "rope_theta": 500000,
61
+ "rope_type": "yarn"
62
+ },
63
+ "sliding_window": 4096,
64
+ "tie_word_embeddings": false,
65
+ "transformers_version": "5.0.0.dev0",
66
+ "use_cache": false,
67
+ "vocab_size": 100278,
68
+ "transformers.js_config": {
69
+ "use_external_data_format": {
70
+ "model.onnx": 15,
71
+ "model_fp16.onnx": 8,
72
+ "model_quantized.onnx": 4,
73
+ "model_q4.onnx": 2,
74
+ "model_q4f16.onnx": 2
75
+ },
76
+ "kv_cache_dtype": {
77
+ "q4f16": "float16",
78
+ "fp16": "float16"
79
+ }
80
+ }
81
+ }
generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 100265,
6
+ 100257
7
+ ],
8
+ "max_new_tokens": 32768,
9
+ "temperature": 0.6,
10
+ "top_p": 0.95,
11
+ "transformers_version": "5.0.0.dev0"
12
+ }
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a063734792a1f26afb34b116d8b17bd1e5a3fe6015c9d44f54f4de51310aeb6
3
+ size 260796
onnx/model.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b26553651cff48554c52512a4c31d460687d0d3d13dbadfa193b44904ae51e1
3
+ size 1944993792
onnx/model.onnx_data_1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad16498acf7697d3833a70814bc596081352f12ab716be7ca074a5c640efb307
3
+ size 1979842560
onnx/model.onnx_data_10 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6994c3503f91a8d5e86f2ca06508ae1058bdb70caeea7bb473872bdca7259859
3
+ size 2067988480
onnx/model.onnx_data_11 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2829e603c93252f0c6aeea0a75264613617fd1390dcebb040721b4954d7ca497
3
+ size 1979842560
onnx/model.onnx_data_12 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66983dc3d40097f50f8a7ad592cf4f7de842538ed197c8646a0212bf793ef018
3
+ size 2067988480
onnx/model.onnx_data_13 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:131de99bfbe0aa64c90fa9bd55c64bed6ce6e34749f152ef77952a58891711cd
3
+ size 1350664192
onnx/model.onnx_data_14 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a712971c78b17307d3c0cefc28aa6a7f9958a1dd86e7b451cd8cbdfadc0f0257
3
+ size 1642954752
onnx/model.onnx_data_2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a9cfb30cc835cac422a15c89bc946abd60a19e15d7c77ce37ecf8ee0e9117ecd
3
+ size 2067988480
onnx/model.onnx_data_3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a49c5dbf31584e0daad144d22be3ec0dcd7bc84fa28111cda8c54c489fe0215
3
+ size 1979842560
onnx/model.onnx_data_4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb9cb6a0c1056ae935d506b7b68c6b4a53df54615780f2ec46903752e8dce241
3
+ size 2067988480
onnx/model.onnx_data_5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b759e9eed530f837ad546766a8f7a39461c98c7c2394b5dc1807a031adc4146e
3
+ size 1979842560
onnx/model.onnx_data_6 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c29fdbdda9ed12be4c2f115a4d2ffd226f80bf8867d9eb6126f3bdcf170e1ef0
3
+ size 2067988480
onnx/model.onnx_data_7 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6be9c9c6c818e827a52eb8d8b474efbd6bacd20c3e8570589e57101f485885d4
3
+ size 1979842560
onnx/model.onnx_data_8 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3538d65f179213ffd85f7b0446e01bd82b03db94ac66d778a3b43bc9e4c5fe92
3
+ size 2067988480
onnx/model.onnx_data_9 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da397baf85e8a9077416d0b774781cc5b9bad2b6d46af04a934b3861e89db880
3
+ size 1979842560
onnx/model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e85d6f3b5e02a31a1f8750a5a32ec62f04c371bd34d985094abff9eebe394428
3
+ size 310779
onnx/model_fp16.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0184cb914fdb86934872636bff0d44a22b4d285413f94b2ada46026fce81de7
3
+ size 2086207488
onnx/model_fp16.onnx_data_1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4cd95a757f90e143ff7a0d4fdb7791a76bf8cb81fc5ae3689903ccf35f71739e
3
+ size 2091122688
onnx/model_fp16.onnx_data_2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a67e6c93e45ae2f3aacd10a4773e6a489a7d2baf3644d6f97eba9d04c9546e17
3
+ size 2057568256
onnx/model_fp16.onnx_data_3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14213f1e9ea0f6223c61bf8a7db4e3b86996903f3fc75b69404c5145b22f0b2e
3
+ size 2023997440
onnx/model_fp16.onnx_data_4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42b57bccae08b27ea0dd54c61a91820a119bbaeb51103bfeff44d2776cbe475c
3
+ size 2023997440
onnx/model_fp16.onnx_data_5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e7e47a7dff4868c776080b0750e10831a5d801638c6935ed26774a7b800abec
3
+ size 2023997440
onnx/model_fp16.onnx_data_6 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1722473adfc622ea19e4ea00f39da72e708ed45f209b460cd6683531342c73b9
3
+ size 1484963840
onnx/model_fp16.onnx_data_7 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e4ae66dedd646c34e327daf9333ef0afbe747a1f8daa1973f86327ab9514924
3
+ size 821477376
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b84a33e314a2a0ac7e9a0345047beb1a84f131978dcc58dc8593c5998980daee
3
+ size 363850
onnx/model_q4.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:881451b57726b3eda20f9a2f03dc2edee17287224b7311f11155e09941925971
3
+ size 2096617056
onnx/model_q4.onnx_data_1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e78bc82239d56f6e91dc959539bba406e79c9cef05eccf32767b184308f2e394
3
+ size 1844344416
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26f2b043f4567287ac00c7669e38b1356a5feb7ae5b2ab37a5e91ed6dc6fc65f
3
+ size 414480
onnx/model_q4f16.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:32aeeba1ada2d4777d5b5e0b3b37bb334644e53ab021f846a15ea6f5f7aaccc1
3
+ size 2077432032
onnx/model_q4f16.onnx_data_1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39c21ba9fd832cc978da7670a01a865f83998fced33c0b4e41b7700e7348bbb3
3
+ size 1732204768
onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f45a787ad329786c837385974fc87de48a3675d191efdc58e956d0d549c4ef7d
3
+ size 370552
onnx/model_quantized.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30830cbd313d98bcff55fee71b1b2b56ef8779b00bc48e06253d856c4d1a22eb
3
+ size 2096083392
onnx/model_quantized.onnx_data_1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06d680d2de4fb9c7f2bc8cad3edc3ab3eecea590ccba2953a62615d4ba7f67b8
3
+ size 2057715712
onnx/model_quantized.onnx_data_2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ca8a0a700e241971a8cc1facecba56f2f4ac2ae116b1706da2dcb0d6d34e99c
3
+ size 2055954432
onnx/model_quantized.onnx_data_3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:910631468db23f68fc210af1e30f9b3eb14e2a9724dc5d2fba7858cb639f29c1
3
+ size 1408455104
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "additional_special_tokens": null,
5
+ "backend": "tokenizers",
6
+ "bos_token": "<|endoftext|>",
7
+ "clean_up_tokenization_spaces": false,
8
+ "eos_token": "<|endoftext|>",
9
+ "errors": "replace",
10
+ "is_local": false,
11
+ "model_max_length": 65536,
12
+ "model_specific_special_tokens": {},
13
+ "pad_token": "<|pad|>",
14
+ "tokenizer_class": "GPT2Tokenizer",
15
+ "unk_token": "<|endoftext|>",
16
+ "chat_template": "{%- set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 -%}{%- if not has_system -%}{{- '<|im_start|>system\nYou are a helpful function-calling AI assistant. ' -}}{%- if tools is none -%}{{- 'You do not currently have access to any functions. <functions></functions><|im_end|>\n' -}}{%- else -%}{{- 'You are provided with function signatures within <functions></functions> XML tags. You may call one or more functions to assist with the user query. Output any function calls within <function_calls></function_calls> XML tags. Do not make assumptions about what values to plug into functions.' -}}{{- '<functions>' -}}{{- tools | tojson -}}{{- '</functions><|im_end|>\n' -}}{%- endif -%}{%- endif -%}{%- for message in messages -%}{%- if message['role'] == 'system' -%}{{- '<|im_start|>system\n' + message['content'] -}}{%- if tools is not none -%}{{- '<functions>' -}}{{- tools | tojson -}}{{- '</functions>' -}}{%- elif message.get('functions', none) is not none -%}{{- ' <functions>' + message['functions'] + '</functions>' -}}{%- endif -%}{{- '<|im_end|>\n' -}}{%- elif message['role'] == 'user' -%}{{- '<|im_start|>user\n' + message['content'] + '<|im_end|>\n' -}}{%- elif message['role'] == 'assistant' -%}{{- '<|im_start|>assistant\n' -}}{%- if message.get('content', none) is not none -%}{{- message['content'] -}}{%- endif -%}{%- if message.get('function_calls', none) is not none -%}{{- '<function_calls>' + message['function_calls'] + '</function_calls>' -}}{% elif message.get('tool_calls', none) is not none %}{{- '<function_calls>' -}}{%- for tool_call in message['tool_calls'] %}{%- if tool_call is mapping and tool_call.get('function', none) is not none %}{%- set args = tool_call['function']['arguments'] -%}{%- set ns = namespace(arguments_list=[]) -%}{%- for key, value in args.items() -%}{%- set ns.arguments_list = ns.arguments_list + [key ~ '=' ~ (value | tojson)] -%}{%- endfor -%}{%- set arguments = ns.arguments_list | join(', ') -%}{{- tool_call['function']['name'] + '(' + arguments + ')' -}}{%- if not loop.last -%}{{ '\n' }}{%- endif -%}{% else %}{{- tool_call -}}{%- endif %}{%- endfor %}{{- '</function_calls>' -}}{%- endif -%}{%- if not loop.last -%}{{- '<|im_end|>' + '\n' -}}{%- else -%}{{- eos_token -}}{%- endif -%}{%- elif message['role'] == 'environment' -%}{{- '<|im_start|>environment\n' + message['content'] + '<|im_end|>\n' -}}{%- elif message['role'] == 'tool' -%}{{- '<|im_start|>environment\n' + message['content'] + '<|im_end|>\n' -}}{%- endif -%}{%- if loop.last and add_generation_prompt -%}{{- '<|im_start|>assistant\n' -}}{%- endif -%}{%- endfor -%}"
17
+ }