chat_template.jinja DELETED
@@ -1,74 +0,0 @@
1
- {%- if tools %}
2
- {{- '<|im_start|>system\n' }}
3
- {%- if messages[0].role == 'system' %}
4
- {{- messages[0].content + '\n\n' }}
5
- {%- endif %}
6
- {{- "# 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>" }}
7
- {%- for tool in tools %}
8
- {{- "\n" }}
9
- {{- tool | tojson }}
10
- {%- endfor %}
11
- {{- "\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" }}
12
- {%- else %}
13
- {%- if messages[0]['role'] == 'system' -%}
14
- {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
15
- {%- else -%}
16
- {{- '<|im_start|>system\nYou are a helpful assistant<|im_end|>\n' }}
17
- {%- endif %}
18
- {%- endif %}
19
- {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
20
- {%- for message in messages[::-1] %}
21
- {%- set index = (messages|length - 1) - loop.index0 %}
22
- {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
23
- {%- set ns.multi_step_tool = false %}
24
- {%- set ns.last_query_index = index %}
25
- {%- endif %}
26
- {%- endfor %}
27
- {%- for message in messages %}
28
- {%- if message.content is string %}
29
- {%- set content = message.content %}
30
- {%- else %}
31
- {%- set content = '' %}
32
- {%- endif %}
33
- {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
34
- {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
35
- {%- elif message.role == "assistant" %}
36
- {{- '<|im_start|>' + message.role + '\n' + content }}
37
- {%- if message.tool_calls %}
38
- {%- for tool_call in message.tool_calls %}
39
- {%- if (loop.first and content) or (not loop.first) %}
40
- {{- '\n' }}
41
- {%- endif %}
42
- {%- if tool_call.function %}
43
- {%- set tool_call = tool_call.function %}
44
- {%- endif %}
45
- {{- '<tool_call>\n{"name": "' }}
46
- {{- tool_call.name }}
47
- {{- '", "arguments": ' }}
48
- {%- if tool_call.arguments is string %}
49
- {{- tool_call.arguments }}
50
- {%- else %}
51
- {{- tool_call.arguments | tojson }}
52
- {%- endif %}
53
- {{- '}\n</tool_call>' }}
54
- {%- endfor %}
55
- {%- endif %}
56
- {{- '<|im_end|>\n' }}
57
- {%- elif message.role == "tool" %}
58
- {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
59
- {{- '<|im_start|>user' }}
60
- {%- endif %}
61
- {{- '\n<tool_response>\n' }}
62
- {{- content }}
63
- {{- '\n</tool_response>' }}
64
- {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
65
- {{- '<|im_end|>\n' }}
66
- {%- endif %}
67
- {%- endif %}
68
- {%- endfor %}
69
- {%- if add_generation_prompt %}
70
- {{- '<|im_start|>assistant\n' }}
71
- {%- if enable_thinking is defined and enable_thinking is false %}
72
- {{- '<think>\n\n</think>\n\n' }}
73
- {%- endif %}
74
- {%- endif %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
config.json CHANGED
@@ -5,14 +5,13 @@
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
7
  "bos_token_id": 1,
8
- "dtype": "float16",
9
  "eos_token_id": 2,
10
  "head_dim": 96,
11
  "hidden_act": "silu",
12
  "hidden_size": 768,
13
  "initializer_range": 0.02,
14
  "intermediate_size": 2048,
15
- "max_position_embeddings": 32768,
16
  "mlp_bias": false,
17
  "model_type": "llama",
18
  "num_attention_heads": 8,
@@ -22,8 +21,9 @@
22
  "rms_norm_eps": 1e-05,
23
  "rope_scaling": null,
24
  "rope_theta": 1000000.0,
25
- "tie_word_embeddings": true,
26
- "transformers_version": "4.57.1",
 
27
  "use_cache": true,
28
  "vocab_size": 6400
29
  }
 
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
7
  "bos_token_id": 1,
 
8
  "eos_token_id": 2,
9
  "head_dim": 96,
10
  "hidden_act": "silu",
11
  "hidden_size": 768,
12
  "initializer_range": 0.02,
13
  "intermediate_size": 2048,
14
+ "max_position_embeddings": 8192,
15
  "mlp_bias": false,
16
  "model_type": "llama",
17
  "num_attention_heads": 8,
 
21
  "rms_norm_eps": 1e-05,
22
  "rope_scaling": null,
23
  "rope_theta": 1000000.0,
24
+ "tie_word_embeddings": false,
25
+ "torch_dtype": "bfloat16",
26
+ "transformers_version": "4.51.3",
27
  "use_cache": true,
28
  "vocab_size": 6400
29
  }
generation_config.json CHANGED
@@ -2,5 +2,5 @@
2
  "_from_model_config": true,
3
  "bos_token_id": 1,
4
  "eos_token_id": 2,
5
- "transformers_version": "4.57.1"
6
  }
 
2
  "_from_model_config": true,
3
  "bos_token_id": 1,
4
  "eos_token_id": 2,
5
+ "transformers_version": "4.51.3"
6
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:71d2a54d625bb1a91bcde6a146f1bc32afe62ea1f7d067a8ffe4ee7dc810dee4
3
- size 208078080
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ac5213cee7e73410aaf2f422589537fe47e920c1bf3dd4e2aced5a4b5410442
3
+ size 217908728
tokenizer_config.json CHANGED
@@ -30,6 +30,7 @@
30
  },
31
  "additional_special_tokens": [],
32
  "bos_token": "<|im_start|>",
 
33
  "clean_up_tokenization_spaces": false,
34
  "eos_token": "<|im_end|>",
35
  "extra_special_tokens": {},
@@ -38,6 +39,6 @@
38
  "pad_token": "<|endoftext|>",
39
  "sp_model_kwargs": {},
40
  "spaces_between_special_tokens": false,
41
- "tokenizer_class": "PreTrainedTokenizerFast",
42
  "unk_token": "<|endoftext|>"
43
  }
 
30
  },
31
  "additional_special_tokens": [],
32
  "bos_token": "<|im_start|>",
33
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{{ '<|im_start|>system\\n' + system_message + '<|im_end|>\\n' }}{% else %}{{ '<|im_start|>system\\nYou are a helpful assistant<|im_end|>\\n' }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|im_start|>user\\n' + content + '<|im_end|>\\n<|im_start|>assistant\\n' }}{% elif message['role'] == 'assistant' %}{{ content + '<|im_end|>' + '\\n' }}{% endif %}{% endfor %}",
34
  "clean_up_tokenization_spaces": false,
35
  "eos_token": "<|im_end|>",
36
  "extra_special_tokens": {},
 
39
  "pad_token": "<|endoftext|>",
40
  "sp_model_kwargs": {},
41
  "spaces_between_special_tokens": false,
42
+ "tokenizer_class": "PreTrainedTokenizer",
43
  "unk_token": "<|endoftext|>"
44
  }