CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

inkling

Sample, evaluate, and post-train any Inkling model, Thinking Machines Lab's model family built for Tinker. Use this skill whenever the user mentions Inkling, `thinkingmachines/Inkling`, tml-renderers, `tml_v0` / `TmlV0Renderer`, or thinking/reasoning effort — and whenever they are choosing a model, building training data, running evals, setting up SFT or RL, handling parse errors, or working with audio or image inputs for an Inkling model. Inkling has requirements that differ from other Tinker models (mandatory effort conditioning, its own renderer and tokenizer, learning rates that differ a lot between the Inkling models), so load this skill before writing any Inkling code.

Quality

90%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Inkling

Inkling is Thinking Machines Lab's open-weight model family built for Tinker: general-purpose models that code, reason, and call tools. Inkling is also natively multimodal.

Every Inkling model is a Mixture-of-Experts transformer with variable thinking effort and well-rounded performance across a range of benchmarks.

ModelTotal / active parametersInput
thinkingmachines/Inkling-2-Small594B / 17Btext, images
thinkingmachines/Inkling-2-Mini26B / 5Btext, images
thinkingmachines/Inkling975B / 41Btext, images, audio
thinkingmachines/Inkling-Small276B / 12Btext, images, audio

See Models & Pricing for context lengths and prices.

All Inkling models share the tml_v0 renderer and the effort interface, so moving between them is a one-line change to the model name, and benchmarking several on your own task is cheap. The tokenizer depends on the model: always pass the model name to get_tokenizer, and never reuse a tokenizer or a rendered dataset across models.

All Inkling models are offered as post-trained versions on Tinker, not base models: they arrive instruction-tuned and effort-conditioned, so treat them as starting points for further post-training — SFT, RL, distillation — rather than for continued pretraining.

Working with Inkling differs from other Tinker models in three ways, each covered below: every render needs an explicit thinking-effort value, rendering and tokenization go through tml-renderers rather than a Hugging Face chat template, and the Inkling models want quite different learning rates from each other.

Setup

Inkling renders through the standalone tml-renderers package, included in the default installation together with the required torch>=2.10.

Pass any model name from the table above anywhere the cookbook takes a model name. Every Inkling model is served in both short and long context. The cookbook selects the tokenizer and the renderer (tml_v0) from the model name, including for the :peft: long-context variants:

from tinker_cookbook import model_info
from tinker_cookbook.renderers import get_renderer
from tinker_cookbook.tokenizer_utils import get_tokenizer

model_name = "thinkingmachines/Inkling-2-Small"
renderer = get_renderer(model_info.get_recommended_renderer_name(model_name), get_tokenizer(model_name))

Never hardcode a renderer name, and pass effort explicitly when changing the default. Never call tokenizer.encode() to build a prompt — the Inkling tokenizer adapter has no chat template, so raw encoding produces out-of-distribution tokens. The Using Inkling guide is the canonical reference for setup and supported inputs.

Thinking effort: set it everywhere

Inkling's flagship control is continuous thinking effort — a finite scalar in [0.0, 1.0). The renderer turns it into a Thinking effort level system message inserted before the first non-system message. The model is post-trained with that message present, so leaving it to chance means out-of-distribution behavior and unreliable eval numbers.

Rules:

  • Set effort explicitly at sampling time and when building training data. The renderer defaults to 0.9 (high) if you omit it, which is a reasonable default but should be a deliberate choice.
  • Do not write the effort system message yourself, and do not include a second one in the conversation. The renderer owns it.
  • Effort and max_tokens are independent. Higher effort tends to produce longer traces, so raise the generation budget with it or responses truncate mid-thought.

Preset values

These are the same scalars the OpenAI-compatible API uses for its named reasoning_effort presets. Any finite value in [0.0, 1.0) works.

Namenoneminimallowmediumhigh (default)xhigh
Effort0.00.10.20.70.90.99

For evaluation: use 0.99 for maximum reasoning performance, 0.0 for benchmarks that do not need chain-of-thought, and sweep the middle for accuracy-versus-latency trade-offs — the thinking-effort guide has effort-scaling results on selected benchmarks. Note that effort=0.0 conditions the model toward no reasoning; it is not a hard constraint.

Think of effort as a general rollout-effort knob, not just a thinking-length knob. Even on tasks that need little reasoning, higher effort can produce more tool calls and more turns, which may help agentic environments.

Sampling

from tinker_cookbook.renderers import Message
from tinker_cookbook.renderers.tml_v0 import TmlV0Renderer
from tinker_cookbook.tokenizer_utils import get_tokenizer

renderer = TmlV0Renderer(get_tokenizer("thinkingmachines/Inkling-2-Small"))
messages = [Message(role="user", content="Solve this problem step by step.")]
prompt = renderer.build_generation_prompt(messages, effort=0.9)

Sweep effort on your own task before committing to a value, with sample_reasoning.py:

python -m tinker_cookbook.scripts.inkling.sample_reasoning efforts='[0.0,0.2,0.7,0.9,0.99]'

Sample and run evals at temperature=1.0, which is what every script in tinker_cookbook/scripts/inkling/ defaults to. Lowering it is not a substitute for lowering effort.

TmlV0Renderer does not support assistant prefill — pass complete messages and let the model open its own turn. Always pass renderer.get_stop_sequences() in SamplingParams.

Training data

Render supervised data at the same effort you will use at test time, so training tokens match sampling tokens exactly:

model_input, weights = renderer.build_supervised_example(messages_with_response, effort=0.9)

We suggest picking one effort for the whole dataset and using it at test time too, leaning toward the higher end — 0.9 or 0.99 — unless your task genuinely does not need reasoning; mixed-effort training recipes are something we plan to share later. Generic supervised dataset builders render at the default 0.9; call build_supervised_example (or build_supervised_examples for multiple examples) directly with an explicit effort to use another value. Use the same explicit effort for sampling and evaluation.

