Tinker Cookbook Thinking Machines Lab released two open-source libraries, `tinker` and `tinker-cookbook`, to help developers and researchers fine-tune large language models. The `tinker` SDK handles distributed training complexities via API requests, while `tinker-cookbook` provides realistic fine-tuning examples, tutorials, and abstractions for supervised learning, reinforcement learning, and advanced techniques like DPO and RLHF. We provide two libraries for the broader community to customize their language models: tinker and tinker-cookbook . tinker is a training SDK for researchers and developers to fine-tune language models. You send API requests to us and we handle the complexities of distributed training. tinker-cookbook includes realistic examples of fine-tuning language models. It builds on the Tinker API and provides common abstractions to fine-tune language models. - Sign up for Tinker here https://auth.thinkingmachines.ai/sign-up . - Once you have access, create an API key from the console https://tinker-console.thinkingmachines.ai and export it as environment variable TINKER API KEY . - Install tinker-cookbook includes the tinker SDK as a dependency : Latest stable release from PyPI uv pip install tinker-cookbook Or install the nightly build uv pip install 'tinker-cookbook @ git+https://github.com/thinking-machines-lab/tinker-cookbook.git@nightly' Here we introduce a few Tinker primitives — the basic components to fine-tune LLMs see the quickstart guide https://tinker-docs.thinkingmachines.ai/tinker/quickstart/ for more details : python import tinker service client = tinker.ServiceClient training client = service client.create lora training client base model="meta-llama/Llama-3.2-1B", rank=32, training client.forward backward ... training client.optim step ... training client.save state ... training client.load state ... sampling client = training client.save weights and get sampling client sampling client.sample ... See tinker cookbook/recipes/sl loop.py /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/sl loop.py and tinker cookbook/recipes/rl loop.py /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/rl loop.py for minimal examples of using these primitives to fine-tune LLMs. New to Tinker? The tutorials/ /thinking-machines-lab/tinker-cookbook/blob/main/tutorials directory contains 20+ progressive marimo https://marimo.io/ notebooks that walk through core concepts — rendering, loss functions, completers, weight management — and advanced topics such as custom RL environments, DPO, RLHF, and weight export. Run any tutorial with marimo edit tutorials/101 hello tinker.py . See the tutorials README /thinking-machines-lab/tinker-cookbook/blob/main/tutorials/README.md for the full list, or browse rendered versions on the Tinker docs site https://tinker-docs.thinkingmachines.ai/tutorials . To download the weights of any model: rest client = service client.create rest client future = rest client.get checkpoint archive url from tinker path sampling client.model path with open f"model-checkpoint.tar.gz", "wb" as f: f.write future.result Besides these primitives, we also offer Tinker Cookbook a.k.a. this repo , a library of a wide range of abstractions to help you customize training environments. tinker cookbook/recipes/sl basic.py /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/sl basic.py and contain minimal examples to configure supervised learning and reinforcement learning. /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/rl basic.py tinker cookbook/recipes/rl basic.py We also include more complete examples in the tinker cookbook/recipes/ /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes folder: : supervised fine-tuning on conversational datasets e.g., Tulu3 . Chat SFT /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/chat sl : reinforcement learning for mathematical reasoning with verifiable rewards. Math RL /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/math rl : RL on competitive programming with sandboxed code execution DeepCoder replication . Code RL /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/code rl : DPO and a three-stage RLHF pipeline SFT, reward model, RL . Preference learning /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/preference : on-policy and off-policy knowledge distillation with single- and multi-teacher configurations. Distillation /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/distillation : RL for retrieval-augmented generation Search-R1 replication . Tool use /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/search tool : multi-agent RL with self-play and cross-play. Multi-agent /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/multiplayer rl The recipes README /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/recipes/README.md covers all available recipes, including Harbor RL, rubric-based grading, VLM classification, and SDFT. Each recipe includes a README.md with implementation details, launch commands, and expected results. Tinker Cookbook includes a benchmark framework /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/eval for evaluating trained models: python from tinker cookbook.eval.benchmarks import run benchmarks, BenchmarkConfig results = await run benchmarks "gsm8k", "mmlu pro", "ifeval" , sampling client, renderer, BenchmarkConfig save dir="evals/step500" , The framework currently supports 12 benchmarks GSM8K, MATH-500, MMLU-Pro, MMLU-Redux, GPQA, IFEval, MBPP, C-Eval, SuperGPQA, IFBench, AIME 2025, AIME 2026 with verified scores against published results, plus experimental benchmarks such as LiveCodeBench, Terminal Bench, and SWE-bench. Benchmarks can also serve as inline training evaluators via BenchmarkEvaluator . Note: Benchmark scores are sensitive to evaluation configuration — system prompts, max tokens , temperature, and timeout settings can shift results significantly. We document our exact settings alongside all reported scores. This framework is under active development; feedback and contributions are welcome. See the eval README /thinking-machines-lab/tinker-cookbook/blob/main/tinker cookbook/eval/README.md for verified scores, configuration details, and instructions for adding new benchmarks. For the full Tinker documentation, visit tinker-docs.thinkingmachines.ai https://tinker-docs.thinkingmachines.ai . Tinker Cookbook also provides reusable building blocks: — bidirectional conversion between token sequences and structured chat messages renderers — learning rate and hyperparameter scaling for LoRA training hyperparam utils — benchmark framework and inline training evaluators see eval Evaluation evaluation-experimental above Tinker Cookbook ships with Claude Code skills https://docs.anthropic.com/en/docs/claude-code/skills that teach Claude how to use the Tinker API. Install them so Claude can help you write training code in any project: /plugin marketplace add thinking-machines-lab/tinker-cookbook Then install the tinker plugin from the Discover tab /plugin → Discover . Once installed, two skills are available: | Command | What it does | |---|---| /tinker:research | Plan and run post-training experiments — SFT, RL, DPO, distillation, evaluation, hyperparameters, model selection, and more | /tinker:debug | Diagnose slow training, hangs, output mismatches, renderer issues, and errors | Skills also trigger automatically based on context — ask Claude to "set up SFT training" and it will load the right skill without a slash command. Skills update automatically when the repo is updated. uv sync --extra dev pre-commit install This installs dev dependencies and registers pre-commit hooks that run ruff formatting and linting on every commit. CI enforces these checks on all pull requests. This project is built in the spirit of open science and collaborative development. We believe that the best tools emerge through community involvement and shared learning. We welcome PR contributions after our private beta is over. If you have any feedback, please email us at tinker@thinkingmachines.ai mailto:tinker@thinkingmachines.ai . If you use Tinker for your research, please cite it as: Thinking Machines Lab, 2026. Tinker. https://thinkingmachines.ai/tinker/. Or use this BibTeX citation: @misc{tml2026tinker, author = {Thinking Machines Lab}, title = {Tinker}, year = {2026}, url = {https://thinkingmachines.ai/tinker/}, }