dinghface commited on
Commit
3d04674
·
verified ·
1 Parent(s): 4730d60

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 +200 -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,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "local_files_only": false,
9
+ "model_max_length": 65536,
10
+ "pad_token": "<|pad|>",
11
+ "padding_side": "left",
12
+ "tokenizer_class": "TokenizersBackend",
13
+ "unk_token": "�",
14
+ "added_tokens_decoder": {
15
+ "5809": {
16
+ "content": "�",
17
+ "single_word": false,
18
+ "lstrip": false,
19
+ "rstrip": false,
20
+ "normalized": false,
21
+ "special": true
22
+ },
23
+ "100256": {
24
+ "content": "<|extra_id_0|>",
25
+ "single_word": false,
26
+ "lstrip": false,
27
+ "rstrip": false,
28
+ "normalized": false,
29
+ "special": false
30
+ },
31
+ "100257": {
32
+ "content": "<|endoftext|>",
33
+ "single_word": false,
34
+ "lstrip": false,
35
+ "rstrip": false,
36
+ "normalized": false,
37
+ "special": true
38
+ },
39
+ "100258": {
40
+ "content": "<|fim_prefix|>",
41
+ "single_word": false,
42
+ "lstrip": false,
43
+ "rstrip": false,
44
+ "normalized": false,
45
+ "special": true
46
+ },
47
+ "100259": {
48
+ "content": "<|fim_middle|>",
49
+ "single_word": false,
50
+ "lstrip": false,
51
+ "rstrip": false,
52
+ "normalized": false,
53
+ "special": true
54
+ },
55
+ "100260": {
56
+ "content": "<|fim_suffix|>",
57
+ "single_word": false,
58
+ "lstrip": false,
59
+ "rstrip": false,
60
+ "normalized": false,
61
+ "special": true
62
+ },
63
+ "100261": {
64
+ "content": "|||PHONE_NUMBER|||",
65
+ "single_word": false,
66
+ "lstrip": false,
67
+ "rstrip": false,
68
+ "normalized": false,
69
+ "special": false
70
+ },
71
+ "100262": {
72
+ "content": "|||EMAIL_ADDRESS|||",
73
+ "single_word": false,
74
+ "lstrip": false,
75
+ "rstrip": false,
76
+ "normalized": false,
77
+ "special": false
78
+ },
79
+ "100263": {
80
+ "content": "|||IP_ADDRESS|||",
81
+ "single_word": false,
82
+ "lstrip": false,
83
+ "rstrip": false,
84
+ "normalized": false,
85
+ "special": false
86
+ },
87
+ "100264": {
88
+ "content": "<|im_start|>",
89
+ "single_word": false,
90
+ "lstrip": false,
91
+ "rstrip": false,
92
+ "normalized": false,
93
+ "special": true
94
+ },
95
+ "100265": {
96
+ "content": "<|im_end|>",
97
+ "single_word": false,
98
+ "lstrip": false,
99
+ "rstrip": false,
100
+ "normalized": false,
101
+ "special": true
102
+ },
103
+ "100266": {
104
+ "content": "<functions>",
105
+ "single_word": false,
106
+ "lstrip": false,
107
+ "rstrip": false,
108
+ "normalized": false,
109
+ "special": false
110
+ },
111
+ "100267": {
112
+ "content": "</functions>",
113
+ "single_word": false,
114
+ "lstrip": false,
115
+ "rstrip": false,
116
+ "normalized": false,
117
+ "special": false
118
+ },
119
+ "100268": {
120
+ "content": "<function_calls>",
121
+ "single_word": false,
122
+ "lstrip": false,
123
+ "rstrip": false,
124
+ "normalized": false,
125
+ "special": false
126
+ },
127
+ "100269": {
128
+ "content": "</function_calls>",
129
+ "single_word": false,
130
+ "lstrip": false,
131
+ "rstrip": false,
132
+ "normalized": false,
133
+ "special": false
134
+ },
135
+ "100270": {
136
+ "content": "<|extra_id_1|>",
137
+ "single_word": false,
138
+ "lstrip": false,
139
+ "rstrip": false,
140
+ "normalized": false,
141
+ "special": false
142
+ },
143
+ "100271": {
144
+ "content": "<|extra_id_2|>",
145
+ "single_word": false,
146
+ "lstrip": false,
147
+ "rstrip": false,
148
+ "normalized": false,
149
+ "special": false
150
+ },
151
+ "100272": {
152
+ "content": "<|extra_id_3|>",
153
+ "single_word": false,
154
+ "lstrip": false,
155
+ "rstrip": false,
156
+ "normalized": false,
157
+ "special": false
158
+ },
159
+ "100273": {
160
+ "content": "<|extra_id_4|>",
161
+ "single_word": false,
162
+ "lstrip": false,
163
+ "rstrip": false,
164
+ "normalized": false,
165
+ "special": false
166
+ },
167
+ "100274": {
168
+ "content": "<|extra_id_5|>",
169
+ "single_word": false,
170
+ "lstrip": false,
171
+ "rstrip": false,
172
+ "normalized": false,
173
+ "special": false
174
+ },
175
+ "100275": {
176
+ "content": "<|extra_id_6|>",
177
+ "single_word": false,
178
+ "lstrip": false,
179
+ "rstrip": false,
180
+ "normalized": false,
181
+ "special": false
182
+ },
183
+ "100276": {
184
+ "content": "<|endofprompt|>",
185
+ "single_word": false,
186
+ "lstrip": false,
187
+ "rstrip": false,
188
+ "normalized": false,
189
+ "special": true
190
+ },
191
+ "100277": {
192
+ "content": "<|pad|>",
193
+ "single_word": false,
194
+ "lstrip": false,
195
+ "rstrip": false,
196
+ "normalized": false,
197
+ "special": true
198
+ }
199
+ }
200
+ }