AIARTICLE

7 min read

Hugging Face Optimizes Inkling 2 Mini Inference on a Single RTX PRO 6000

A code agent tuned Inkling 2 Mini inference on an RTX PRO 6000 and gained 40% speed without touching the model's weights. The result shows that competent agent inference fits on a single production GPU.

Hugging Face Optimizes Inkling 2 Mini Inference on a Single RTX PRO 6000
Image: Alan Andrade
Article · AI
Reading
7 min
Tables
1
Code
1

A code agent tuned Inkling 2 Mini inference on an RTX PRO 6000 and gained 40% speed without touching the model's weights. The result shows that competent agent inference fits on a single production GPU.

A code agent tuned Inkling 2 Mini inference on an RTX PRO 6000 and gained 40% speed without touching the model's weights. The result shows that competent agent inference fits on a single production GPU.

What Inkling 2 Mini Is

Inkling 2 Mini was released days before the Hugging Face post, in mid-November 2026, by Thinking Machines. It has around 26 billion total parameters, but activates only 3 billion per token, accepts multimodal inputs, and opens a context window of 1 million tokens. On the Artificial Analysis Intelligence Index v5, it leads its weight class and wins 32 of the 48 benchmarks compared against Gemma 4 31B and Qwen3.8-27B.

What stands out is not just the size: it's the architecture. The model is a "looped" Mixture-of-Experts (MoE), with 24 physical layers in which the middle 12 layers run three times. In practice, each token goes through 48 layer visits, not 24. The checkpoint mixes NVFP4 and MXFP8 precision and already ships with a built-in drafter called DSpark for speculative decoding.

The Gap the Official Recipe Left

Both vLLM and SGLang, the two reference frameworks for serving LLMs, already support Inkling 2 Mini in nightly builds. The problem is that the published recipes target NVIDIA B200 and GB300 GPUs (sm100 architecture). Anyone with an RTX PRO 6000, which uses the sm120 architecture, is left without a tested configuration, because kernel compatibility between the two isn't guaranteed.

The Hugging Face team, according to the post signed by Niels Rogge, wanted to find out how fast it was possible to serve the model on a single 96 GB RTX PRO 6000, the same GPU behind the platform's own nvidia-rtx-pro-6000 Inference Endpoint. Instead of tuning flags by hand, they delegated the work to a code agent.

An Agent Testing Alone, With a Fixed Protocol

The agent was given an inference-optimization "skill," access to the hf CLI and to Hugging Face Jobs, and ran experiments for an entire afternoon. The protocol was strict:

  • Measure the hardware and estimate the theoretical ceiling before any tuning.
  • Change one variable at a time, always bracketed by two control runs (control → candidate → control), keeping the change only if it beat both controls without regressing other metrics.
  • Log every run, including regressions and dead ends, in a PLAN.md.
  • Only declare a winner after passing long-context, concurrency, and greedy-equivalence checks.

The benchmark script, bench.py, measures single-user decoding, aggregate throughput under concurrency, cold prefill at several sizes, and time to first token (TTFT), using the token count that comes directly from the server's response. Since Jobs run on separate machines, the agent tested SGLang and vLLM nightly in parallel, and used much cheaper CPU Jobs only to read the source code installed inside the container whenever it needed to uncover an undocumented flag.

What Changed in Performance

The final gain came from three decisions, not a single trick: switching from SGLang to vLLM nightly, turning on DSpark with 7 draft tokens and probabilistic sampling, and tuning two memory flags so the setup would fit in the card's 96 GB.

ConfigurationSingle-user decoding (tok/s)8-user aggregate (tok/s)
SGLang, no speculation (baseline)134-139543-598
vLLM, no speculation157.0638
SGLang + DSpark (8 drafts)166.6~660 (with concurrency adjustment)
vLLM + DSpark (7 drafts)190.6716

The winning configuration uses this command:

vllm serve thinkingmachines/Inkling-2-Mini \
--tool-call-parser inkling \
--enable-auto-tool-choice \
--reasoning-parser inkling \
--max-model-len 262144 \
--gpu-memory-utilization 0.85 \
--speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"probabilistic"}'

The final result, 190.6 tok/s for a single user, is above the 167.7 tok/s of an earlier community benchmark with SGLang + DSpark on the same GPU, published on the LocalMaxxing forum. The 40% gain over the baseline and the 26% gain in the 8-user aggregate came without changing a single model weight.

Why the Ceiling Sits Near 190 Tokens per Second

