Skip to content
Skill Authoring
Skill

/tinker

Fine-tune LLMs using the Tinker API. Covers supervised fine-tuning, reinforcement learning, LoRA training, multimodal models including Thinking Machines' Inkling (vision, audio, thinking effort), and both high-level Cookbook patterns and low-level API usage.

BOOST
From plugin
sundial-org-skills
15313 skills
Install
$ npx -y skills add sundial-org/skills --skill tinker --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/tinker

Context preview

The summary Claude sees to decide when to auto-load this skill.

Fine-tune LLMs using the Tinker API. Covers supervised fine-tuning, reinforcement learning, LoRA training, multimodal models including Thinking Machines' Inkling (vision, audio, thinking effort), and both high-level Cookbook patterns and low-level API usage.

SKILL.md

tinker.SKILL.md
name: tinker
description: Fine-tune LLMs using the Tinker API. Covers supervised fine-tuning, reinforcement learning, LoRA training, multimodal models including Thinking Machines' Inkling (vision, audio, thinking effort), and both high-level Cookbook patterns and low-level API usage.

Tinker API - LLM Fine-Tuning

Overview

Tinker is a training API for large language models from Thinking Machines Lab. It provides:

  • **Supervised Fine-Tuning (SFT)**: Train models on instruction/completion pairs
  • **Reinforcement Learning (RL)**: PPO and policy gradient losses; cookbook patterns include GRPO-like group rollouts/advantage centering
  • **Multimodal Models**: vision via Qwen3.5/3.6 and Kimi K2.x; vision + audio via Inkling
  • **Inkling**: Thinking Machines' own open-weights MoE model (975B/41B active, released July 2026) with text/image/audio inputs and tunable thinking effort
  • **LoRA Training**: Efficient parameter-efficient fine-tuning

Two abstraction levels:

  • **Tinker Cookbook**: High-level patterns with automatic training loops
  • **Low-Level API**: Manual control for custom training logic

Quick Reference

| Topic | Reference | |-------|-----------| | Setup & Core Concepts | [Getting Started](references/getting-started.md) | | API Classes & Types | [API Reference](references/api-reference.md) | | Supervised Learning | [Supervised Learning](references/supervised-learning.md) | | RL Training | [Reinforcement Learning](references/reinforcement-learning.md) | | Loss Functions | [Loss Functions](references/loss-functions.md) | | Chat Templates | [Rendering](references/rendering.md) | | Models & LoRA | [Models & LoRA](references/models-and-lora.md) | | Inkling (multimodal, thinking effort) | [Inkling](references/inkling.md) | | Example Scripts | [Recipes](references/recipes.md) |

Installation

pip install tinker tinker-cookbook
export TINKER_API_KEY=your_api_key_here

Minimal Example

import numpy as np
import tinker
from tinker import types

# Create clients
service_client = tinker.ServiceClient()
training_client = service_client.create_lora_training_client(
    base_model="Qwen/Qwen3.6-35B-A3B", rank=32
)
tokenizer = training_client.get_tokenizer()

# Prepare data
prompt = "English: hello\nPig Latin:"
completion = " ello-hay\n"
prompt_tokens = tokenizer.encode(prompt, add_special_tokens=True)
completion_tokens = tokenizer.encode(completion, add_special_tokens=False)
tokens = prompt_tokens + completion_tokens
weights = np.array(([0] * len(prompt_tokens)) + ([1] * len(completion_tokens)), dtype=np.float32)
target_tokens = np.array(tokens[1:], dtype=np.int64)

datum = types.Datum(
    model_input=types.ModelInput.from_ints(tokens=tokens[:-1]),
    loss_fn_inputs={
        "target_tokens": target_tokens,
        "weights": weights[1:]
    }
)

# Train
fwdbwd = training_client.forward_backward([datum], "cross_entropy")
optim = training_client.optim_step(types.AdamParams(learning_rate=1e-4))
fwdbwd.result(); optim.result()

# Sample
sampling_client = training_client.save_weights_and_get_sampling_client(name="v1")
result = sampling_client.sample(
    prompt=types.ModelInput.from_ints(tokens=tokenizer.encode("English: world\nPig Latin:", add_special_tokens=True)),
    sampling_params=types.SamplingParams(max_tokens=20),
    num_samples=1
).result()
print(tokenizer.decode(result.sequences[0].tokens))

Common Imports

# Low-level API
import tinker
from tinker import types
from tinker.types import Datum, ModelInput, TensorData, AdamParams, SamplingParams

# Cookbook (high-level)
import chz
import asyncio
from tinker_cookbook.supervised import train
from tinker_cookbook.supervised.types import ChatDatasetBuilder, ChatDatasetBuilderCommonConfig
from tinker_cookbook.supervised.data import (
    SupervisedDatasetFromHFDataset,
    StreamingSupervisedDatasetFromHFDataset,
    FromConversationFileBuilder,
    conversation_to_datum,
)
from tinker_cookbook.renderers import get_renderer, TrainOnWhat
from tinker_cookbook.model_info import get_recommended_renderer_name
from tinker_cookbook.tokenizer_utils import get_tokenizer

When to Use What

| Scenario | Approach | |----------|----------| | Standard SFT with HF/JSONL data | Cookbook `ChatDatasetBuilder` + `tinker_cookbook.supervised.train.main()` | | Custom preprocessing | Custom `SupervisedDataset` class | | Large datasets (>1M) | `StreamingSupervisedDatasetFromHFDataset` | | RL / GRPO | Cookbook RL patterns | | Research / custom loops | Low-level `forward_backward()` + `optim_step()` | | Vision-language | Inkling or Qwen3.5/3.6 vision models | | Audio / thinking-effort control | Inkling + `tml-renderers` ([Inkling](references/inkling.md)) |

External Resources

  • Documentation: https://tinker-docs.thinkingmachines.ai/
  • Cookbook Repo: https://github.com/thinking-machines-lab/tinker-cookbook
  • Console: https://tinker-console.thinkingmachines.ai
Read more
Ships withsundial-org-skills

The skill skill can help you find, improve, and publish skills — install it with npx sundial-hub add skill. You'll be able to peruse this library of curated skills, plus 50,000+ more aggregated from the web.

Get the whole plugin

Other skills on sundial-org-skills.