Commit
·
a3d8e05
1
Parent(s):
681fdbf
added tiktoken.model
Browse files- chat_template.jinja +37 -0
- config.json +0 -9
- tiktoken.model +3 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% if tools -%}
|
| 2 |
+
{{ '<|im_system|>tool_declare<|im_middle|>' -}}
|
| 3 |
+
{{- tools | tojson -}}
|
| 4 |
+
{{ '<|im_end|>' -}}
|
| 5 |
+
{%- endif -%}
|
| 6 |
+
|
| 7 |
+
{%- for message in messages -%}
|
| 8 |
+
{%- if loop.first and messages[0]['role'] != 'system' -%}
|
| 9 |
+
{{ '<|im_system|>system<|im_middle|>You are a helpful assistant<|im_end|>' }}
|
| 10 |
+
{%- endif -%}
|
| 11 |
+
{%- if message['role'] == 'system' -%}
|
| 12 |
+
{{ '<|im_system|>system<|im_middle|>' }}
|
| 13 |
+
{%- elif message['role'] == 'user' -%}
|
| 14 |
+
{{ '<|im_user|>user<|im_middle|>' }}
|
| 15 |
+
{%- elif message['role'] == 'assistant' -%}
|
| 16 |
+
{{ '<|im_assistant|>assistant<|im_middle|>' }}
|
| 17 |
+
{%- elif message['role'] == 'tool' -%}
|
| 18 |
+
{{ '<|im_system|>tool<|im_middle|>' }}
|
| 19 |
+
{%- endif -%}
|
| 20 |
+
|
| 21 |
+
{%- if message['content'] is string -%}
|
| 22 |
+
{{- message['content'] + '<|im_end|>' -}}
|
| 23 |
+
{%- else -%}
|
| 24 |
+
{%- for content in message['content'] -%}
|
| 25 |
+
{%- if content['type'] == 'image' or 'image' in content or 'image_url' in content -%}
|
| 26 |
+
{{ '<|media_start|>image<|media_content|><|media_pad|><|media_end|>' }}
|
| 27 |
+
{%- else -%}
|
| 28 |
+
{{ content['text'] }}
|
| 29 |
+
{%- endif -%}
|
| 30 |
+
{%- endfor -%}
|
| 31 |
+
{{ '<|im_end|>' }}
|
| 32 |
+
{%- endif -%}
|
| 33 |
+
{%- endfor -%}
|
| 34 |
+
|
| 35 |
+
{%- if add_generation_prompt -%}
|
| 36 |
+
{{ '<|im_assistant|>assistant<|im_middle|>' }}
|
| 37 |
+
{%- endif -%}
|
config.json
CHANGED
|
@@ -35,15 +35,6 @@
|
|
| 35 |
"q_lora_rank": 1536,
|
| 36 |
"qk_nope_head_dim": 128,
|
| 37 |
"qk_rope_head_dim": 64,
|
| 38 |
-
"quantization_config": {
|
| 39 |
-
"activation_scheme": "dynamic",
|
| 40 |
-
"fmt": "e4m3",
|
| 41 |
-
"quant_method": "fp8",
|
| 42 |
-
"weight_block_size": [
|
| 43 |
-
128,
|
| 44 |
-
128
|
| 45 |
-
]
|
| 46 |
-
},
|
| 47 |
"rms_norm_eps": 1e-06,
|
| 48 |
"rope_theta": 50000.0,
|
| 49 |
"routed_scaling_factor": 2.827,
|
|
|
|
| 35 |
"q_lora_rank": 1536,
|
| 36 |
"qk_nope_head_dim": 128,
|
| 37 |
"qk_rope_head_dim": 64,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
"rms_norm_eps": 1e-06,
|
| 39 |
"rope_theta": 50000.0,
|
| 40 |
"routed_scaling_factor": 2.827,
|
tiktoken.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6c497a7469b33ced9c38afb1ad6e47f03f5e5dc05f15930799210ec050c5103
|
| 3 |
+
size 2795286
|