Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- config.json +4 -7
- model-00001-of-00030.safetensors +2 -2
- model-00002-of-00030.safetensors +2 -2
- model-00003-of-00030.safetensors +2 -2
- model-00004-of-00030.safetensors +2 -2
- model-00005-of-00030.safetensors +2 -2
- model-00006-of-00030.safetensors +2 -2
- model-00007-of-00030.safetensors +2 -2
- model-00008-of-00030.safetensors +2 -2
- model-00009-of-00030.safetensors +2 -2
- model-00010-of-00030.safetensors +2 -2
- model-00011-of-00030.safetensors +2 -2
- model-00012-of-00030.safetensors +2 -2
- model-00013-of-00030.safetensors +2 -2
- model-00014-of-00030.safetensors +2 -2
- model-00015-of-00030.safetensors +2 -2
- model-00016-of-00030.safetensors +2 -2
- model-00017-of-00030.safetensors +2 -2
- model-00018-of-00030.safetensors +2 -2
- model-00019-of-00030.safetensors +2 -2
- model-00020-of-00030.safetensors +2 -2
- model-00021-of-00030.safetensors +2 -2
- model-00022-of-00030.safetensors +2 -2
- model-00023-of-00030.safetensors +2 -2
- model-00024-of-00030.safetensors +2 -2
- model-00025-of-00030.safetensors +2 -2
- model-00026-of-00030.safetensors +2 -2
- model-00027-of-00030.safetensors +2 -2
- model-00028-of-00030.safetensors +2 -2
- model-00029-of-00030.safetensors +2 -2
- model-00030-of-00030.safetensors +2 -2
- model.safetensors.index.json +0 -0
- tokenizer.json +0 -0
- tokenizer_config.json +2 -1
.gitattributes
CHANGED
@@ -34,3 +34,4 @@ saved_model/**/* 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 |
llama_3.1_70b_sea-lion_v3_instruct_banner.png 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 |
llama_3.1_70b_sea-lion_v3_instruct_banner.png filter=lfs diff=lfs merge=lfs -text
|
37 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
config.json
CHANGED
@@ -5,11 +5,8 @@
|
|
5 |
"attention_bias": false,
|
6 |
"attention_dropout": 0.0,
|
7 |
"bos_token_id": 128000,
|
8 |
-
"eos_token_id":
|
9 |
-
|
10 |
-
128008,
|
11 |
-
128009
|
12 |
-
],
|
13 |
"hidden_act": "silu",
|
14 |
"hidden_size": 8192,
|
15 |
"initializer_range": 0.02,
|
@@ -24,15 +21,15 @@
|
|
24 |
"rms_norm_eps": 1e-05,
|
25 |
"rope_scaling": {
|
26 |
"factor": 8.0,
|
27 |
-
"low_freq_factor": 1.0,
|
28 |
"high_freq_factor": 4.0,
|
|
|
29 |
"original_max_position_embeddings": 8192,
|
30 |
"rope_type": "llama3"
|
31 |
},
|
32 |
"rope_theta": 500000.0,
|
33 |
"tie_word_embeddings": false,
|
34 |
"torch_dtype": "bfloat16",
|
35 |
-
"transformers_version": "4.
|
36 |
"use_cache": true,
|
37 |
"vocab_size": 128256
|
38 |
}
|
|
|
5 |
"attention_bias": false,
|
6 |
"attention_dropout": 0.0,
|
7 |
"bos_token_id": 128000,
|
8 |
+
"eos_token_id": 128001,
|
9 |
+
"head_dim": 128,
|
|
|
|
|
|
|
10 |
"hidden_act": "silu",
|
11 |
"hidden_size": 8192,
|
12 |
"initializer_range": 0.02,
|
|
|
21 |
"rms_norm_eps": 1e-05,
|
22 |
"rope_scaling": {
|
23 |
"factor": 8.0,
|
|
|
24 |
"high_freq_factor": 4.0,
|
25 |
+
"low_freq_factor": 1.0,
|
26 |
"original_max_position_embeddings": 8192,
|
27 |
"rope_type": "llama3"
|
28 |
},
|
29 |
"rope_theta": 500000.0,
|
30 |
"tie_word_embeddings": false,
|
31 |
"torch_dtype": "bfloat16",
|
32 |
+
"transformers_version": "4.51.1",
|
33 |
"use_cache": true,
|
34 |
"vocab_size": 128256
|
35 |
}
|
model-00001-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c14ac3ce79e15aec5812aff406c9ece2a2fc6a685d9a0511afc7810d2a229f93
|
3 |
+
size 4982967376
|
model-00002-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:78985961b338ba9bc5b992d09ce213d6a38e4ab079d7ade30f2ec3846651fa31
|
3 |
+
size 4966141264
|
model-00003-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:012d2a9542457e9e7d1a0b330fbcbd7d63aa6de8002d8826101635b133b1c727
|
3 |
+
size 4831922728
|
model-00004-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:55659e9f315d07b127ad1a7f086eba90be169d990dd8550c51ca68bbd27153e9
|
3 |
+
size 4936763464
|
model-00005-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ee9620135ed7c3ec5b7ea089e989969d1c022882c353e17770fcc6a084d2d51f
|
3 |
+
size 4781607920
|
model-00006-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:132a693f8011e61502792d190945ef5cf89075f61f5cabf33b8b70c2046d1b76
|
3 |
+
size 4966124064
|
model-00007-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a7de679e8fa420276cbf97963cb4c031ab84624c69995ca08d11aefdd68e43fb
|
3 |
+
size 4664183896
|
model-00008-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dbf72539b0e6e5c3b0892093610f5de04cfc6c3e02c3fd64ff5fb4935d7baae8
|
3 |
+
size 4718643168
|
model-00009-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ca3f503179fbcd693d4e5295c6e697aba860ab55da6a9142ea73ad5c3b5de0e9
|
3 |
+
size 4563470536
|
model-00010-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0ce5c80a7de202c52a178c9d722630756a2e57791dddb702109c4a7585cfe719
|
3 |
+
size 4999695208
|
model-00011-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0349a3ff81bc6356f25e12066c0110b5b50bd2f2725633cf0430979fb7f282be
|
3 |
+
size 4613852616
|
model-00012-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:61269483132c9ce190a90bdf8fe65ad237d9914137c9a96254a5a6a337ca7c5f
|
3 |
+
size 4697704872
|
model-00013-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d8d1db3d5fc6401a51ea87e3343be739d30cbf552ee30c399f98ce0c064a158a
|
3 |
+
size 4680927528
|
model-00014-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d2e85d7fbadc4610af5c8f3e001524f8cd160b638c063a8f8570cdf911089318
|
3 |
+
size 4664151624
|
model-00015-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:da60ee6f1628daa5bf67dfb66e787381551f2a7c78271c6318fad7b7c3b9394f
|
3 |
+
size 4815178384
|
model-00016-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:524c2ca4b9900af6621f31f83ac89dc37a09a92f045dfabcd0e19ac49ad91eba
|
3 |
+
size 4982917896
|
model-00017-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0bbe62c32f910d43e48ece01b9c02c9221c3a9749ee0b9ec123d69c9f973f356
|
3 |
+
size 4949380424
|
model-00018-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:814cf4a963a0dcc6251a4b5d8cf1e6ccbb0f21deee94664506df022f16a0b0b3
|
3 |
+
size 4999728232
|
model-00019-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a4d4066e89233a4f4692772ace0e1db6494a723fa2d98a70bff59664ad1a1e5e
|
3 |
+
size 4831889720
|
model-00020-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a85bd5ff2b7ea90f9b29b728eb886f4f2200e348ff25cd302b67f2a6f8e53cfb
|
3 |
+
size 4966190752
|
model-00021-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fee5471244654417cc394690259ed85845766784fe987b043a759da6c51ae8a0
|
3 |
+
size 4999728240
|
model-00022-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c5b0cd58e6d3038c3cf116ffcc638a4e475c712a20905cba8c8d66729589c807
|
3 |
+
size 4982868400
|
model-00023-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:18cff9b0e9b788580e3a05568010cc449777472e599062fb0f83ebc0c150e334
|
3 |
+
size 4798401752
|
model-00024-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:09ba859ff3382ff2d7f76b4fd225b3f3465a8063e4dd79df7d92c5a819ef9e46
|
3 |
+
size 4999711728
|
model-00025-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:63ee5556a28aa759e4cbab861c829e7ebb4f8c37099d79b27bdf33963e2e03b2
|
3 |
+
size 4630612744
|
model-00026-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bf9e73dcb039762183fb5a570f7021fafb455a6f03ea61efaa0f59c46f8db454
|
3 |
+
size 4999695232
|
model-00027-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:afafb163de52a08703b03971d70e0f1ac2d1e12e7454109bac63154608afb69b
|
3 |
+
size 4546743400
|
model-00028-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:306e9599c3c5e187d0a91a91fdeef5a05a985e5c623d68d2666d975dc3ec2408
|
3 |
+
size 4647390048
|
model-00029-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1aca9f4252844ffa140e4340e6c3a4e30c8e44d13e305ea1b8e7c2266916f1f6
|
3 |
+
size 4664150912
|
model-00030-of-00030.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:887a2d10b1a4c2c230c4050195fa71f95acc5b01b276a744edb6c876a4854b01
|
3 |
+
size 1224753872
|
model.safetensors.index.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
CHANGED
@@ -2053,10 +2053,11 @@
|
|
2053 |
"chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- set date_string = \"26 Jul 2024\" %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n{%- else %}\n {%- set system_message = \"\" %}\n{%- endif %}\n\n{#- System message + builtin tools #}\n{{- \"<|start_header_id|>system<|end_header_id|>\\n\\n\" }}\n{%- if builtin_tools is defined or tools is not none %}\n {{- \"Environment: ipython\\n\" }}\n{%- endif %}\n{%- if builtin_tools is defined %}\n {{- \"Tools: \" + builtin_tools | reject('equalto', 'code_interpreter') | join(\", \") + \"\\n\\n\"}}\n{%- endif %}\n{{- \"Cutting Knowledge Date: December 2023\\n\" }}\n{{- \"Today Date: \" + date_string + \"\\n\\n\" }}\n{%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n{%- endif %}\n{{- system_message }}\n{{- \"<|eot_id|>\" }}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|start_header_id|>user<|end_header_id|>\\n\\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\\n\\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot_id|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\\n\\n'+ message['content'] | trim + '<|eot_id|>' }}\n {%- elif 'tool_calls' in message %}\n {%- if not message.tool_calls|length == 1 %}\n {{- raise_exception(\"This model only supports single tool-calls at once!\") }}\n {%- endif %}\n {%- set tool_call = message.tool_calls[0].function %}\n {%- if builtin_tools is defined and tool_call.name in builtin_tools %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- \"<|python_tag|>\" + tool_call.name + \".call(\" }}\n {%- for arg_name, arg_val in tool_call.arguments | items %}\n {{- arg_name + '=\"' + arg_val + '\"' }}\n {%- if not loop.last %}\n {{- \", \" }}\n {%- endif %}\n {%- endfor %}\n {{- \")\" }}\n {%- else %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- '{\"name\": \"' + tool_call.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- \"}\" }}\n {%- endif %}\n {%- if builtin_tools is defined %}\n {#- This means we're in ipython mode #}\n {{- \"<|eom_id|>\" }}\n {%- else %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|start_header_id|>ipython<|end_header_id|>\\n\\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' }}\n{%- endif %}\n",
|
2054 |
"clean_up_tokenization_spaces": true,
|
2055 |
"eos_token": "<|eot_id|>",
|
|
|
2056 |
"model_input_names": [
|
2057 |
"input_ids",
|
2058 |
"attention_mask"
|
2059 |
],
|
2060 |
"model_max_length": 131072,
|
2061 |
-
"tokenizer_class": "
|
2062 |
}
|
|
|
2053 |
"chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- set date_string = \"26 Jul 2024\" %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n{%- else %}\n {%- set system_message = \"\" %}\n{%- endif %}\n\n{#- System message + builtin tools #}\n{{- \"<|start_header_id|>system<|end_header_id|>\\n\\n\" }}\n{%- if builtin_tools is defined or tools is not none %}\n {{- \"Environment: ipython\\n\" }}\n{%- endif %}\n{%- if builtin_tools is defined %}\n {{- \"Tools: \" + builtin_tools | reject('equalto', 'code_interpreter') | join(\", \") + \"\\n\\n\"}}\n{%- endif %}\n{{- \"Cutting Knowledge Date: December 2023\\n\" }}\n{{- \"Today Date: \" + date_string + \"\\n\\n\" }}\n{%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n{%- endif %}\n{{- system_message }}\n{{- \"<|eot_id|>\" }}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|start_header_id|>user<|end_header_id|>\\n\\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\\n\\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot_id|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\\n\\n'+ message['content'] | trim + '<|eot_id|>' }}\n {%- elif 'tool_calls' in message %}\n {%- if not message.tool_calls|length == 1 %}\n {{- raise_exception(\"This model only supports single tool-calls at once!\") }}\n {%- endif %}\n {%- set tool_call = message.tool_calls[0].function %}\n {%- if builtin_tools is defined and tool_call.name in builtin_tools %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- \"<|python_tag|>\" + tool_call.name + \".call(\" }}\n {%- for arg_name, arg_val in tool_call.arguments | items %}\n {{- arg_name + '=\"' + arg_val + '\"' }}\n {%- if not loop.last %}\n {{- \", \" }}\n {%- endif %}\n {%- endfor %}\n {{- \")\" }}\n {%- else %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- '{\"name\": \"' + tool_call.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- \"}\" }}\n {%- endif %}\n {%- if builtin_tools is defined %}\n {#- This means we're in ipython mode #}\n {{- \"<|eom_id|>\" }}\n {%- else %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|start_header_id|>ipython<|end_header_id|>\\n\\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' }}\n{%- endif %}\n",
|
2054 |
"clean_up_tokenization_spaces": true,
|
2055 |
"eos_token": "<|eot_id|>",
|
2056 |
+
"extra_special_tokens": {},
|
2057 |
"model_input_names": [
|
2058 |
"input_ids",
|
2059 |
"attention_mask"
|
2060 |
],
|
2061 |
"model_max_length": 131072,
|
2062 |
+
"tokenizer_class": "PreTrainedTokenizer"
|
2063 |
}
|