mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-30 06:00:15 +01:00
a060908d6c
Workaround until the tokenizer.chat_template kv field gets implemented
17 lines
476 B
YAML
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 -%}
|
|
|