Inkling 2 Mini Brings Looped Transformer Performance to Local Setups
Inkling 2 Mini Brings Looped Transformer Performance to Local Setups Published November 20, 2026 Inkling 2 Mini is a multimodal, looped transformer model designed for local AI e...
By Software Development Team
Inkling 2 Mini Brings Looped Transformer Performance to Local Setups
Published November 20, 2026
Inkling 2 Mini is a multimodal, looped transformer model designed for local AI environments. It uses a Mixture-of-Experts architecture with approximately 26 billion physical parameters and 3 billion active parameters per token. Twelve middle layers are visited three times, increasing the model's logical depth without storing three separate copies of those weights.
The model supports a 1 million-token context window and accepts both text and images. Thinking Machines Lab distributes it in mixed precision, using NVFP4 and MXFP8 expert weights. A DSpark drafter is included to improve generation speed with a relatively small memory cost.
Inkling 2 Mini is considerably smaller than Inkling 2 Small. In the reported evaluations, it was at least comparable with Qwen 3.8 27B, although additional validation is required. Support is available in Transformers, Llama App, llama.cpp, and MLX. SGLang also provides day-zero inference support for datacenter hardware.
What is new in Inkling 2 Mini?
Inkling 2 Mini contains 24 decoder layers. The first six and final six layers execute once, while the 12 middle layers execute three times in a loop. The model therefore has 48 logical layer visits per token:
6 + (3 × 12) + 6 = 48 logical layers
The physical model still contains only 24 layers. Compared with Inkling 2 Small, the hidden size is 2,304 rather than 4,608. At every layer visit, eight experts are selected. Mini chooses them from 128 experts per layer, while Small chooses from 384.
The three passes through layers 6 to 17 reuse the same weights. They begin with the output of the first six layers and exchange information through cross-pass messages. Each looped layer reads a message from the previous pass using learned queries for its query, key, value, and MLP inputs. A gating controller considers the current input and the message, then determines how much of each should be retained. Each pass consequently refines the result of the previous pass.
Each six-layer block contains five sliding-window layers and one full-attention layer. The local attention window supports up to 1,024 tokens. Attention uses 24 query heads and eight key-value heads, along with learned relative-position logits, a learned sink, and an output gate. Full-attention layers use dynamic key and value convolutions.
The router selects eight of 128 SwiGLU experts for each token. Selected scores are normalized, and the weights are scaled by eight. During the second and third passes, each core layer attends to two residual blocks from the preceding pass. Four rank-64 gates combine separate messages for the query, key, value, and MoE inputs.
The text decoder has a width of 2,304, and each expert has an intermediate width of 1,152. Weight reuse reduces the number of distinct layers stored in the checkpoint, but the model still performs all 48 visits. Every visit maintains its own key-value cache and short-convolution state.
A separate research checkpoint uses the same architecture but supports a variable number of loop passes. Setting the number of passes to one or two can make inference substantially faster, though output quality may be somewhat lower. This variant has been tested, but not evaluated in depth.
Benchmark results
Inkling 2 Mini is reported as state of the art in its class on the Artificial Analysis Intelligence Index v5 (AAv5), as well as on numerous benchmarks across different categories. Against Gemma 4 31B, Muse Glimmer, Qwen3.8-27B, and Nemotron 3.5 Super VL, it leads on 32 of 48 benchmarks. The evaluations cover coding and autoresearch, agentic search and tool use for knowledge work, vision interpretation and creation, reasoning and knowledge, and safety and alignment.
The model also performs well as a local coding companion. It leads on FrontierCode v2.0, ties Qwen3.8-27B on Terminal-Bench 4.0, and trails Qwen on AutomationBench-AA v1.0.6. AA Briefcase results are reported as ELO ratings, where higher scores are better.
Inference support
Transformers
Transformers supports both the fixed-loop Inkling 2 Mini checkpoint and the variable-loop TML-d24-varloop-research checkpoint.
Fixed loop
import torch
from transformers import AutoModelForMultimodalLM, AutoProcessor
model_id = "thinkingmachines/Inkling-2-Mini"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForMultimodalLM.from_pretrained(model_id)
messages = [{
"role": "user",
"content": [{"type": "text", "text": "Why is the sky blue?"}]
}]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
outputs = model.generate(**inputs, max_new_tokens=1024)
print(processor.decode(outputs[0][input_len:], skip_special_tokens=False))
Variable loop
The research checkpoint accepts loop_num_passes in text_config. This example uses two passes:
import torch
from transformers import AutoModelForMultimodalLM, AutoProcessor
model_id = "thinkingmachines/TML-d24-varloop-research"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForMultimodalLM.from_pretrained(
model_id,
text_config={"loop_num_passes": 2},
)
messages = [{
"role": "user",
"content": [{"type": "text", "text": "Why is the sky blue?"}]
}]
inputs = processor.apply_chat_template(
messages,
reasoning_effort="medium",
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
outputs = model.generate(**inputs, max_new_tokens=1024)
print(processor.decode(outputs[0][input_len:], skip_special_tokens=False))
Images and text
An image can be supplied by replacing the message content with an image and a text request:
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": "/path/to/image.jpg"},
{"type": "text", "text": "What is in this image?"},
],
}
]
Reasoning effort
The reasoning_effort argument to processor.apply_chat_template() controls the requested effort level. The chat template adds the corresponding numeric value to the prompt as a system message. The default is high, which corresponds to 0.9.
inputs = processor.apply_chat_template(
messages,
reasoning_effort="medium",
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
The available levels are:
none: 0.0minimal: 0.1low: 0.2medium: 0.7high: 0.9, the defaultxhigh: 0.99max: 0.99
A numeric value between 0.0 and 0.99 can also be supplied, such as reasoning_effort=0.35.
Tool calling
Inkling 2 Mini can request a tool, receive its result, and then produce a final response. The following example defines a temperature function and makes it available to the model:
import torch
from transformers import AutoModelForMultimodalLM, AutoProcessor
model_id = "thinkingmachines/Inkling-2-Mini"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForMultimodalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
def get_current_temperature(location: str, unit: str):
"""
Get the current temperature at a location.
Args:
location: The location to get the temperature for, in the format "City, Country"
unit: The unit to return the temperature in. (choices: ["celsius", "fahrenheit"])
"""
return 22.0 # A real function would call a weather API here
def ask(messages):
inputs = processor.apply_chat_template(
messages,
tools=[get_current_temperature],
reasoning_effort="low",
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
output = model.generate(**inputs, max_new_tokens=1024)[0][
inputs["input_ids"].shape[-1]:
]
return processor.parse_response(output, prefix=inputs["input_ids"][0])
messages = [{
"role": "user",
"content": "Hey, what's the temperature in Paris right now?",
}]
reply = ask(messages)
call = reply["tool_calls"][0]["function"]
print("Model calls:", call["name"], call["arguments"])
temperature = get_current_temperature(**call["arguments"])
messages += [
reply,
{"role": "tool", "name": call["name"], "content": str(temperature)},
]
print(ask(messages)["content"])
## Model calls: get_current_temperature {'location': 'Paris, France', 'unit': 'celsius'}
## Right now in Paris it’s about 22°C (roughly 71.6°F).
Llama App and llama.cpp
Llama App runs and manages local language models on macOS from the menu bar or on Windows from the system tray. It is built on llama.cpp and provides a local OpenAI-compatible API for integration with coding agents, editors, and scripts.
The Inkling 2 Mini release includes GGUF 4-bit (IQ4_NL) and 8-bit (Q8_0) quantizations for both checkpoints.
On Linux, or when serving the model from the command line, the fixed-loop model can be started with:
llama serve -hf ggml-org/Inkling-2-Mini-GGUF:IQ4_NL
The variable-loop model uses:
llama serve -hf ggml-org/TML-d24-varloop-research-GGUF:IQ4_NL
To load the 8-bit weights, replace the suffix with :Q8_0.
SGLang
SGLang includes day-zero support for Inkling 2 Mini. The server must run on SM103:
export MODEL="thinkingmachines/Inkling-2-Mini"
python -m sglang.launch_server \
--model-path $MODEL \
--served-model-name inkling \
--attention-backend fa4 --bf16-gemm-backend torch --dtype bfloat16 \
--tp 1 --page-size 128 --grammar-backend xgrammar \
--host 0.0.0.0 --port 30000
After the server starts, its APIs can be checked and queried as follows:
curl -s localhost:30000/health_generate && echo OK
curl -s localhost:30000/v1/models | python -m json.tool
curl -s localhost:30000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "inkling",
"messages": [{"role": "user", "content": "What is 17 times 24?"}],
"max_tokens": 512,
"reasoning_effort": "low"
}' | python -m json.tool
Multimodal support can be enabled with --enable-multimodal.
Speculative decoding
SGLang can use a three-layer DSpark draft model to propose tokens for Inkling 2 Mini to verify. The draft reads inputs from decoder visits 5, 23, and 41, along with the final normalized state at index 48. When the draft weights are available, add the following options to the server command:
--speculative-algorithm DSPARK --context-length 131072
The reported comparison used a single NVIDIA B300 GPU. Each request contained a 1,024-token prompt and generated exactly 1,024 tokens. Tests used concurrency levels of 1, 4, 16, and 64.
A representative benchmark script is:
MODEL=thinkingmachines/Inkling-2-Mini
for TAG in base mtp; do
EXTRA=""
[ $TAG = mtp ] && EXTRA="--speculative-algorithm DSPARK"
python -m sglang.launch_server --model-path $MODEL \
--attention-backend fa4 --bf16-gemm-backend torch --dtype bfloat16 \
--tp 1 --page-size 128 --context-length 131072 --max-running-requests 64 \
--port 30000 $EXTRA > $TAG.log 2>&1 &
until curl -sf localhost:30000/health_generate > /dev/null; do sleep 10; done
for C in 1 4 16 64; do
python -m sglang.bench_serving --backend sglang --port 30000 --model $MODEL \
--dataset-name random --apply-chat-template \
--random-input-len 1024 --random-output-len 1024 --random-range-ratio 1.0 \
--num-prompts $(( C*4 < 32 ? 32 : C*4 )) --max-concurrency $C \
--output-file results_$TAG.jsonl
done
kill %1
wait
done
MLX
MLX support is available through the mlx-lm project, including multimodal image and text inputs. Quantized versions are distributed through the mlx-community organization.
MLX can also run the original checkpoint. In that configuration, the native NVFP4 and MXFP8 quantization scheme is used without reconversion.
mlx_lm generate \
--model thinkingmachines/Inkling-2-Mini \
--image image.jpg \
--prompt "Describe this image.<|end_message|><|message_user|><|content_image|><|unused_200054|>" \
-m 1000
Demonstrations and tests
3D shader flythroughs
A single prompt was used to create two sunset flythroughs over procedural mountains and reflective water. Each scene was rendered with a single WebGL fragment shader.
The prompt requested a self-contained index.html with a full-screen WebGL scene, procedural mountains, volumetric clouds, reflective water, sunset lighting, an indefinite camera flight, and an automatic resolution fallback. It prohibited textures, images, fonts, libraries, external files, and network requests. The result was tested in headless Chrome with screenshots and renderer and frame-rate information.
Animated recreation of The Starry Night
Inkling 2 Mini was given a reference image of Vincent van Gogh's The Starry Night (1889) and a screenshot helper in the Pi coding harness. It produced a self-contained HTML page containing one WebGL2 fragment shader. The shader generated the scene procedurally without loading the reference image or other assets.
The animation included the swirling sky, glowing stars, a moving cypress, flickering village windows, and a pulsing moon. The model reviewed the output over 24 rounds of screenshot checks. The final animation was recorded frame by frame at 1080p and 60 frames per second on an Apple M4 Max.
From a sketch to an application
A photograph of a hand-drawn Trip Split wireframe was supplied with a short prompt in the Pi coding harness. Inkling 2 Mini used the labels, example expenses, and handwritten notes to create an expense list, an add-expense form, and a balances view in one HTML file using vanilla CSS and JavaScript.
The application updates totals and balances when expenses change, suggests payments to settle the trip, and stores data in the browser's localStorage. Three independent attempts were run and tested with Playwright. The first attempt passed all 13 checks. Adding the sketch's $90 dinner increased the total from $405 to $495 and recalculated the amounts owed.
A 4-bit model generating a website
The 4-bit GGUF quantization, IQ4_NL, was used to create a website for a SaaS product called Plant Therapy. The requested service matches house plants with licensed therapists. The model generated a single HTML file, created SVG visuals, and implemented matching logic from a short prompt.
Browser-agent experiment
Inkling 2 Mini was paired with the Pi coding agent to create a browser agent using Helium, Chromium, and Hugging Face Sandboxes. The resulting system used the model to operate within a browser-oriented workflow.
Conclusion
Inkling 2 Mini combines a looped transformer design, multimodal input, a 1 million-token context window, and quantized formats intended for local inference. Its 24 physical layers execute as 48 logical visits, while the variable-loop research checkpoint allows users to trade some output quality for faster inference. Support across Transformers, llama.cpp, SGLang, and MLX provides several options for running the model locally or on datacenter hardware.