For custom training code built directly on the Tinker SDK and tml-renderers, build the wheel renderer with the effort: tml_renderers.renderers.Inkling2(effort=0.9) for the Inkling 2 models, Inkling(effort=0.9) for Inkling and Inkling-Small. Its render_for_completion, render_for_sft, and bridge_to_next_turn then write the same effort message. A renderer built without an effort omits the effort message.

Post-training

Inkling models can prefer substantially different learning rates across generations and scales. Use hyperparam_utils.get_lr(model_name) for a model-specific SFT starting point, then follow Hyperparameter Selection for objective adjustments and model transfer. Don't reuse another model's LR unchanged; move it with hyperparam_utils.transfer_lr. Then sweep nearby LRs on your own task and setup.

  • Sweep learning rate and effort together over the first few RL steps. We suggest doing this before committing to any long run. Start the LR sweep from the guide's conservative RL starting point, about 0.1 * get_lr(model_name), and include higher values too.
  • Watch entropy. The cookbook logs optim/entropy each step. Healthy entropy means the model is still producing variance, which is what makes rewards differ within a group and keeps the model responsive to training.
  • Track all-fail and all-success groups. Groups with uniform reward contribute no gradient — see the remove_constant_reward_groups option. If most groups are degenerate, we suggest adjusting task difficulty, group size, or effort.
  • Consider an SFT warm-start if RL is slow to move. When your domain or output format sits far from the model's defaults, a short SFT phase on in-format data can reach a regime where RL hill-climbs more readily.

RL defaults are already tuned for Inkling in the cookbook: thinkingmachines/Inkling* models default to the agentic rollout preset and the MinViableGroup rollout strategy (tool-backed rollouts shouldn't discard a whole group over one infrastructure failure). Override with an explicit rollout_config or rollout_error_tolerance if your task is single-turn.

Inkling 2 Mini is a looped transformer, and the version on Tinker has a fixed loop count: its middle 12 layers always run three times for every token. LoRA trains one adapter per layer, shared by all three passes, so each looped layer's adapter is counted once in get_lora_param_count and learns from every pass.

Evaluation

Evaluate through the cookbook sampling path, or through Tinker's OpenAI-compatible or Anthropic-compatible endpoints if your harness expects one of those interfaces. However you sample, set effort explicitly and record it alongside the score — an eval number without its effort value is not reproducible.

The two endpoints expose effort differently. The OpenAI endpoint takes reasoning_effort as either a named preset or a raw float, matching the table above. The Anthropic endpoint takes named levels only, through a Tinker-specific output_config.effort in extra_body — Anthropic's own thinking.budget_tokens is accepted for wire compatibility but ignored — and it does not accept audio input.

Handle parse errors. They occur during training, eval, and normal use, usually when a response is truncated mid-structure. Handle them however fits your pipeline; we suggest retrying recoverable errors with a corrective message that includes the parser error detail.

  • Through the cookbook renderer: parse_response() never raises. It returns (message, ParseTermination.MALFORMED) on unparseable output and falls back to decoded raw text. Check the termination value rather than assuming success.
  • Through tml-renderers directly: catch tml_renderers.v0.ParseError and feed its string into the corrective message.

If malformed terminations are frequent, check max_tokens first — truncation at an unlucky cut point is the most common cause.

Audio and images

All Inkling models accept image input. Inkling and Inkling-Small also accept audio input. Encode media locally through tml-renderers; the renderer accepts raw bytes, a local path, or a base64 data: URI, and deliberately refuses remote URLs. Audio must be WAV, MP3, or FLAC, and non-WAV formats must supply num_frames and sample_rate together. Clean, adequately loud audio noticeably improves results.

python -m tinker_cookbook.scripts.inkling.sample_audio
python -m tinker_cookbook.scripts.inkling.sample_vision

Audio fine-tuning recipes (speech recognition, emotion plus transcription, medical ASR domain adaptation) live in tinker_cookbook/recipes/audio/ and need pip install 'tinker_cookbook[audio]'.

Common pitfalls

SymptomCauseFix
Odd or off-distribution responsesEffort message missingUse TmlV0Renderer; in custom code, use tml-renderers directly
Eval scores that don't reproduceEffort not recorded or not setPin and log the effort value for every eval run
Train/test mismatch after SFTData rendered at a different effort than samplingRender training data with the effort you deploy at
Responses truncated mid-thoughtmax_tokens not scaled with effortRaise the budget; high effort can need 16k+ tokens
ModuleNotFoundError: tml_renderersIncomplete installationReinstall tinker-cookbook
TmlV0Renderer requires PyTorch 2.10 or newerOld torchReinstall tinker-cookbook, or run pip install "torch>=2.10"
NotImplementedError on prefillTMLv0 sampling rejects partial assistant messagesPass complete messages instead
Frequent MALFORMED terminationsTruncated or unparseable outputRaise max_tokens; retry with a corrective message carrying the parse error

Reference

Model and documentation:

Packages and code:

  • tml-renderers — the rendering library behind tml_v0
  • tinker-cookbook — this repository
  • sample_reasoning.py — the effort sweep script
  • tinker_cookbook/renderers/tml_v0.py — the cookbook renderer adapter
  • tinker_cookbook/scripts/inkling/ — runnable sampling scripts for effort, audio, and images
  • tinker_cookbook/recipes/audio/ — audio SFT and RL recipes

For general post-training methodology use the research skill; for training or deployment triage use the debug skill.

Repository

thinking-machines-lab/tinker-cookbook

Path

skills/inkling/SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.