a31413510 commited on
Commit
004009b
·
verified ·
1 Parent(s): 78d7a20

Upload folder using huggingface_hub

Browse files
.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
  benchmark.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
  benchmark.png filter=lfs diff=lfs merge=lfs -text
37
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
chat_template.jinja ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- '<|im_start|>system
2
+ ' }}{%- if messages[0].role != 'system' and not system_settings %}{{- '<global_setting>
3
+ think_mode=True
4
+ </global_setting>' }}{%- else%}{{- '<system_setting>
5
+ ' }}{{- system_settings + '
6
+ ' if system_settings else '' }}{{- (messages[0].content + '
7
+ ' if messages[0].role == 'system' else '') + '</system_setting>
8
+
9
+ <global_setting>
10
+ think_mode=True
11
+ </global_setting>' }}{%- endif %}{%- if tools %}{{- "
12
+
13
+ <tool_list>" }}{{- '
14
+ ' }}{{-'['}}{% for tool in tools %}{{'{"type": "function", "function": '}}{{-(tool.function | tojson)}}}{%-if not loop.last%},{%- endif %}{%endfor%}{{-']'}}{{- "
15
+ </tool_list>" }}{%- endif %}{{-'<|im_end|>
16
+
17
+ ' }}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_output>') and message.content.endswith('</tool_output>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if message.content is string %}
27
+ {%- set content = message.content %}
28
+ {%- else %}
29
+ {%- set content = '' %}
30
+ {%- endif %}
31
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
32
+ {{- '<|im_start|>' + message.role + '
33
+ ' + content + '<|im_end|>' + '
34
+
35
+ ' }}
36
+ {%- elif message.role == "assistant" %}
37
+ {%- set reasoning_content = '' %}
38
+ {%- if message.thoughts is string %}
39
+ {%- set reasoning_content = message.thoughts %}
40
+ {%- else %}
41
+ {%- if '</think>' in content %}
42
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('
43
+ ').split('<think>')[-1].lstrip('
44
+ ') %}
45
+ {%- set content = content.split('</think>')[-1].lstrip('
46
+ ') %}
47
+ {%- endif %}
48
+ {%- endif %}
49
+ {%- if loop.index0 > ns.last_query_index and (loop.last or (not loop.last and reasoning_content)) %} {{- '<|im_start|>' + message.role + '
50
+ <think>
51
+ ' + reasoning_content.strip('
52
+ ') + '
53
+ </think>
54
+ ' }} {%- else %} {{- '<|im_start|>' + message.role + '
55
+ ' }} {%- endif %} {%- if content|length > 0 %} {{- '<response>
56
+ ' + content + '
57
+ </response>
58
+ ' }} {%- endif %} {%- if message.tool_calls %}
59
+ {%- for tool_call in message.tool_calls %}
60
+ {%- if (loop.first and content) or (not loop.first) %}
61
+ {{- '
62
+ ' }}
63
+ {%- endif %}
64
+ {%- if tool_call.function %}
65
+ {%- set tool_call = tool_call.function %}
66
+ {%- endif %}
67
+ {{- '
68
+ <tool_call>
69
+ {"name": "' }}
70
+ {{- tool_call.name }}
71
+ {{- '", "arguments": ' }}
72
+ {%- if tool_call.arguments is string %}
73
+ {{- tool_call.arguments }}
74
+ {%- else %}
75
+ {{- tool_call.arguments | tojson }}
76
+ {%- endif %}
77
+ {{- '}
78
+ </tool_call>
79
+ ' }}
80
+ {%- endfor %}
81
+ {%- endif %}
82
+ {{- '<|im_end|>
83
+
84
+ ' }}
85
+ {%- elif message.role == "tool" %}
86
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
87
+ {{- '<|im_start|>tool' }}
88
+ {%- endif %}
89
+ {{- '
90
+ <tool_output>' }}
91
+ {{- message.content|tojson }}
92
+ {{- '</tool_output>' }}
93
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
94
+ {{- '<|im_end|>
95
+
96
+ ' }}
97
+ {%- endif %}
98
+ {%- endif %}
99
+ {%- endfor %}
100
+ {{- "<|im_start|>assistant
101
+ <think>
102
+ "}}
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "top_p": 0.95,
3
+ "temperature": 0.6,
4
+ "bos_token_id": 1,
5
+ "eos_token_id": 2,
6
+ "pad_token_id": 0,
7
+ "repetition_penalty": 1.0,
8
+ "frequency_penalty": 0.0,
9
+ "presence_penalty": 0.0
10
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": "<|begin_of_sentence|>",
10
+ "eos_token": {
11
+ "content": "</s>",
12
+ "lstrip": false,
13
+ "normalized": false,
14
+ "rstrip": false,
15
+ "single_word": false
16
+ },
17
+ "mask_token": "<mask:1>",
18
+ "pad_token": {
19
+ "content": "<unk>",
20
+ "lstrip": false,
21
+ "normalized": false,
22
+ "rstrip": false,
23
+ "single_word": false
24
+ },
25
+ "sep_token": "<|end_of_sentence|>",
26
+ "unk_token": {
27
+ "content": "<unk>",
28
+ "lstrip": false,
29
+ "normalized": false,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93a291ef6e5c89e6c0f2d5d004734ff429faa8ab925e39d71d2374b3d0daf49e
3
+ size 10999541