models: add models/selector-3B-sft
Browse files- models/selector-3B-sft/chat_template.jinja +54 -5
- models/selector-3B-sft/config.json +3 -3
- models/selector-3B-sft/generation_config.json +1 -2
- models/selector-3B-sft/model-00001-of-00002.safetensors +1 -1
- models/selector-3B-sft/model-00002-of-00002.safetensors +1 -1
- models/selector-3B-sft/tokenizer.json +2 -2
models/selector-3B-sft/chat_template.jinja
CHANGED
|
@@ -1,5 +1,54 @@
|
|
| 1 |
-
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
+
{{- messages[0]['content'] }}
|
| 5 |
+
{%- else %}
|
| 6 |
+
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
| 7 |
+
{%- endif %}
|
| 8 |
+
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 9 |
+
{%- for tool in tools %}
|
| 10 |
+
{{- "\n" }}
|
| 11 |
+
{{- tool | tojson }}
|
| 12 |
+
{%- endfor %}
|
| 13 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 14 |
+
{%- else %}
|
| 15 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 16 |
+
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
| 17 |
+
{%- else %}
|
| 18 |
+
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- endif %}
|
| 21 |
+
{%- for message in messages %}
|
| 22 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
| 23 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
| 24 |
+
{%- elif message.role == "assistant" %}
|
| 25 |
+
{{- '<|im_start|>' + message.role }}
|
| 26 |
+
{%- if message.content %}
|
| 27 |
+
{{- '\n' + message.content }}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
{%- for tool_call in message.tool_calls %}
|
| 30 |
+
{%- if tool_call.function is defined %}
|
| 31 |
+
{%- set tool_call = tool_call.function %}
|
| 32 |
+
{%- endif %}
|
| 33 |
+
{{- '\n<tool_call>\n{"name": "' }}
|
| 34 |
+
{{- tool_call.name }}
|
| 35 |
+
{{- '", "arguments": ' }}
|
| 36 |
+
{{- tool_call.arguments | tojson }}
|
| 37 |
+
{{- '}\n</tool_call>' }}
|
| 38 |
+
{%- endfor %}
|
| 39 |
+
{{- '<|im_end|>\n' }}
|
| 40 |
+
{%- elif message.role == "tool" %}
|
| 41 |
+
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
| 42 |
+
{{- '<|im_start|>user' }}
|
| 43 |
+
{%- endif %}
|
| 44 |
+
{{- '\n<tool_response>\n' }}
|
| 45 |
+
{{- message.content }}
|
| 46 |
+
{{- '\n</tool_response>' }}
|
| 47 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 48 |
+
{{- '<|im_end|>\n' }}
|
| 49 |
+
{%- endif %}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- endfor %}
|
| 52 |
+
{%- if add_generation_prompt %}
|
| 53 |
+
{{- '<|im_start|>assistant\n' }}
|
| 54 |
+
{%- endif %}
|
models/selector-3B-sft/config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
"Qwen2ForCausalLM"
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
-
"
|
| 7 |
"eos_token_id": 151645,
|
| 8 |
"hidden_act": "silu",
|
| 9 |
"hidden_size": 2048,
|
|
@@ -53,13 +53,13 @@
|
|
| 53 |
"num_attention_heads": 16,
|
| 54 |
"num_hidden_layers": 36,
|
| 55 |
"num_key_value_heads": 2,
|
|
|
|
| 56 |
"rms_norm_eps": 1e-06,
|
| 57 |
"rope_scaling": null,
|
| 58 |
"rope_theta": 1000000.0,
|
| 59 |
"sliding_window": null,
|
| 60 |
"tie_word_embeddings": true,
|
| 61 |
-
"
|
| 62 |
-
"transformers_version": "4.54.1",
|
| 63 |
"use_cache": true,
|
| 64 |
"use_sliding_window": false,
|
| 65 |
"vocab_size": 151936
|
|
|
|
| 3 |
"Qwen2ForCausalLM"
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
+
"dtype": "bfloat16",
|
| 7 |
"eos_token_id": 151645,
|
| 8 |
"hidden_act": "silu",
|
| 9 |
"hidden_size": 2048,
|
|
|
|
| 53 |
"num_attention_heads": 16,
|
| 54 |
"num_hidden_layers": 36,
|
| 55 |
"num_key_value_heads": 2,
|
| 56 |
+
"pad_token_id": 151643,
|
| 57 |
"rms_norm_eps": 1e-06,
|
| 58 |
"rope_scaling": null,
|
| 59 |
"rope_theta": 1000000.0,
|
| 60 |
"sliding_window": null,
|
| 61 |
"tie_word_embeddings": true,
|
| 62 |
+
"transformers_version": "4.57.6",
|
|
|
|
| 63 |
"use_cache": true,
|
| 64 |
"use_sliding_window": false,
|
| 65 |
"vocab_size": 151936
|
models/selector-3B-sft/generation_config.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"bos_token_id": 151643,
|
| 3 |
"do_sample": true,
|
| 4 |
"eos_token_id": [
|
| 5 |
151645,
|
|
@@ -10,5 +9,5 @@
|
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 20,
|
| 12 |
"top_p": 0.8,
|
| 13 |
-
"transformers_version": "4.
|
| 14 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"do_sample": true,
|
| 3 |
"eos_token_id": [
|
| 4 |
151645,
|
|
|
|
| 9 |
"temperature": 0.7,
|
| 10 |
"top_k": 20,
|
| 11 |
"top_p": 0.8,
|
| 12 |
+
"transformers_version": "4.57.6"
|
| 13 |
}
|
models/selector-3B-sft/model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4957560304
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dfa3ac066240fd54a431bc557fe68eccad599ef6aee9e4f54a001a7d05728d2f
|
| 3 |
size 4957560304
|
models/selector-3B-sft/model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1214366696
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c3dd5a421c35a07d98c6dbc1e12b2fb50383ae2292ef077d2a9aa3ed4f21ced8
|
| 3 |
size 1214366696
|
models/selector-3B-sft/tokenizer.json
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:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
|
| 3 |
+
size 11421896
|