Model Training Plan Template
Objective and success criteria, data mix and splits, baseline, architecture, 6ND compute budget in KaTeX, ablations, checkpoints, stop rules, gates, risks
Cara menggunakan: Use it when you are about to reserve compute for a training or large fine-tuning run and need sign-off. Fill the success criteria, the data splits and the compute budget first, then the ablations that de-risk the main run. The main pitfall is treating scaling-law estimates as exact instead of replacing them with pilot measurements.
Pratinjau
Model Training Plan: [Model name]
Plan for a model training run, written and approved before the main run starts: the objective and success criteria, the data and its splits, the architecture and the baseline it must beat, the compute budget, the ablations that de-risk the run, the checkpoint and stop rules, the evaluation gates, and the risks. The compute estimate uses the widely cited approximation of about 6 FLOPs per parameter per training token (Kaplan et al. 2020) and the compute-optimal sizing idea of Hoffmann et al. 2022 as planning concepts, not as guarantees. Replace every
[bracketed]value and every row marked Example. Worked examples use a 1-billion-parameter decoder-only language model trained from scratch for code completion.
Document control
| Field | Value |
|---|---|
| Document ID | [TRN-PLAN-001] |
| Model name and target version | [Model name] [v1.0] |
| Run family | [Example: code-lm-1b-v1] |
| Version | [0.1] |
| Status | [Draft / In review / Approved / Running / Closed] |
| Owner | [@training-lead] |
| Approvers / reviewers | [@research-lead], [@infra-lead], [@responsible-ai], [@finance-partner] |
| Last updated | YYYY-MM-DD |
| Classification | [Internal / Confidential] |
| Code repository and commit | [repo URL] @ [commit SHA] |
| Compute reservation | [Cluster name, accelerator type, count, dates] |
| Related documents | [ML system design], [Datasheet], [Evaluation plan], [Model card] |
Approvals
| Role | Name | Decision | Date |
|---|---|---|---|
| Training lead | [@name] | [Approved / Changes requested] | YYYY-MM-DD |
| Research lead | [@name] | [Decision] | YYYY-MM-DD |
| Infrastructure lead | [@name] | [Decision] | YYYY-MM-DD |
| Responsible AI reviewer | [@name] | [Decision] | YYYY-MM-DD |
| Budget holder | [@name] | [Decision] | YYYY-MM-DD |
Revision history
| Version | Date | Author | Change summary |
|---|---|---|---|
| 0.1 | YYYY-MM-DD | [@name] | First draft |
| 0.2 | YYYY-MM-DD | [@name] | Example: Token budget raised from 15B to 20B after ablation ABL-003 |
| 1.0 | YYYY-MM-DD | [@name] | Example: Approved for the main run |
Contents
1. Objective and success criteria
1.1 Objective
[One paragraph: what the model is for, who uses it, and why a new training run is needed rather than an existing model, prompt changes or fine-tuning.]
Example: Train a 1B-parameter code completion model that runs on a single inference accelerator inside the latency budget of the editor plug-in, and that beats the current 350M-parameter production model on completion acceptance without regressing on licence and secret leakage checks.
1.2 Success criteria
| ID | Criterion | Metric | Threshold | Measured on |
|---|---|---|---|---|
| SC-001 (Example) | Better completions than production | pass@1 on internal held-out suite | ≥ production + 4.0 points | EVAL-SET-01 |
| SC-002 (Example) | Fits the latency budget | p95 time to first token at batch 1 | ≤ 120 ms | Serving benchmark |
| SC-003 (Example) | No memorised secrets | Secret extraction rate on canary prompts | 0 canaries recovered | Canary suite |
| SC-004 (Example) | Stays within budget | Accelerator hours used | ≤ 110% of section 5 total | Cluster billing |
| [SC-nnn] | [Criterion] | [Metric] | [Threshold] | [Set] |
1.3 Non-goals
- Example: Natural-language chat quality; this model completes code only.
- Example: Languages outside the top 12 in the data mix.
- [Non-goal]
2. Data and splits
Document each dataset in a Datasheet (ai-data/datasheet-for-datasets)
and reference it here. Record the tokenizer version, because token
counts change when the tokenizer changes.
2.1 Sources and mixture
| ID | Source | Licence / basis | Tokens (after filtering) | Mixture weight | Epochs |
|---|---|---|---|---|---|
| DS-001 (Example) | Permissively licensed public repositories | Per-file licence filter | 14.0B | 70% | 1.0 |
| DS-002 (Example) | Internal repositories with consent | Internal agreement | 3.0B | 15% | 1.0 |
| DS-003 (Example) | Technical documentation | Per-site terms | 2.0B | 10% | 1.0 |
| DS-004 (Example) | Synthetic unit tests generated by teacher model | Teacher terms of use | 1.0B | 5% | 1.0 |
| Total | 20.0B | 100% |
2.2 Processing pipeline
| Step | Rule | Evidence |
|---|---|---|
| Licence filter | Example: Keep files whose detected licence is on the allow list | Filter log with counts |
| Exact and near-duplicate removal | Example: MinHash near-duplicate removal at file level | Dedup report |
| Secret and personal data scrubbing | Example: Pattern and entropy scanners, replaced with placeholders | Scanner report |
| Quality filter | Example: Drop auto-generated and minified files | Filter thresholds and samples |
| Decontamination | Remove training documents that overlap evaluation sets (section 2.3) | Overlap report |
| Tokenization | [Tokenizer name and version] | Token count per source |
2.3 Splits and decontamination
| Split | Purpose | Size | Frozen on | Content hash |
|---|---|---|---|---|
| Train | Gradient updates | Example: 20.0B tokens | YYYY-MM-DD | [sha256] |
| Validation | Loss curves, early warning | Example: 50M tokens, same mixture | YYYY-MM-DD | [sha256] |
| Test (held out) | Gate evaluation only | Example: 2,000 tasks, EVAL-SET-01 | YYYY-MM-DD | [sha256] |
| Canary | Memorisation checks | Example: 500 unique strings inserted on purpose | YYYY-MM-DD | [sha256] |
Check decontamination by n-gram overlap between every evaluation set and the training corpus, and record the overlap rate per set. Split by repository, not by file, so that near-identical files from one project cannot sit on both sides of the split.
3. Baseline
| ID | Baseline | Why it is the right comparison | Score on EVAL-SET-01 |
|---|---|---|---|
| BL-001 (Example) | Production 350M model | The model users have today | pass@1 31.5 |
| BL-002 (Example) | Public open-weight 1B code model | Shows whether training our own model is worth it | pass@1 34.0 |
| BL-003 (Example) | Same architecture, 5B tokens | Shows the value of the extra data | Produced in ablation ABL-003 |
If a public model of similar size already meets the success criteria, stop and record the decision instead of training.
4. Architecture and training configuration
4.1 Architecture
| Setting | Value | Reason |
|---|---|---|
| Model family | Example: Decoder-only transformer | Standard for left-to-right completion |
| Parameters (N) | Example: 1.0B | Fits one inference accelerator at the latency target |
| Layers / hidden size / heads | Example: 20 / 2,048 / 16 | About 12 x 20 x 2,048² ≈ 1.0B non-embedding parameters, the N used in section 5 |
| Context length | Example: 2,048 tokens | Covers 95% of completion contexts in usage logs |
| Positional encoding | Example: Rotary | [Reason] |
| Vocabulary | Example: 49,152 tokens, byte-level BPE | Trained on DS-001 sample |
| Precision | Example: bfloat16 compute, float32 master weights | [Reason] |
4.2 Optimisation
| Setting | Value |
|---|---|
| Optimiser | Example: AdamW, beta1 0.9, beta2 0.95, weight decay 0.1 |
| Peak learning rate and schedule | Example: 3e-4, linear warm-up 2,000 steps, cosine decay to 10% |
| Global batch | Example: 512 sequences x 2,048 tokens = 1,048,576 tokens per step |
| Total steps (S) | Example: 20.0B / 1,048,576 ≈ 19,073 steps |
| Gradient clipping | Example: Global norm 1.0 |
| Parallelism | Example: Data parallel with sharded optimiser state across 16 accelerators |
| Random seeds | Example: Model init 1234, data order 5678, recorded in the run config |
5. Compute budget
5.1 Training FLOPs
For a dense transformer, the training compute is commonly approximated as about 6 floating-point operations per parameter per training token: roughly 2 for the forward pass and 4 for the backward pass. Kaplan et al. (2020) use this approximation and it ignores the attention term that depends on context length, so add a margin for long contexts.
where is the number of non-embedding parameters and is the number of training tokens.
Example: and , so FLOPs.
5.2 Model and data size check
Hoffmann et al. (2022) found that, for a fixed compute budget, the number of parameters and the number of training tokens should grow in roughly equal proportion, and that many large models of the time were trained on too few tokens. A common reading of their results is a ratio of the order of 20 training tokens per parameter for compute-optimal pre-training. Treat this as a sanity check, not a rule: a model meant for cheap inference is often trained on far more tokens than the compute-optimal amount, because inference cost depends on , not on .
Example: tokens per parameter, close to the compute-optimal ratio. The team may choose to extend later if ablation ABL-003 shows that loss is still falling steeply.
5.3 Accelerator hours and cost
where is the accelerator's peak throughput at the training precision and MFU is the model FLOPs utilisation measured in the pilot run.
| Item | Value | Basis |
|---|---|---|
| Peak throughput per accelerator | Example: 400 TFLOP/s (4.0 x 10^14) | Vendor datasheet for the chosen precision |
| Assumed MFU | Example: 40% | Pilot run PIL-001; replace with the measured figure |
| Effective throughput | Example: 1.6 x 10^14 FLOP/s | 4.0 x 10^14 x 0.40 |
| Main run accelerator-seconds | Example: 750,000 s | 1.2 x 10^20 / 1.6 x 10^14 |
| Main run accelerator-hours | Example: 208.3 h | 750,000 / 3,600 |
| Wall-clock time on 16 accelerators | Example: 13.0 h | 208.3 / 16, before restarts |
| Budget line | Accelerator-hours | Cost at USD 2.50 per hour (Example) |
|---|---|---|
| Main run (Example) | 208.33 | USD 520.83 |
| Ablations, 10 runs at 1% of main compute each (Example) | 20.83 | USD 52.08 |
| Evaluation of checkpoints (Example) | 10.00 | USD 25.00 |
| Subtotal | 239.17 | USD 597.92 |
| Contingency 30% for restarts and reruns (Example) | 71.75 | USD 179.38 |
| Total requested | 310.92 | USD 777.29 |
Each ablation uses a 100M-parameter model on 2B tokens, so it costs FLOPs, which is 1% of the main run.
5.4 Memory check
A common rule of thumb for mixed-precision training with Adam is about 16 bytes of accelerator memory per parameter for weights, gradients and optimiser state, before activations. Example: 1.0B parameters x 16 bytes = 16 GB of state, sharded across 16 accelerators, which leaves room for activations at the chosen micro-batch. Confirm the peak memory in the pilot run.
6. Ablations and pilot runs
| ID | Question | Design | Decision rule | Result |
|---|---|---|---|---|
| PIL-001 (Example) | Does the full stack run, and what is the real MFU? | Main config, 200 steps | Proceed if MFU ≥ 30% and no errors | [Result] |
| ABL-001 (Example) | Does adding DS-004 synthetic tests help? | 100M model, 2B tokens, with and without DS-004, 2 seeds each | Keep if pass@1 gain exceeds seed spread | [Result] |
| ABL-002 (Example) | Which peak learning rate is stable? | 100M model, 3 learning rates | Pick the highest rate with no loss spikes | [Result] |
| ABL-003 (Example) | Is loss still falling at 20B tokens? | Fit loss versus tokens on 3 small sizes | Extend D if the fitted slope predicts ≥ 1% further gain | [Result] |
| ABL-004 (Example) | Does the tokenizer handle all 12 languages? | Tokens per character per language | Retrain tokenizer if any language is 30% worse than the median | [Result] |
| [ABL-nnn] | [Question] | [Design] | [Decision rule] | [Result] |
Run ablations with at least two seeds when the expected effect is small,
and report the spread. Record each run in an Experiment Tracking Report
(ai-data/experiment-tracking-report).
7. Checkpoints and monitoring
7.1 Checkpoint policy
| Setting | Value |
|---|---|
| Save interval | Example: Every 1,000 steps (about 41 minutes of wall-clock time) |
| Contents | Model weights, optimiser state, scheduler state, data loader position, random number generator states |
| Size | Example: About 16 GB per full checkpoint |
| Retention | Example: Last 3 rolling, plus every 5,000 steps permanently, plus final |
| Storage and integrity | [Bucket path]; checksum written with each checkpoint |
| Restore test | Restore from a checkpoint in the pilot run and confirm the loss curve continues |
7.2 Signals and alerts
| Signal | Normal range | Alert when | Who is paged |
|---|---|---|---|
| Training loss | Example: Smooth decrease | Spike above 1.5x the 200-step moving average | [@on-call] |
| Validation loss | Example: Tracks training loss | Rises for 3 consecutive evaluations | [@training-lead] |
| Gradient norm | Example: Below clip value most steps | Clipped on more than 50% of steps for 500 steps | [@on-call] |
| Throughput | Example: Within 10% of pilot | Drops more than 20% | [@infra] |
| Hardware health | No errors | Any device error or node loss | [@infra] |
8. Stop and restart criteria
| ID | Condition | Action | Decided by |
|---|---|---|---|
| STOP-001 (Example) | Loss spike that does not recover within 500 steps | Roll back to last good checkpoint, skip the data batch, lower learning rate 10% | Training lead |
| STOP-002 (Example) | Second unrecovered spike | Pause run, open an incident, review config | Training and research leads |
| STOP-003 (Example) | Validation loss at 50% of tokens worse than ABL-003 forecast by more than 5% | Pause and review before spending the second half | Research lead |
| STOP-004 (Example) | Spend reaches 100% of the total requested budget | Stop and request approval to continue | Budget holder |
| STOP-005 (Example) | Canary memorisation detected in an intermediate checkpoint | Stop, investigate data pipeline | Responsible AI reviewer |
| DONE-001 (Example) | All D tokens consumed and final checkpoint saved | Run final evaluation gates (section 9) | Training lead |
9. Evaluation gates
| Gate | When | Checks | Pass rule | Owner |
|---|---|---|---|---|
| G-0 (Example) | Before main run | Pilot and ablations done, budget approved | All decisions recorded | Training lead |
| G-1 (Example) | 25% of tokens | Validation loss vs forecast; quick pass@1 on 200 tasks | Within 5% of forecast | Research lead |
| G-2 (Example) | 50% of tokens | Full EVAL-SET-01, canary suite | No canary leak; pass@1 trending to SC-001 | Research lead |
| G-3 (Example) | Final | SC-001 to SC-004, safety and licence checks, serving benchmark | Every criterion met | Approvers in Document control |
Use the method in the LLM Evaluation Plan (ai-data/llm-evaluation-plan)
or the Benchmark Report (ai-data/benchmark-report) for confidence
intervals and significance. Release documentation goes into a Model
Card (ai-data/model-card).
10. Risks and mitigations
| ID | Risk | Likelihood | Impact | Mitigation | Trigger |
|---|---|---|---|---|---|
| RSK-001 (Example) | Training instability at the chosen learning rate | Medium | High | ABL-002; rollback rule STOP-001 | Loss spike alert |
| RSK-002 (Example) | Evaluation contamination inflates scores | Medium | High | Decontamination in section 2.3; fresh tasks added after the data cut-off | Overlap rate above 0.5% |
| RSK-003 (Example) | Licence-incompatible code in training data | Low | High | Licence filter; legal review of allow list | Audit sample finds a violation |
| RSK-004 (Example) | Lower MFU than planned extends the run | Medium | Medium | Measure in PIL-001; contingency line | Throughput alert |
| RSK-005 (Example) | Hardware failure loses progress | Medium | Low | Checkpoint every 1,000 steps; restore tested | Node loss |
| RSK-006 (Example) | Model reproduces secrets or personal data | Low | High | Scrubbing, canaries, G-2 check | Canary recovered |
| [RSK-nnn] | [Risk] | [L] | [I] | [Mitigation] | [Trigger] |
11. Schedule and ownership
| Phase | Start | End | Owner | Exit condition |
|---|---|---|---|---|
| Data preparation and freeze | YYYY-MM-DD | YYYY-MM-DD | [@data-lead] | Split hashes recorded |
| Pilot and ablations | YYYY-MM-DD | YYYY-MM-DD | [@training-lead] | G-0 passed |
| Main run | YYYY-MM-DD | YYYY-MM-DD | [@training-lead] | DONE-001 |
| Final evaluation | YYYY-MM-DD | YYYY-MM-DD | [@eval-owner] | G-3 decision recorded |
| Documentation and handover | YYYY-MM-DD | YYYY-MM-DD | [@training-lead] | Model card and run report published |
After the run, record the actual compute, MFU, number of restarts and final scores next to the planned values. The difference between plan and actual is the most useful input to the next plan.
| Item | Planned | Actual | Variance |
|---|---|---|---|
| Accelerator-hours | Example: 310.92 | [Actual] | [%] |
| MFU | Example: 40% | [Actual] | [points] |
| Restarts | Example: 0 to 2 | [Actual] | [Count] |
| pass@1 on EVAL-SET-01 | Example: ≥ 35.5 | [Actual] | [points] |
12. Glossary and references
| Term | Meaning |
|---|---|
| FLOPs | Floating-point operations; total work, not a rate |
| MFU | Model FLOPs utilisation: useful model FLOPs per second divided by the hardware peak |
| Ablation | A smaller controlled run that changes one factor to measure its effect |
| Decontamination | Removing training data that overlaps evaluation data |
| Canary | A unique string inserted on purpose to detect memorisation |
| Compute-optimal | The split between model size and tokens that gives the lowest loss for a fixed compute budget |
| pass@1 | Share of tasks solved by the first generated sample |
References:
- Kaplan, J. et al. (2020). Scaling Laws for Neural Language Models. arXiv:2001.08361. Source of the approximation of about 6N training FLOPs per token (section 2.1 of the paper).
- Hoffmann, J. et al. (2022). Training Compute-Optimal Large Language Models. arXiv:2203.15556. Source of the finding that parameters and tokens should scale in roughly equal proportion.
- Pineau, J. et al. (2021). Improving Reproducibility in Machine Learning Research. arXiv:2003.12206 (JMLR).
- Related templates: ML System Design (
ai-data/ml-system-design), Fine-Tuning Report (ai-data/fine-tuning-report), Datasheet for Datasets (ai-data/datasheet-for-datasets), Experiment Tracking Report (ai-data/experiment-tracking-report), Model Card (ai-data/model-card), Reproducibility Checklist (science/reproducibility-checklist).
Standard and licence note
Based on common machine learning engineering practice and on the published research cited above (Kaplan et al. 2020; Hoffmann et al. 2022), used here as planning concepts only. No formal standard governs training plans. The text, tables and worked example are original; example figures are illustrative and must be replaced with measured values. Check the current versions of the cited papers and your hardware vendor's datasheet before relying on any number. Template licence: MIT.
Templat terkait
Model Monitoring Plan Template (MLOps)
Production ML monitoring: performance, drift (PSI), data quality, fairness, latency, alerts, retraining triggers
AI & DataAI Agent Evaluation Plan Template (Task Success, Trajectory, Tool Calls)
Agent task suite, success, trajectory, tool-call and argument metrics, sandboxed harness, online tests, calibrated graders, statistics, ASI safety cases, gates
AI & DataAgentic AI Threat Model Template (OWASP ASI Top 10, MITRE ATLAS)
Agent trust boundaries, assets, autonomy, ASI01-ASI10 threat register, MITRE ATLAS mapping, L x I scoring, mitigations, residual risk, test cases