--- id: tinker-cookbook version: "0.5.4" license: Apache-2.0 license_treatment: permissive maintenance: active --- # tinker_cookbook — Implementations of post-training algorithms using the Tinker API License: permissive · Maintenance: active · Downloads: 599.6K/mo ## 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 above — 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 pip install tinker-cookbook uv add tinker-cookbook 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_current - Install friction: low - Maintenance: active - Downloads: 599.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags language model fine-tuning recipes, LLM post-training framework, supervised and reinforcement learning for LLMs, Tinker API training examples, model customization abstractions, LoRA training utilities, LLM evaluation benchmarks, llm-training, fine-tuning, post-training [View on SkillFed](https://skillfed.io/packages/tinker-cookbook) · [View on PyPI](https://pypi.org/project/tinker-cookbook/)