Created
June 14, 2024 02:07
-
-
Save Rohithzr/cc6243bf8b739ee61bddc97fbc340ae3 to your computer and use it in GitHub Desktop.
mistral.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- for message in messages %} | |
{%- if message['role'] == 'system' -%} | |
{{- message['content'] -}} | |
{%- else -%} | |
{%- if message['role'] == 'user' -%} | |
{{-'[INST] ' + message['content'].rstrip() + ' [/INST]'-}} | |
{%- else -%} | |
{{-'' + message['content'] + '</s>' -}} | |
{%- endif -%} | |
{%- endif -%} | |
{%- endfor -%} | |
{%- if add_generation_prompt -%} | |
{{-''-}} | |
{%- endif -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment