Meta Llama 2
Model Card
You can find details about this model in the model card.
Special Tokens used with Meta Llama 2
<s></s>: These are the BOS and EOS tokens from SentencePiece. When multiple messages are present in a multi turn conversation, they separate them, including the user input and model response.
[INST][/INST]: These tokens enclose user messages in multi turn conversations.
<<SYS>><</SYS>>: These enclose the system message.
Meta Llama 2
The base model supports text completion, so any incomplete user prompt, without special tags, will prompt the model to complete it. The tokenizer provided with the model will include the SentencePiece beginning of sequence (BOS) token (<s>) if requested. Review this code for details.
<s>{{ user_prompt }}Meta Llama 2 Chat
Code to produce this prompt format can be found here. The system prompt is optional.
Single message instance with optional system prompt.
<s>[INST] <<SYS>>
{{ system_prompt }}
<</SYS>>
{{ user_message }} [/INST]Multiple user and assistant messages example.
<s>[INST] <<SYS>>
{{ system_prompt }}
<</SYS>>
{{ user_message_1 }} [/INST] {{ model_answer_1 }} </s>
<s>[INST] {{ user_message_2 }} [/INST]