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.
Once you have access, create an API key from the console 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'
Using Inkling models
Inkling is Thinking Machines Lab's model family tailored for Tinker:
general-purpose models that can code, reason, and call tools. Inkling is also
natively multimodal. Every Inkling model shares the same rendering path and
reasoning-effort interface. Tinker Cookbook supports sampling and post-training
every Inkling model through the standalone library, included in
the default installation together with the required .
tml-renderers
torch>=2.10
Pass one of thinkingmachines/Inkling-2-Small,
thinkingmachines/Inkling-2-Mini, thinkingmachines/Inkling, or
thinkingmachines/Inkling-Small as model_name= anywhere the cookbook accepts
a model name. The appropriate renderer and tokenizer are selected automatically
for each of these models, including the :peft: long-context variants. The
tokenizer depends on the model, so always get it from the model name.
New to Tinker? The tutorials/ directory contains 20+ progressive marimo 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 for the full list, or browse rendered versions on the Tinker docs site.
To export and download trained weights:
from tinker_cookbook import weights
export = training_client.save_weights_external(name="export").result()
weights.download(tinker_path=export.path, output_dir="model-checkpoint")
Tinker Cookbook
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 and tinker_cookbook/recipes/rl_basic.py contain minimal examples to configure supervised learning and reinforcement learning.
The recipes README 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.
Evaluation (experimental)
Tinker Cookbook includes a benchmark framework for evaluating trained models:
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 for verified scores, configuration details, and instructions for adding new benchmarks.
eval — benchmark framework and inline training evaluators (see Evaluation above)
Claude Code Skills
Tinker Cookbook ships with 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:
Then install the tinker plugin from the Discover tab (/plugin → Discover). Once installed, four 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
/tinker:rollout-ui
Build rollout viewers with messages, tool calls, provenance, aligned comparisons, and accessible diffs; link to W&B for metrics
/tinker:inkling
Work with all Inkling models — thinking effort, rendering, post-training, evaluation, and multimodal input
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.
Development Setup
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.
Contributing
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.
Citation
If you use Tinker for your research, please cite it as:
Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
122.3M downloads/mo
huggingface-hubPythie’s Index: 91Client library to download and publish models, datasets and other repos on the huggingface.co hub303.7M downloads/mo
wandbPythie’s Index: 86A CLI and library for interacting with the Weights & Biases API.20.2M downloads/mo
tinkerPythie’s Index: 87The official Python SDK for the tinker API2.2M downloads/mo