# Tinker Training Inference

Train and run models on Tinker (Thinking Machines), LoRA and full fine-tuning, SFT...

- Repository: https://github.com/Leanmcp/gateway-skills (2122 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-07
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Leanmcp/gateway-skills --skill tinker-training-inference -g -a claude-code -y`
Codex: `npx skills add Leanmcp/gateway-skills --skill tinker-training-inference -g -a codex -y`
Cursor: `npx skills add Leanmcp/gateway-skills --skill tinker-training-inference -g -a cursor -y`
Gemini CLI: `npx skills add Leanmcp/gateway-skills --skill tinker-training-inference -g -a gemini-cli -y`

## Description

Train and run models on Tinker (Thinking Machines), LoRA and full fine-tuning, SFT with correct loss masking, RL/RFT with group-relative advantages and importance sampling, agentic RL over multi-turn tool-using agents, inference via the SamplingClient or the OpenAI-compatible endpoint, checkpoint management and export, every hyperparameter, and cost estimation from the live price table. Use this skill whenever the user mentions Tinker, tinker://, TINKER_API_KEY, console.tinker.ai, or the tinker CLI; wants to fine-tune, SFT, RFT, or RL a model on Tinker; asks about Tinker models, context windows, LoRA rank, sampling params, loss functions (cross_entropy, importance_sampling, ppo, cispo, dro), Datum construction, forward_backward or optim_step; wants to sample from, download, resume, merge, or export a Tinker checkpoint; or asks what a Tinker run will cost. Whenever Tinker work is initialized in a project, this skill also creates a TINKER_PRICING.md there so prices sit next to the training code. Reach for it even on vague asks like "train a model on this data" or "get inference working" when Tinker is the platform in play.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Tinker: training and inference

Tinker gives you token-level control of hosted fine-tuning: you build the
`Datum`s, you own the chat template, you hold the exact prompt and completion
token ids on both sides. That is the reason to use it, a training run stays
auditable, because the tokens the policy was updated on are tokens you can point
at, and it is also why there is more to get right than with a hosted
fine-tuning button. This skill is the map.

## Do this first, in any new Tinker project

**Create the pricing file.** Prices next to the training script get read before a
550B RL run is launched; prices in a browser tab do not.

```bash
python <skill>/scripts/tinker_pricing.py init --out <project dir>
```

That writes `TINKER_PRICING.md`, the full catalogue, what each operation
meters, and the pre-launch checklist. It is a **snapshot**: verify against the
live catalogue at <https://tinker-docs.thinkingmachines.ai/tinker/models/>, and
regenerate with `--force` when it moves. Then:

```bash
export TINKER_API_KEY="..."          # console.tinker.ai
uv pip install tinker
```

## Where to go

The rest: https://github.com/Leanmcp/gateway-skills/blob/HEAD/skills/tinker-training-inference/SKILL.md
