The Open Model EcosystemLesson 24 of 71

Module 3 · Inside the files

The chat template is a contract

In this lesson

  • 9 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 4 of 10 in this chapter

This chapter’s goalOpen a model repository you have never seen and predict, from config.json and the tokenizer alone, its parameter count, its memory footprint at a given context length, its per-token cost in your languages and the exact conversation format it requires; then verify each prediction with a command and diagnose a runaway or garbled generation from the files rather than by guessing.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

The most common self-inflicted wound

A team tries an open model, finds it rambles, ignores the system prompt and never stops, and concludes the model is poor. Nine times in ten the model is fine and the conversation was formatted wrongly. This lesson is how to check in thirty seconds.

An instruct model was trained on an exact byte sequence: special tokens marking where each role starts and ends, a specific ordering, a specific token that means the assistant should now speak. Deviate and you are sampling from a distribution the model was never trained on.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Maths You Actually Need exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘The chat template is a contract’, in The Open Model Ecosystem. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/open-models/the-chat-template-contract (Accessed: 29 November 2026).