AI Glossary / MLOps and deployment / Beginner

Checkpoint

Definition

A checkpoint is a saved representation of a computation's state at a particular point. In machine learning, it commonly contains model parameters and may also include optimizer state, training progress, and other information needed to continue a run. The contents depend on the intended use. A file sufficient to load predictions may be insufficient to resume training in the same way.

What it means

Training changes more than the model's visible weights. An optimizer may maintain momentum or adaptive statistics, a learning-rate schedule may depend on progress, and a data loader may be partway through an ordering of examples.
A checkpoint captures selected state so a process can restart, an experiment can be examined, or a candidate model can be preserved. It is a snapshot, not the whole history of how the model was created.
The word does not certify completeness or correctness. A checkpoint needs compatible code and configuration, a clear identity, and a successful restore test before it can be relied upon for its intended purpose.

How it works

Choose the state required for the recovery or reuse goal and capture it at a consistent boundary. Save the model parameters and relevant auxiliary state, along with metadata identifying the run, step, architecture, and compatible settings.
When restoring, reconstruct the required computation and load the saved components. Confirm that shapes, versions, and progress information match the intended run, then check a suitable prediction or training continuation.
Exact reproduction may additionally depend on random-number state, data order, numerical settings, software, and hardware behavior. Restoring a useful training state is therefore a different claim from guaranteeing bit-for-bit identical future results across all environments.

Three practical examples

  • A long training job can restart from a recent saved state after interruption instead of beginning from its initial parameters.
  • An experiment can retain a checkpoint selected by validation performance for later evaluation under the same model configuration.
  • A development team can inspect an earlier model state to compare predictions or investigate when a training problem emerged.

Think of it this way

Think of saving a board game's position along with whose turn it is and any special counters. A photograph of the pieces may be enough to recognize the position, but it can omit information needed to continue correctly. Similarly, model weights may describe current predictions while leaving out state that controls the next training update.

Worked example

Consider a simplified momentum update with parameter theta, stored momentum v, current gradient g, momentum coefficient 0.9, and learning rate 0.1. Define v-new = 0.9v+g and theta-new = theta−0.1v-new.
At the checkpoint, let theta=10 and v=2. Suppose the next gradient is 1. Restoring both values gives v-new=0.9×2+1=2.8 and theta-new=10−0.28=9.72.
If only theta is restored and momentum is reset to zero, the same gradient gives v-new=1 and theta-new=9.9. The model parameter initially matched, but the next update differed because optimizer state was missing.
Now suppose a separate job saved a complete checkpoint after step 900 and failed after completing step 938. Restarting from that snapshot requires repeating 38 steps. If each takes exactly two seconds in this invented example, that is 76 seconds of repeated computation, excluding loading and other overhead.
These calculations illustrate checkpoint contents and recency. They are not a benchmark or a claim that a particular framework uses this exact momentum convention.

Illustrative case study

In a fictional image-classification project, a team keeps a file labeled latest and assumes it is also the best model. A later review shows that validation quality peaked at an earlier training step while the latest checkpoint served a different purpose: minimizing recovery loss after interruption.
The team labels recovery snapshots and validation-selected candidates explicitly and records how each was chosen. It tests restoration using the intended configuration before relying on either file.
The lesson is that checkpoint recency and model-selection quality are separate properties. A newer snapshot is not automatically the preferred model for deployment.

Common misconceptions and mistakes

Do not assume a checkpoint includes the training dataset, preprocessing code, tokenizer, or complete environment. Those may need separate versioned references or accompanying artifacts.
Do not treat a successful save call as proof of a recoverable snapshot. A file can be incomplete, incompatible, or missing a needed component. Checksums can detect some file corruption but do not establish semantic compatibility.
Do not confuse a checkpoint with a model registry or a deployment. The snapshot is an artifact; cataloging, evaluation, approval, and serving are separate workflows.
Finally, saved state from an untrusted source requires appropriate handling because some serialization formats can load executable objects.

Business use

A useful checkpoint reduces the cost of interruption and makes model states easier to compare. Define whether its purpose is recovery, inference, evaluation, or archival retention, then test that specific use.
Track ownership, creation step, compatible configuration, storage location, and retention policy. For recovery planning, measure how much work can be lost and how long restoration takes. For model selection, record the evidence that distinguishes a candidate checkpoint from an arbitrary point in training.

People also ask

Is a checkpoint just the model's weights?

Sometimes, but a resumable training checkpoint often needs additional state.

Can it be loaded on different hardware?

Often with compatible software and appropriate device handling, but identical continuation is a stronger claim that needs separate verification.

Does the best validation checkpoint have to be the final one?

No. Model-selection rules can select an earlier saved state.

Check your understanding

Two saved files contain identical model parameters, but only one includes the optimizer's momentum. Must their next training update be identical after restoration?

Answer: No. The momentum state can change the update even when the current model parameters and next gradient match.

Related terms

  • Checkpointing
  • Model parameter
  • Model Registry
  • Validation
  • model parameters
  • optimizer state
  • training resume
  • model artifact
  • reproducibility
  • serialization

Learn next

List every state component your intended continuation depends on. In a small controlled experiment, compare a restore that includes optimizer state with one that restores weights alone. Then define separate retention rules for recovery snapshots and evaluation-selected model candidates.

More in MLOps and deployment

  • Burrows - Wheeler transform - The Burrows - Wheeler transform (BWT) is a reversible rearrangement of a block of symbols that can make the block easier to compress.
  • Canonical Huffman code - A canonical Huffman code is a Huffman-style prefix code whose bit patterns are assigned by a fixed ordering rule once each symbol's code length is known.
  • CDR coding - CDR coding is a technique for reducing the memory occupied by Lisp list cells.
  • Chroma subsampling - Chroma subsampling reduces the spatial resolution of an image's color-difference components while retaining a more detailed luma component.
  • Cloud computing - Cloud computing provides computing resources as network-accessible services that users can obtain and release on demand.
  • Cloud resource elasticity - Cloud resource elasticity is the ability to expand and release computing resources as demand changes.

Sources

Google Machine Learning Glossary, checkpoint. https://developers.google.com/machine-learning/glossary#checkpoint Aalto Dictionary of Machine Learning, checkpoint entry. https://aaltodictionaryofml.github.io/ADictML_Main.pdf PyTorch, Saving and Loading Models, general-checkpoint section: model and optimizer state for resuming training. https://docs.pytorch.org/tutorials/beginner/saving_loading_models.html

Previous: Chebyshev pseudospectral method Next: Checkpointing

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer