diff --git a/instruction-templates/Mistral.yaml b/instruction-templates/Mistral.yaml index 785a3a32..0b6baf11 100644 --- a/instruction-templates/Mistral.yaml +++ b/instruction-templates/Mistral.yaml @@ -1,16 +1,7 @@ instruction_template: |- - {%- set found_item = false -%} - {%- for message in messages -%} - {%- if message['role'] == 'system' -%} - {%- set found_item = true -%} - {%- endif -%} - {%- endfor -%} - {%- if not found_item -%} - {{- '' + '' + '' -}} - {%- endif %} {%- for message in messages %} {%- if message['role'] == 'system' -%} - {{- '' + message['content'] + '' -}} + {{- message['content'] -}} {%- else -%} {%- if message['role'] == 'user' -%} {{-'[INST] ' + message['content'] + ' [/INST]'-}} diff --git a/models/config.yaml b/models/config.yaml index f18687ae..197d4b35 100644 --- a/models/config.yaml +++ b/models/config.yaml @@ -174,7 +174,7 @@ instruction_template: 'OpenChat' .*codellama.*instruct: instruction_template: 'Llama-v2' -.*mistral.*instruct: +.*(mistral|mixtral).*instruct: instruction_template: 'Mistral' .*mistral.*openorca: instruction_template: 'ChatML'