Skip to content

Tutorials

A progressive learning path from first API call to advanced training techniques. All tutorials are marimo notebooks — reactive Python notebooks stored as .py files. Read them here or run them interactively.

Prerequisites

  • Python 3.11+
  • tinker >= 0.22.3 — the tutorials use the 0.22.3 API surface (TensorData wrappers, awaited save/REST calls, Config.recipe_name), and checkpoint download in Weights Management was broken on earlier versions.
  • A Tinker API key — get one from the Tinker Console.

Setup

Install the SDK together with the cookbook's [tutorials] extra, then set your API key:

uv pip install tinker "tinker-cookbook[tutorials]"
export TINKER_API_KEY="your-api-key-here"

The [tutorials] extra pulls in marimo (to open the notebooks), matplotlib (for the loss-curve plots in a few tutorials), and the [math-rl] dependencies (sympy, pylatexenc, math-verify) that some RL tutorials import.

Run tutorials interactively

Clone the cookbook and open any notebook in marimo's interactive editor:

git clone https://github.com/thinking-machines-lab/tinker-cookbook.git
cd tinker-cookbook
marimo edit tutorials/101_hello_tinker.py

You can also try the notebooks online in molab without installing anything — the cookbook tutorials README links each notebook to its molab launcher.

Running from a cloned cookbook as a uv project

If you use uv run inside the cloned repo instead of a global install, pass --extra tutorials on every invocation:

uv run --extra tutorials marimo edit tutorials/101_hello_tinker.py

A bare uv run re-syncs the project environment and uninstalls marimo, so the editor won't launch.

Pair tutorials with a matching cookbook

Run the tutorials against a recent cookbook that matches them — an editable clone of main or a nightly build. Stable PyPI tinker-cookbook paired with newer tutorial files can drift.

100: Basics

Start here. Learn the core Tinker SDK operations.

200: Core Concepts

Deep dives into specific SDK features. Each tutorial is standalone.

300: Cookbook Abstractions

Learn the higher-level training patterns from tinker-cookbook.

400: Advanced

Advanced techniques for experienced users.

500: Deployment

Getting trained models into production.