Category S: Chat Templates
Chat template formatting for LLM inference, mirroring the apr chat CLI subcommand. Each recipe implements a specific template format from scratch, showing exact byte-level structure with special tokens.
Recipes
| Recipe | Description | Status |
|---|---|---|
| ChatML | ChatML template format (OpenAI, Qwen, Yi) | Verified |
| LLaMA 2 | LLaMA 2 chat template with [INST] delimiters | Verified |
| Mistral | Mistral Instruct template (no native system role) | Verified |
| Multi-Format | Auto-detect and apply correct template by model name | Verified |
| Injection Defense | Prompt injection detection and sanitization | Verified |