jinxing6609 commited on
Commit
93a0631
·
verified ·
1 Parent(s): 0a2a7f4

Upload model trained with Unsloth

Browse files

Upload model trained with Unsloth 2x faster

Files changed (3) hide show
  1. chat_template.jinja +18 -0
  2. tokenizer.json +0 -0
  3. tokenizer_config.json +199 -0
chat_template.jinja ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {# Unsloth template fixes #}
2
+ {%- set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 -%}{%- if not has_system -%}{{- '<|im_start|>system
3
+ 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|>
4
+ ' -}}{%- 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|>
5
+ ' -}}{%- endif -%}{%- endif -%}{%- for message in messages -%}{%- if message['role'] == 'system' -%}{{- '<|im_start|>system
6
+ ' + 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|>
7
+ ' -}}{%- elif message['role'] == 'user' -%}{{- '<|im_start|>user
8
+ ' + message['content'] + '<|im_end|>
9
+ ' -}}{%- elif message['role'] == 'assistant' -%}{{- '<|im_start|>assistant
10
+ ' -}}{%- 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=[]) -%}{%- if args is mapping -%}{%- for key, value in args|items -%}{%- set ns.arguments_list = ns.arguments_list + [key ~ '=' ~ (value | tojson)] -%}{%- endfor -%}{%- endif -%}{%- set arguments = ns.arguments_list | join(', ') -%}{{- tool_call['function']['name'] + '(' + arguments + ')' -}}{%- if not loop.last -%}{{ '
11
+ ' }}{%- endif -%}{% else %}{{- tool_call -}}{%- endif %}{%- endfor %}{{- '</function_calls>' -}}{%- endif -%}{%- if not loop.last -%}{{- '<|im_end|>' + '
12
+ ' -}}{%- else -%}{{- eos_token -}}{%- endif -%}{%- elif message['role'] == 'environment' -%}{{- '<|im_start|>environment
13
+ ' + message['content'] + '<|im_end|>
14
+ ' -}}{%- elif message['role'] == 'tool' -%}{{- '<|im_start|>environment
15
+ ' + message['content'] + '<|im_end|>
16
+ ' -}}{%- endif -%}{%- if loop.last and add_generation_prompt -%}{{- '<|im_start|>assistant
17
+ ' -}}{%- endif -%}{%- endfor -%}
18
+ {# Copyright 2025-present Unsloth. Apache 2.0 License. #}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<|endoftext|>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|endoftext|>",
7
+ "is_local": false,
8
+ "model_max_length": 65536,
9
+ "pad_token": "<|pad|>",
10
+ "padding_side": "left",
11
+ "tokenizer_class": "TokenizersBackend",
12
+ "unk_token": "�",
13
+ "added_tokens_decoder": {
14
+ "5809": {
15
+ "content": "�",
16
+ "single_word": false,
17
+ "lstrip": false,
18
+ "rstrip": false,
19
+ "normalized": false,
20
+ "special": true
21
+ },
22
+ "100256": {
23
+ "content": "<|extra_id_0|>",
24
+ "single_word": false,
25
+ "lstrip": false,
26
+ "rstrip": false,
27
+ "normalized": false,
28
+ "special": false
29
+ },
30
+ "100257": {
31
+ "content": "<|endoftext|>",
32
+ "single_word": false,
33
+ "lstrip": false,
34
+ "rstrip": false,
35
+ "normalized": false,
36
+ "special": true
37
+ },
38
+ "100258": {
39
+ "content": "<|fim_prefix|>",
40
+ "single_word": false,
41
+ "lstrip": false,
42
+ "rstrip": false,
43
+ "normalized": false,
44
+ "special": true
45
+ },
46
+ "100259": {
47
+ "content": "<|fim_middle|>",
48
+ "single_word": false,
49
+ "lstrip": false,
50
+ "rstrip": false,
51
+ "normalized": false,
52
+ "special": true
53
+ },
54
+ "100260": {
55
+ "content": "<|fim_suffix|>",
56
+ "single_word": false,
57
+ "lstrip": false,
58
+ "rstrip": false,
59
+ "normalized": false,
60
+ "special": true
61
+ },
62
+ "100261": {
63
+ "content": "|||PHONE_NUMBER|||",
64
+ "single_word": false,
65
+ "lstrip": false,
66
+ "rstrip": false,
67
+ "normalized": false,
68
+ "special": false
69
+ },
70
+ "100262": {
71
+ "content": "|||EMAIL_ADDRESS|||",
72
+ "single_word": false,
73
+ "lstrip": false,
74
+ "rstrip": false,
75
+ "normalized": false,
76
+ "special": false
77
+ },
78
+ "100263": {
79
+ "content": "|||IP_ADDRESS|||",
80
+ "single_word": false,
81
+ "lstrip": false,
82
+ "rstrip": false,
83
+ "normalized": false,
84
+ "special": false
85
+ },
86
+ "100264": {
87
+ "content": "<|im_start|>",
88
+ "single_word": false,
89
+ "lstrip": false,
90
+ "rstrip": false,
91
+ "normalized": false,
92
+ "special": true
93
+ },
94
+ "100265": {
95
+ "content": "<|im_end|>",
96
+ "single_word": false,
97
+ "lstrip": false,
98
+ "rstrip": false,
99
+ "normalized": false,
100
+ "special": true
101
+ },
102
+ "100266": {
103
+ "content": "<functions>",
104
+ "single_word": false,
105
+ "lstrip": false,
106
+ "rstrip": false,
107
+ "normalized": false,
108
+ "special": false
109
+ },
110
+ "100267": {
111
+ "content": "</functions>",
112
+ "single_word": false,
113
+ "lstrip": false,
114
+ "rstrip": false,
115
+ "normalized": false,
116
+ "special": false
117
+ },
118
+ "100268": {
119
+ "content": "<function_calls>",
120
+ "single_word": false,
121
+ "lstrip": false,
122
+ "rstrip": false,
123
+ "normalized": false,
124
+ "special": false
125
+ },
126
+ "100269": {
127
+ "content": "</function_calls>",
128
+ "single_word": false,
129
+ "lstrip": false,
130
+ "rstrip": false,
131
+ "normalized": false,
132
+ "special": false
133
+ },
134
+ "100270": {
135
+ "content": "<|extra_id_1|>",
136
+ "single_word": false,
137
+ "lstrip": false,
138
+ "rstrip": false,
139
+ "normalized": false,
140
+ "special": false
141
+ },
142
+ "100271": {
143
+ "content": "<|extra_id_2|>",
144
+ "single_word": false,
145
+ "lstrip": false,
146
+ "rstrip": false,
147
+ "normalized": false,
148
+ "special": false
149
+ },
150
+ "100272": {
151
+ "content": "<|extra_id_3|>",
152
+ "single_word": false,
153
+ "lstrip": false,
154
+ "rstrip": false,
155
+ "normalized": false,
156
+ "special": false
157
+ },
158
+ "100273": {
159
+ "content": "<|extra_id_4|>",
160
+ "single_word": false,
161
+ "lstrip": false,
162
+ "rstrip": false,
163
+ "normalized": false,
164
+ "special": false
165
+ },
166
+ "100274": {
167
+ "content": "<|extra_id_5|>",
168
+ "single_word": false,
169
+ "lstrip": false,
170
+ "rstrip": false,
171
+ "normalized": false,
172
+ "special": false
173
+ },
174
+ "100275": {
175
+ "content": "<|extra_id_6|>",
176
+ "single_word": false,
177
+ "lstrip": false,
178
+ "rstrip": false,
179
+ "normalized": false,
180
+ "special": false
181
+ },
182
+ "100276": {
183
+ "content": "<|endofprompt|>",
184
+ "single_word": false,
185
+ "lstrip": false,
186
+ "rstrip": false,
187
+ "normalized": false,
188
+ "special": true
189
+ },
190
+ "100277": {
191
+ "content": "<|pad|>",
192
+ "single_word": false,
193
+ "lstrip": false,
194
+ "rstrip": false,
195
+ "normalized": false,
196
+ "special": true
197
+ }
198
+ }
199
+ }