Fix spaces in Mistral/Mixtral instruct prompt (#5214)

This commit is contained in:
Badis Ghoubali 2024-01-10 01:12:54 +01:00 committed by GitHub
parent bec4e0a1ce
commit c44836c4d7
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,13 +4,12 @@ instruction_template: |-
{{- message['content'] -}}
{%- else -%}
{%- if message['role'] == 'user' -%}
{{-'[INST] ' + message['content'] + ' [/INST]'-}}
{{-' [INST] ' + message['content'].rstrip() + ' [/INST] '-}}
{%- else -%}
{{-'' + message['content'] + '</s> ' -}}
{{-'' + message['content'] + '</s>' -}}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{-''-}}
{%- endif -%}