text-generation-webui/instruction-templates/Mistral.yaml
oobabooga a060908d6c Mixtral Instruct: detect prompt format for llama.cpp loader
Workaround until the tokenizer.chat_template kv field gets implemented
2023-12-15 06:59:15 -08:00

17 lines
476 B
YAML

instruction_template: |-
{%- for message in messages %}
{%- if message['role'] == 'system' -%}
{{- message['content'] -}}
{%- else -%}
{%- if message['role'] == 'user' -%}
{{-'[INST] ' + message['content'] + ' [/INST]'-}}
{%- else -%}
{{-'' + message['content'] + '</s> ' -}}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{-''-}}
{%- endif -%}