Skip to main content
Back

Thinking Machines' TML-d24-varloop Runs One Checkpoint at Five Compute Depths

Thinking Machines open-sourced a looped transformer where you pick the number of passes at inference time, trading compute for capability on one checkpoint.

Pro

Model, Full Access
  • Thinking Machines released TML-d24-varloop-research, a 26.4B MoE model where loop count is chosen at inference time.
  • Variant of Inkling 2 Mini trained with 1 to 5 passes through its middle 12 shared-weight layers.
  • Each extra pass adds about 1.0B effective active parameters, from 3.4B to 7.4B active.
  • Matches or beats Inkling 2 Mini on coding benchmarks like SWEBench Verified at higher pass counts.
  • Runs locally on a 32GB GPU or Apple Silicon Mac with Transformers, vLLM, SGLang or llama.cpp.
  • Apache 2.0, no hosted API, explicitly a research artifact and not recommended for production.

Thinking Machines Lab has released TML-d24-varloop-research, a 26.4-billion-parameter, open-weight multimodal model for text and images. Users choose between one and five trained recurrent passes when loading it, controlling how much computation the loaded instance spends on each token without changing its weights. The model is the research sibling of Inkling 2 Mini and provides a controlled way to study how repeated computation affects capability.

In a looped-transformer overview, the middle layers run multiple times while reusing the same parameters. Inkling 2 Mini fixes that loop count at three, while the variable-loop checkpoint supports several depths. Current integrations apply one count to every request handled by a loaded instance, so changing depth requires reloading the model or starting another server.

One checkpoint, five depths

The text backbone contains 24 physical layers arranged as a six-layer prelude, a 12-layer recurrent core and a six-layer ending. The core occupies zero-indexed layers 6 through 17 and repeats according to the configured pass count. At the default three passes, a token traverses 48 layer applications: six before the loop, 36 inside it and six afterward.

The backbone uses a sparse Mixture-of-Experts architecture that routes each token through eight of 128 expert feed-forward subnetworks. Thinking Machines reports 3.4 billion active parameters per token at one pass and about 1 billion additional parameter activations for each repeat, reaching 7.4 billion at five passes. The stored model remains 26.4 billion parameters because every repeat reuses the same core weights.

Attention residuals carry information between iterations. Each pass can read a gated message from the preceding pass through the recurrent core while retaining access to the original prelude output, giving repeated layers new state to process rather than simply replaying the same computation.

Training favors three passes

The variable-loop checkpoint shares its pretraining and initial midtraining stage with Inkling 2 Mini. Midtraining is the task-focused phase between broad pretraining and final post-training, where the model begins specializing toward its intended workloads.

During the later variable-loop stage, Thinking Machines sampled one through five passes in a 1:2:6:2:1 ratio, heavily favoring three. Final post-training used three passes exclusively. The model card warns that results at the less frequently trained depths may understate what a dedicated model with the same effective depth could achieve.

More loops help, then flatten

Released evaluations show large gains from the first three passes, followed by smaller and sometimes uneven changes at four and five. Scores are percentages, and higher values are better.

Thinking Machines evaluation results by recurrent pass count
Benchmark 1 pass 2 passes 3 passes 4 passes 5 passes Inkling 2 Mini
SWEBench Verified (bash) 56.3% 76.5% 78.7% 79.3% 79.6% 79.2%
SWEBench Pro v2 Hard 39.7% 69.1% 78.9% 76.0% 78.4% 77.9%
BrowseComp 29.4% 53.8% 65.7% 69.4% 71.0% 76.0%
GPQA Diamond 69.6% 79.2% 84.2% 81.9% 83.1% 86.6%
MRCR v2 (256K-512K) 27.2% 65.2% 89.2% 93.4% 92.1% 46.4%
MathVision 74.8% 84.9% 86.6% 87.8% 88.1% 89.0%

Software-engineering performance improves sharply with added passes. Five-pass SWEBench Verified reaches 79.6%, slightly above Inkling 2 Mini’s 79.2%. SWEBench Pro peaks at three passes, falls at four and recovers at five, showing that additional recurrence does not guarantee a higher score.

