Chapter 35: Model and Data Cards
Documentation is how a model’s limits travel with it. Without a card, every downstream user re-learns the model’s failure modes in production; with one, the limits are stated, measured, and versioned next to the weights. This chapter writes the two documents every released model needs. A model card is the model’s interface documentation: intended use, out-of-scope use, training data, evaluation results with uncertainty, and known limitations. A datasheet answers why the dataset exists, how it was collected and cleaned, what it contains, and what it should not be used for.
Concepts from other sections (5)
This section uses these ideas. Each has a short definition and a link to the section that explains it in full. Tap a dotted term in the text to preview it.
- Model card: the model’s interface documentation: details, intended and out-of-scope use, evaluation with uncertainty, limitations, and data. Read more: 35.1 Datasheet and model card
- Release gate: a check that passes a row only when its interval bound clears the limit, and fails missing rows. Read more: 36.1 Bias and safety evals
- Out-of-scope list: the uses a model must not serve, written so a gateway rule can enforce them. Read more: 35.1 Datasheet and model card
- Confidence interval: a procedure that, over repeated samples, produces intervals covering the fixed true parameter at the stated rate. Read more: 13.11 Probability problem set, part c: limit theorems and confidence intervals in Mathematics
- Third-party model card: a card for weights the project did not train, pinning the upstream revision and reporting only evaluations the project ran. Read more: 35.1 Datasheet and model card
The chapter’s single section, Datasheet and model card, builds both for a small reference model and wires them into the release gate. Cards are generated where possible and checked always: the datasheet’s counts come from the ledger, the evaluation table from the eval suite, and the release workflow refuses a model without a card. The section also shows how to label a third-party model as such: the agent model the system fetches, SmolLM2-135M-Instruct, gets its own provenance card, not yours.
Learning objectives
- Write a model card whose out-of-scope list is specific enough for a gateway rule to enforce.
- Report every evaluation number with its confidence interval and release threshold.
- Write a datasheet that records every source, license, and preprocessing step, consistent with the licensing allowlist.
- Write an honest third-party model card with a pinned upstream revision.
Before you begin
Section titled “Before you begin”Read Data Licensing and Privacy and PII first: the datasheet reports what the ledger records and what the PII scrub found. The section applies to the trained capstone model, the TinyStories capstone in AI Engineering, and uses a fast-rebuilding 4-gram as its worked example. A useful warm-up is to read Mitchell et al. and Gebru et al., then three real model cards on the Hugging Face Hub, noting what each omits.
In this chapter
Section titled “In this chapter”- Datasheet and model card: what each document is for, the rules that make them useful (enforceable scope, intervals, measured limitations, consistent licenses, labelled third-party weights, versioning), and an annotated walkthrough of the reference model card, datasheet, and third-party card.
The numbers the card reports come from the next chapter, Bias and Safety Evals. For cards as reference documents in general, see Documentation Writing in Software Engineering.
Further reading
Section titled “Further reading”- Mitchell et al., Model Cards for Model Reporting (free).
- Gebru et al., Datasheets for Datasets (free).
- Hugging Face, model card guide (free).
- Pushkarna et al., Data Cards (free).
- The
MODEL_CARD.mdandDATASHEET.mdtemplates in the system contracts.