Tom Aarsen commited on
Commit ·
8301dda
1
Parent(s): 8d65917
Silence warning by always including the default prompt + ignoring it in the chat template
Browse files
additional_chat_templates/sentence_transformers.jinja
CHANGED
|
@@ -1,12 +1,14 @@
|
|
| 1 |
{%- set audio_count = namespace(value=0) -%}
|
| 2 |
{%- set image_count = namespace(value=0) -%}
|
| 3 |
{%- set video_count = namespace(value=0) -%}
|
| 4 |
-
|
| 5 |
-
{%- if loop.first and message['role'] != 'system' -%}
|
| 6 |
-
<|im_start|>system
|
| 7 |
You are a helpful assistant.<|im_end|>
|
| 8 |
-
{%
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
{% if message['content'] is string -%}
|
| 11 |
{{- message['content'] -}}<|im_end|>
|
| 12 |
{% else -%}
|
|
@@ -42,6 +44,7 @@ You are a helpful assistant.<|im_end|>
|
|
| 42 |
{%- endif -%}
|
| 43 |
<|im_end|>
|
| 44 |
{% endif -%}
|
|
|
|
| 45 |
{%- endfor -%}
|
| 46 |
{%- if add_generation_prompt -%}
|
| 47 |
<|im_start|>assistant
|
|
|
|
| 1 |
{%- set audio_count = namespace(value=0) -%}
|
| 2 |
{%- set image_count = namespace(value=0) -%}
|
| 3 |
{%- set video_count = namespace(value=0) -%}
|
| 4 |
+
<|im_start|>system
|
|
|
|
|
|
|
| 5 |
You are a helpful assistant.<|im_end|>
|
| 6 |
+
{% for message in messages -%}
|
| 7 |
+
{%- if message['role'] == 'system' -%}
|
| 8 |
+
{#- skip: the fixed system prompt above was already emitted. Any input system
|
| 9 |
+
message is only present to silence Qwen2.5-Omni's default-prompt warning. -#}
|
| 10 |
+
{%- else -%}
|
| 11 |
+
<|im_start|>{{ message['role'] }}
|
| 12 |
{% if message['content'] is string -%}
|
| 13 |
{{- message['content'] -}}<|im_end|>
|
| 14 |
{% else -%}
|
|
|
|
| 44 |
{%- endif -%}
|
| 45 |
<|im_end|>
|
| 46 |
{% endif -%}
|
| 47 |
+
{%- endif -%}
|
| 48 |
{%- endfor -%}
|
| 49 |
{%- if add_generation_prompt -%}
|
| 50 |
<|im_start|>assistant
|
config_sentence_transformers.json
CHANGED
|
@@ -4,8 +4,10 @@
|
|
| 4 |
"sentence_transformers": "5.5.0.dev0",
|
| 5 |
"transformers": "5.5.0.dev0"
|
| 6 |
},
|
| 7 |
-
"default_prompt_name":
|
| 8 |
"model_type": "SentenceTransformer",
|
| 9 |
-
"prompts": {
|
|
|
|
|
|
|
| 10 |
"similarity_fn_name": "cosine"
|
| 11 |
}
|
|
|
|
| 4 |
"sentence_transformers": "5.5.0.dev0",
|
| 5 |
"transformers": "5.5.0.dev0"
|
| 6 |
},
|
| 7 |
+
"default_prompt_name": "default",
|
| 8 |
"model_type": "SentenceTransformer",
|
| 9 |
+
"prompts": {
|
| 10 |
+
"default": "You are Qwen, a virtual human developed by the Qwen Team, Alibaba Group, capable of perceiving auditory and visual inputs, as well as generating text and speech."
|
| 11 |
+
},
|
| 12 |
"similarity_fn_name": "cosine"
|
| 13 |
}
|