Long-context retrieval and reasoning gain the most on MRCR, rising from 27.2% at one pass to 93.4% at four before slipping to 92.1% at five. BrowseComp improves at every depth but remains below Inkling 2 Mini, while GPQA peaks at three passes. MathVision rises steadily and nearly matches the fixed-depth model. Inkling 2 Mini received different later-stage training, so its scores reflect more than architecture alone.

Limits emerge away from three passes

Thinking Machines describes the checkpoint as a research release and recommends Inkling 2 Mini for production. Behavior may become unpredictable at pass counts other than three because final post-training targeted that configuration. Single-pass scores fall to 0.7% on DeepSWE and 3.1% on Apex 2025, illustrating how much demanding tasks depend on recurrent computation.

Pass counts above four rarely produce consistent gains in the published results, and the model was trained only across one to five passes. There is no hosted API for the checkpoint, including through Thinking Machines’ Tinker platform.

Local inference fits in 32GB

The Apache 2.0 checkpoint occupies about 20GB and is designed to run on a machine with 32GB of GPU or unified memory. Supported examples include an RTX 5090, RTX Pro 6000, DGX Spark and Apple Silicon Mac with at least 32GB.

Most expert layers use NVFP4, a four-bit floating-point format, while the final four use the eight-bit MXFP8 format. These are the native training precisions distributed with the checkpoint, so local inference does not require a separate quantization step.

Three ways to set the loop count

vLLM fixes the pass count for the server process at startup. This example loads the model with two passes and enables loop-cache sharing:

docker run --gpus all --ipc=host -p 8000:8000 \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  vllm/vllm-openai:inkling-2-mini thinkingmachines/TML-d24-varloop-research \
  --reasoning-parser inkling --tool-call-parser inkling --enable-auto-tool-choice \
  --hf-overrides '{"text_config": {"loop_num_passes": 2, "loop_share_cache": true}}'

The Transformers guide exposes the same depth setting through text_config when loading the model:

from transformers import AutoModelForMultimodalLM

model = AutoModelForMultimodalLM.from_pretrained(
    "thinkingmachines/TML-d24-varloop-research",
    text_config={"loop_num_passes": 2},
)

The GGUF build defaults to three passes in llama.cpp. Users can select another count with --override-kv inkling2_loop.loop.count=int:N, where N ranges from 1 through 6. A six-pass run lies outside the model’s one-to-five-pass training range and should be treated as experimental.

The vLLM option loop_share_cache separately controls whether recurrent passes share cached attention history. The example enables the cache-sharing configuration that Thinking Machines researcher Songlin Yang identified as effective for coding workloads.

A controlled test of reused depth

Research on recurrent-depth transformers predates this checkpoint, but large open models with variable loop counts remain uncommon. A single weight set lets researchers compare internal representations and downstream behavior at several effective depths without introducing differences from separately trained models.

Independent work has already begun through the looped-mechanisms project, which captures activations by layer and pass on both TML checkpoints. With six layers before the recurrent core and six after it, a forward pass visits 12 + 12p layer applications, where p is the pass count. That yields 24 applications at one pass and 72 at five.

Where the depth knob helps

  • Multiple compute budgets: One checkpoint can serve several effective depths without retraining, distillation or additional stored weights.
  • Separate deployment tiers: Operators can run one- or two-pass instances for lower-cost workloads and four- or five-pass instances for long-context or reasoning-heavy requests.
  • Controlled interpretability studies: Researchers can probe the same weights after each recurrent pass to identify what additional computation changes.
  • A distinct scaling mechanism: Mixture-of-Experts routing selects a small set of subnetworks for each token. Recurrence adds depth by applying the same layers again, creating a separate compute tradeoff.

Thinking Machines recommends Inkling 2 Mini for production workloads. For local research, TML-d24-varloop-research provides an accessible way to measure when repeated depth improves a model, when gains plateau and how representations evolve across passes.