NaolBM commited on
Commit
3d1b678
·
verified ·
1 Parent(s): 7ff5946

Upload model trained with Unsloth

Browse files

Upload model trained with Unsloth 2x faster

chat_template.jinja CHANGED
@@ -1,7 +1,51 @@
1
- {{- bos_token -}}{%- set system_prompt = "" -%}{%- set ns = namespace(system_prompt="") -%}{%- if messages[0]["role"] == "system" -%} {%- set ns.system_prompt = messages[0]["content"] -%} {%- set messages = messages[1:] -%}{%- endif -%}{%- if tools -%} {%- set ns.system_prompt = ns.system_prompt + ("
2
- " if ns.system_prompt else "") + "List of tools: <|tool_list_start|>[" -%} {%- for tool in tools -%} {%- if tool is not string -%} {%- set tool = tool | tojson -%} {%- endif -%} {%- set ns.system_prompt = ns.system_prompt + tool -%} {%- if not loop.last -%} {%- set ns.system_prompt = ns.system_prompt + ", " -%} {%- endif -%} {%- endfor -%} {%- set ns.system_prompt = ns.system_prompt + "]<|tool_list_end|>" -%}{%- endif -%}{%- if ns.system_prompt -%} {{- "<|im_start|>system
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  " + ns.system_prompt + "<|im_end|>
4
- " -}}{%- endif -%}{%- for message in messages -%} {{- "<|im_start|>" + message["role"] + "
5
- " -}} {%- set content = message["content"] -%} {%- if content is not string -%} {%- set content = content | tojson -%} {%- endif -%} {%- if message["role"] == "tool" -%} {%- set content = "<|tool_response_start|>" + content + "<|tool_response_end|>" -%} {%- endif -%} {{- content + "<|im_end|>
6
- " -}}{%- endfor -%}{%- if add_generation_prompt -%} {{- "<|im_start|>assistant
7
- " -}}{%- endif -%}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- bos_token -}}
2
+ {%- set keep_past_thinking = keep_past_thinking | default(false) -%}
3
+ {%- set ns = namespace(system_prompt="") -%}
4
+ {%- if messages[0]["role"] == "system" -%}
5
+ {%- set ns.system_prompt = messages[0]["content"] -%}
6
+ {%- set messages = messages[1:] -%}
7
+ {%- endif -%}
8
+ {%- if tools -%}
9
+ {%- set ns.system_prompt = ns.system_prompt + ("
10
+ " if ns.system_prompt else "") + "List of tools: [" -%}
11
+ {%- for tool in tools -%}
12
+ {%- if tool is not string -%}
13
+ {%- set tool = tool | tojson -%}
14
+ {%- endif -%}
15
+ {%- set ns.system_prompt = ns.system_prompt + tool -%}
16
+ {%- if not loop.last -%}
17
+ {%- set ns.system_prompt = ns.system_prompt + ", " -%}
18
+ {%- endif -%}
19
+ {%- endfor -%}
20
+ {%- set ns.system_prompt = ns.system_prompt + "]" -%}
21
+ {%- endif -%}
22
+ {%- if ns.system_prompt -%}
23
+ {{- "<|im_start|>system
24
  " + ns.system_prompt + "<|im_end|>
25
+ " -}}
26
+ {%- endif -%}
27
+ {%- set ns.last_assistant_index = -1 -%}
28
+ {%- for message in messages -%}
29
+ {%- if message["role"] == "assistant" -%}
30
+ {%- set ns.last_assistant_index = loop.index0 -%}
31
+ {%- endif -%}
32
+ {%- endfor -%}
33
+ {%- for message in messages -%}
34
+ {{- "<|im_start|>" + message["role"] + "
35
+ " -}}
36
+ {%- set content = message["content"] -%}
37
+ {%- if content is not string -%}
38
+ {%- set content = content | tojson -%}
39
+ {%- endif -%}
40
+ {%- if message["role"] == "assistant" and not keep_past_thinking and loop.index0 != ns.last_assistant_index -%}
41
+ {%- if "</think>" in content -%}
42
+ {%- set content = content.split("</think>")[-1] | trim -%}
43
+ {%- endif -%}
44
+ {%- endif -%}
45
+ {{- content + "<|im_end|>
46
+ " -}}
47
+ {%- endfor -%}
48
+ {%- if add_generation_prompt -%}
49
+ {{- "<|im_start|>assistant
50
+ " -}}
51
+ {%- endif -%}
special_tokens_map.json CHANGED
@@ -1,4 +1,20 @@
1
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  "bos_token": {
3
  "content": "<|startoftext|>",
4
  "lstrip": false,
 
1
  {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<think>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ {
11
+ "content": "</think>",
12
+ "lstrip": false,
13
+ "normalized": false,
14
+ "rstrip": false,
15
+ "single_word": false
16
+ }
17
+ ],
18
  "bos_token": {
19
  "content": "<|startoftext|>",
20
  "lstrip": false,
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1000f5d7c4055ba470bd859a5b365075e86f590eac771426ba2f448fb7faf4a6
3
- size 13819389
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:722a4d8c617e563f8d0b40c65a3cab7f2af2a131c22b3f431111caf499c2dcf9
3
+ size 13819758
tokenizer_config.json CHANGED
The diff for this file is too large to render. See raw diff