AIAny
AI Train2025
Icon for item

Tinker Cookbook

Worked examples and reusable abstractions for fine-tuning open LLMs via the Tinker training API: you write the training loop while distributed execution runs remotely. Covers SFT, math/code RL, DPO, three-stage RLHF, distillation, and tool use.

Introduction

Most fine-tuning libraries force a choice: either drop down to distributed-training plumbing (FSDP, sharding, checkpoint juggling) or accept a rigid trainer that only does what its authors anticipated. This cookbook sits on a different layer. The Tinker API exposes just four primitives — forward_backward, optim_step, save_state, sample — and Thinking Machines Lab runs the cluster behind them. The recipes here show what you can build once that loop is yours but the infrastructure isn't your problem.

What Sets It Apart
  • The abstraction boundary is unusually low: you own the optimization loop and reward logic, not the GPU topology. That means a custom RL algorithm is a few hundred readable lines, not a fork of a framework.
  • Coverage spans the full post-training stack — chat SFT (Tulu3), math RL with verifiable rewards, sandboxed code RL, DPO, a three-stage RLHF pipeline (SFT, reward model, RL), on/off-policy distillation, retrieval tool use (a Search-R1 replication), and multi-agent self-play.
  • A bundled benchmark harness scores trained models on ~12 evals (GSM8K, MMLU-Pro, IFEval, MBPP, C-Eval) with published reference numbers, so a recipe is verifiable rather than aspirational.
Who It's For

Great fit if you want to prototype or modify a post-training algorithm and care about the math more than the cluster — examples default to Llama-3.2-1B with LoRA, so iteration is cheap. Look elsewhere if you need full control over the training stack, on-prem weights, or a provider-agnostic setup: everything routes through the hosted Tinker service, which is the deliberate trade for not managing distributed training yourself.

Information

  • Websitegithub.com
  • AuthorsThinking Machines Lab
  • Published date2025/10/01

Categories

More Items

GitHub
AI Train2019

Train and experiment with multi-billion to trillion-parameter transformer models on large GPU clusters using GPU-optimized building blocks and reference training scripts; offers advanced parallelism and mixed-precision support for research teams and ML engineers.

GitHub
AI Train2026

Provides a one-command CLI to fine-tune and post-train LLMs, with layer streaming that lets an 8B model be fine-tuned on a 4 GB laptop GPU. Auto-configures quantization, LoRA adapters, batching and evaluation gates, and supports export and serving workflows.

GitHub
AI Train2025

A PyTorch DTensor-native SPMD library for training and fine-tuning LLMs, VLMs, diffusion and retrieval models. Integrates with Hugging Face for day-0 model support, provides YAML-driven recipes, DTensor/FSDP2 parallelism and NVIDIA-optimized kernels (Transformer Engine, DeepEP, FlexAttn).