mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Add a template for NVIDIA ChatQA models
This commit is contained in:
parent
e9c9483171
commit
cb31998605
25
instruction-templates/NVIDIA-ChatQA.yaml
Normal file
25
instruction-templates/NVIDIA-ChatQA.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
instruction_template: |-
|
||||||
|
{%- set ns = namespace(found=false) -%}
|
||||||
|
{%- for message in messages -%}
|
||||||
|
{%- if message['role'] == 'system' -%}
|
||||||
|
{%- set ns.found = true -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- if not ns.found -%}
|
||||||
|
{{- '' -}}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for message in messages %}
|
||||||
|
{%- if message['role'] == 'system' -%}
|
||||||
|
{{- 'System:' + message['content'] + '\n\n' -}}
|
||||||
|
{%- else -%}
|
||||||
|
{%- if message['role'] == 'user' -%}
|
||||||
|
{{-'User: ' + message['content'] + '\n\n'-}}
|
||||||
|
{%- else -%}
|
||||||
|
{{-'Assistant: ' + message['content'] + '\n\n' -}}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- if add_generation_prompt -%}
|
||||||
|
{{-'Assistant:'-}}
|
||||||
|
{%- endif -%}
|
||||||
|
|
@ -204,3 +204,5 @@
|
|||||||
instruction_template: 'ChatML'
|
instruction_template: 'ChatML'
|
||||||
.*airoboros-3_1-yi-34b-200k:
|
.*airoboros-3_1-yi-34b-200k:
|
||||||
instruction_template: 'Llama-v2'
|
instruction_template: 'Llama-v2'
|
||||||
|
.*chatqa:
|
||||||
|
instruction_template: 'NVIDIA-ChatQA'
|
||||||
|
Loading…
Reference in New Issue
Block a user