skillfed

tinker_cookbook

Implementations of post-training algorithms using the Tinker API

tinker-cookbook v0.5.4 599.6K downloads/30d#5,827 on PyPI4,019
Permissive license Apache-2.0 Active released

What it is and what it does

Tinker Cookbook is a library of recipes and utilities built on top of the Tinker API—a managed fine-tuning service for language models. It abstracts away distributed training complexity by letting you send API requests to Thinking Machines Lab's infrastructure rather than managing training yourself. The package includes realistic, runnable examples for common post-training workflows: supervised fine-tuning on conversational data, reinforcement learning for math and code, preference learning (DPO and RLHF), knowledge distillation, tool-use training, multi-agent RL, audio and vision-language model training, and more.

You install it alongside its 19 runtime dependencies (torch, transformers, datasets, huggingface-hub, and others) and then import recipes or utilities to configure and launch training jobs. The package also ships an experimental benchmark framework to evaluate trained models against 12 standard benchmarks, plus utilities for hyperparameter scaling, token-to-chat-message rendering, and weight management. All of this assumes you have a Tinker API account and an API key.

Use it for:

  • Fine-tune an open-source LLM like Llama on your own conversational dataset using supervised learning without managing distributed training infrastructure.
  • Train a model to solve math problems with verifiable rewards using the math RL recipe with automated grading.
  • Build a code-generation model using competitive programming examples and sandboxed execution (DeepCoder-style) via the code RL recipe.
  • Implement a three-stage RLHF pipeline (SFT, reward model, RL) for preference-aligned models using the preference learning recipe.
  • Evaluate a fine-tuned model against standardized benchmarks (GSM8K, MMLU-Pro, IFEval, etc.) using the built-in evaluation framework.
  • Train a vision-language model for image classification or an audio model for speech recognition using the multimodal recipes.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Tinker Cookbook provides recipes and abstractions for fine-tuning language models via the Tinker API, supporting supervised learning, reinforcement learning, and specialized tasks like math reasoning, code generation, and multimodal training.

Yes, if you have a Tinker API account and want to fine-tune LLMs without managing distributed training infrastructure. The package is actively maintained, well-documented, and provides production-ready recipes for common post-training tasks. Install friction is low and the Apache-2.0 license is permissive. No security vulnerabilities are known. The main blocker is the hard dependency on a Tinker API account and the substantial runtime footprint (torch, transformers, datasets, etc.)—not a concern if you're already working in the LLM space.

Install

tinker-cookbook on PyPI

pip

pip install tinker-cookbook

uv

uv add tinker-cookbook

poetry

poetry add tinker-cookbook

Installing tinker_cookbook

Before you install

Low friction installation as a pure-Python wheel. Active maintenance with a recent release (3 days old) and strong repository signals (4019 stars, last commit 2026-08-14). Requires Python >=3.11 and pulls in 19 runtime dependencies including torch, transformers, and datasets—a substantial but expected footprint for LLM tooling.

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions. No notable licensing friction for most use cases.

Quickstart

# Install
pip install tinker-cookbook

# Set up API key
export TINKER_API_KEY="your_key_here"

# Basic supervised learning example
import tinker
from tinker_cookbook.recipes.sl_basic import create_sl_trainer

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(...)

Requires a Tinker API account and TINKER_API_KEY environment variable; torch>=2.10 is required for Inkling model support.

Verify before relying

  • Whether the 12 benchmarks (GSM8K, MATH-500, MMLU-Pro, etc.) are production-ready or experimental beyond the noted 'experimental' label on the eval framework.
  • Specific performance or cost implications of using Inkling vs. Inkling-Small models through the Tinker API.
  • Whether all 20+ marimo tutorials are currently functional and up-to-date with the latest API.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 19 — aiohttp, anyio, blobfile, chz, cloudpickle, datasets, huggingface-hub, numpy, pillow, pydantic, rich, safetensors, termcolor, tiktoken, tinker, tml-renderers, torch, tqdm, transformers
Maintenance actively maintained — 3 days since the last release
Last repo commit
First released
Downloads 599,605/month — #5,827 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tinker_cookbook-0.5.4-py3-none-any.whl

Tags

language model fine-tuning recipesLLM post-training frameworksupervised and reinforcement learning for LLMsTinker API training examplesmodel customization abstractionsLoRA training utilitiesLLM evaluation benchmarks
llm-trainingfine-tuningpost-training

More Artificial Intelligence packages

Further reading