Before tuning any flag, the agent measured the GPU itself inside a Job: 1,469 GB/s of copy bandwidth, 416 TFLOPS in BF16, 792 TFLOPS in FP8. With 48 layer visits per token, plain decoding re-reads about 2.7 GB of attention and dense weights, 2 GB of routed experts (8 of 128 per layer), and 0.9 GB of the language head at each step. That gives a bandwidth ceiling of ~256 tok/s for a single user without speculation; vLLM without DSpark reaches 157 tok/s, 61% of that ceiling, limited mainly by kernel-launch latency across the 48 visits.

Speculative decoding changes that math because verifying 8 positions at once activates the union of the experts routed by them: instead of reading ~6% of each layer's experts, the verifier reads about 40%. With the measured acceptance rate of ~2.3 tokens per step at temperature 1.0, the bandwidth ceiling drops to ~201 tok/s. At 190.6 tok/s, vLLM with DSpark is already operating at ~95% of that reduced ceiling: there isn't much room left for more flag tuning, only a drafter with higher acceptance or a verification path that touches fewer experts per layer would push the number further.

The Dead Ends Matter Too

Most of the candidate flags simply didn't work, and the post documents this in detail, which is rare to see published. Shorter draft counts (3 to 6) are rejected at startup, but for different reasons in each engine: vLLM requires num_speculative_tokens = 7 (the checkpoint's block size minus one), while SGLang requires --speculative-num-draft-tokens 8 (gamma plus one, for the built-in drafter). Switching draft_sample_method to greedy dropped speed by 11% at temperature 1.0. The enable_adaptive_verification flag triggered an assertion error for the Inkling 2 drafter. FP8 quantization of the drafter head is only supported for DeepSeek DSpark drafters, not for this one.

The post also lists three measurement bugs worth knowing for any team that has already struggled with inference benchmarking:

  1. JIT compilation by Triton during the timed prefill made the number drop from ~20K to 202 tok/s on the first call, because Triton was compiling kernels during the timed request; an unmeasured warmup per prompt size fixed it.
  2. Orphaned servers were holding onto GPU memory because the PID saved by setsid … & didn't match the process group ID; switching to subprocess.Popen(start_new_session=True) and waiting for the port and memory to free up fixed it.
  3. Out-of-memory errors were hidden 200 lines above the final "Engine core initialization failed" message: the 1M-token KV cache needed 52.6 GiB with only 48.1 GiB free, and later vLLM 0.34.0 changed the default for --gpu-memory-utilization from 0.92 to 1.0, blowing out the drafter's allocation.

From Lab to Production Endpoint

Before publishing, the team pinned the exact digest of the vLLM nightly image and ran four checks inside a Job: needle-in-a-haystack retrieval at ~50% and ~95% of context (3/3 in both, up to 249,970 tokens), a concurrency test with four requests of ~58,000 tokens each, and greedy equivalence between running with and without speculation (6 of 6 byte-identical prompts). Only after that was the endpoint created with hf endpoints deploy, pinning both the image digest and the model revision, with scale-to-zero after 60 idle minutes.

Running the same bench.py against the endpoint already in production, over the internet, the number came out to 194.9 tok/s for a single user, matching the Jobs results once the ~160 ms of network latency is discounted.

What This Changes for Builders Here

The performance gain itself is useful, but the post's greater value lies in the process: all the agent's code, the Jobs driver, the logs, and the raw measurements are published in the NielsRogge/inkling-2-mini-hillclimb repository. To reuse the loop on another model or another GPU, it's enough to describe candidate and control server commands in a configs/plan-*.json file and submit it to the HF Jobs GPU type equivalent to the target endpoint.

It's worth a reality check on what "local" means here. The RTX PRO 6000 is a professional-class card with 96 GB of VRAM, costing US$2.75 per hour via HF Jobs or Inference Endpoint, far from a consumer GPU on a developer's desk, but also much cheaper and more accessible than a B200 or GB300 cluster. For a Brazilian team that wants to run a competent agent model without procuring a multi-GPU cluster, this is the hardware category that matters.

The real entry cost isn't zero: the recipe depends on vLLM nightly builds, requires dealing with process-management bugs and OOM errors hidden in logs, and the 95% bandwidth-ceiling gain makes clear that more flag tuning won't solve it alone; the next performance leap depends on a better drafter or a cheaper verification path, not another hidden flag.

Translated from the Brazilian Portuguese original · Read the original

View profile →