Animation · 5 steps
This is how two messages with roles become the sequence that goes into Llama 3.1. Use “Next” to go step by step, or “Play” to run it on its own.

Chat historySystem: “Answer briefly.”You: “What is thecapital of France?”Chat templateadds role markers,inserts datesModelcontinues after“assistant”one token sequence45 tokens, of them9 special tokens with rolesassembleinput