checkpoints

Save and manage ML training checkpoints via REST API and CLI.

4.0k|507|Updated Jul 14, 2025
One-click install
npx skills add https://github.com/thinking-machines-lab/tinker-cookbook --skill checkpoints
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: checkpoints
Source: https://github.com/thinking-machines-lab/tinker-cookbook/tree/main/.claude/skills/checkpoints
Command: npx skills add https://github.com/thinking-machines-lab/tinker-cookbook --skill checkpoints

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Checkpointing solves the challenge of restarting interrupted training runs and exporting sampler weights for evaluation by providing structured saving, loading, and lifecycle management through a CheckpointRecord.

Core Features & Use Cases

  • Save full training state with save_state to resume training, including weights and optimizer state.
  • Save only sampler weights with save_weights_for_sampler for sampling/export, or use save_weights_and_get_sampling_client to obtain a ready-to-use client.
  • Manage checkpoints via REST API and CLI (list, publish, set TTL, delete) to maintain lifecycle and provenance.
  • Serialize and deserialize checkpoint records with CheckpointRecord for robust tracking and reproducibility.

Quick Start

Save the full training state with save_state for resumption, or export only the sampler weights with save_weights_for_sampler for fast evaluation.

Frequently Asked Questions about checkpoints

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save training state to resume an interrupted ML training run?

To save training state for resumption, use the save_state function, which persists both model weights and optimizer state. This allows you to reliably restart interrupted training workflows from the exact checkpoint without losing progress.

What is the best way to export sampler weights for evaluation?

The best way to export sampler weights for evaluation is using save_weights_for_sampler. Alternatively, you can use save_weights_and_get_sampling_client to export weights and immediately obtain a ready-to-use sampling client for deployment.

Can I manage checkpoint lifecycle and provenance through a REST API?

Yes, you can manage checkpoint lifecycle and provenance through a built-in REST API and CLI. These interfaces allow you to list available checkpoints, publish them, set TTL for automatic cleanup, and delete records as needed.

How does CheckpointRecord serialization work for training reproducibility?

CheckpointRecord provides serialization and deserialization for robust tracking and reproducibility of training checkpoints. It structures the saved state and sampler data, ensuring consistent records can be reliably restored or audited.

When should I save only sampler weights instead of the full training state?

You should save only sampler weights with save_weights_for_sampler when you need fast evaluation or deployment sampling. Save full state with save_state only when you need to resume training and require optimizer state persistence.

Does checkpointing handle both model weights and optimizer state?

Yes, checkpointing handles both model weights and optimizer state. The save_state function captures the complete training state, ensuring that resumption preserves all optimizer momentum and parameters alongside the model weights.