patrickvonplaten Rocketknight1 HF Staff commited on
Commit
e969dcf
·
verified ·
1 Parent(s): 2c5d4fe

Add system message to chat template (#6)

Browse files

- Upload tokenizer (8bdd5b098eaba73833fcb20602cac4708f670686)


Co-authored-by: Matthew Carrigan <[email protected]>

Files changed (3) hide show
  1. README.md +2 -3
  2. special_tokens_map.json +0 -0
  3. tokenizer_config.json +1 -1
README.md CHANGED
@@ -15,9 +15,8 @@ library_name: vllm
15
  inference: false
16
  base_model:
17
  - mistralai/Mistral-Small-24B-Base-2501
18
- extra_gated_description: >-
19
- If you want to learn more about how we process your personal data, please read
20
- our <a href="https://mistral.ai/terms/">Privacy Policy</a>.
21
  tags:
22
  - transformers
23
  ---
 
15
  inference: false
16
  base_model:
17
  - mistralai/Mistral-Small-24B-Base-2501
18
+ extra_gated_description: If you want to learn more about how we process your personal
19
+ data, please read our <a href="https://mistral.ai/terms/">Privacy Policy</a>.
 
20
  tags:
21
  - transformers
22
  ---
special_tokens_map.json CHANGED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json CHANGED
@@ -9007,7 +9007,7 @@
9007
  "<SPECIAL_999>"
9008
  ],
9009
  "bos_token": "<s>",
9010
- "chat_template": "{{ bos_token }}{% for message in messages %}{% if message['role'] == 'user' %}{{ '[INST]' + message['content'] + '[/INST]' }}{% elif message['role'] == 'system' %}{{ '[SYSTEM_PROMPT]' + message['content'] + '[/SYSTEM_PROMPT]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token }}{% else %}{{ raise_exception('Only user, system and assistant roles are supported!') }}{% endif %}{% endfor %}",
9011
  "clean_up_tokenization_spaces": false,
9012
  "eos_token": "</s>",
9013
  "extra_special_tokens": {},
 
9007
  "<SPECIAL_999>"
9008
  ],
9009
  "bos_token": "<s>",
9010
+ "chat_template": "{%- set today = strftime_now(\"%Y-%m-%d\") %}\n{%- set default_system_message = \"You are Mistral Small 3, a Large Language Model (LLM) created by Mistral AI, a French startup headquartered in Paris.\\nYour knowledge base was last updated on 2023-10-01. The current date is \" + today + \".\\n\\nWhen you're not sure about some information, you say that you don't have the information and don't make up anything.\\nIf the user's question is not clear, ambiguous, or does not provide enough context for you to accurately answer the question, you do not try to answer it right away and you rather ask the user to clarify their request (e.g. \\\"What are some good restaurants around me?\\\" => \\\"Where are you?\\\" or \\\"When is the next flight to Tokyo\\\" => \\\"Where do you travel from?\\\")\" %}\n\n{{- bos_token }}\n\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content'] %}\n {%- set loop_messages = messages[1:] %}\n{%- else %}\n {%- set system_message = default_system_message %}\n {%- set loop_messages = messages %}\n{%- endif %}\n{{- '[SYSTEM_PROMPT]' + system_message + '[/SYSTEM_PROMPT]' }}\n\n{%- for message in loop_messages %}\n {%- if message['role'] == 'user' %}\n {{- '[INST]' + message['content'] + '[/INST]' }}\n {%- elif message['role'] == 'system' %}\n {{- '[SYSTEM_PROMPT]' + message['content'] + '[/SYSTEM_PROMPT]' }}\n {%- elif message['role'] == 'assistant' %}\n {{- message['content'] + eos_token }}\n {%- else %}\n {{- raise_exception('Only user, system and assistant roles are supported!') }}\n {%- endif %}\n{%- endfor %}",
9011
  "clean_up_tokenization_spaces": false,
9012
  "eos_token": "</s>",
9013
  "extra_special_tokens": {},