Inkling-2-Mini on one DGX Spark: SGLang recipe and the t5a drafter
A serving recipe for thinkingmachines/Inkling-2-Mini on a single NVIDIA DGX Spark (GB10, 128 GB unified memory), tuned for agentic coding and long code prompts. It runs the stock SGLang image (pinned by digest) with our kernel patches mounted at launch, the base weights unmodified, and t5a: our DFlash2 draft model, fine-tuned for agentic coding and long code, included here.
On a 96-request multi-turn agentic coding replay (eval1), against stock SGLang and stock vLLM on the same Spark:
- 1 user: 1.83x faster than stock SGLang and 2.23x faster than stock vLLM (521.5 s for the replay vs 952.5 s / 1161.8 s).
- 4 users: 1.79x / 2.15x (449.0 s vs 804.7 s / 963.3 s).
- Long context: 5827 tokens/s fresh prefill at 35K tokens (1.82x stock SGLang), 70.9 tokens/s single-stream decode at 32K (1.33x).
- Quality: KL divergence 0.00639 nats to the reference implementation, against 0.00626 for stock SGLang and 0.00600 for stock vLLM.
Quality
| Stock vLLM | Stock SGLang | This recipe | |
|---|---|---|---|
| KL divergence to the reference, nats (lower bound; lower is better) | 0.00600 | 0.00626 | 0.00639 |
| Top-1 agreement with the reference | 97.37% | 97.54% | 97.43% |
The reference is the released checkpoint (thinkingmachines/Inkling-2-Mini @1fb4134b) run in the Hugging Face transformers reference implementation, which dequantizes the NVFP4 / MXFP8 experts and computes in BF16 activations; there is no BF16 release of this model. Each server is teacher-forced on the same token windows of three public corpora (neutral text, code, agentic) and scored on the second half of each window from its top-20 log probabilities (a lower bound on the full KL). All three engines sit near 0.006 nats because all three run the experts with quantized activations, as the checkpoint is meant to be served. This recipe reads slightly higher than both stock engines (table above). The target model verifies every drafted token, but the outputs are not bit-identical to stock SGLang's: the recipe's kernels and verification batches differ in floating-point detail, so greedy text can diverge between the engines, as it does between stock SGLang and stock vLLM. Release 1.1, measured the same way, reads 0.00639 nats and 97.43%, unchanged from 1.0.
Agentic coding speed
| eval1, 96 requests | Stock vLLM | Stock SGLang | This recipe | vs stock vLLM | vs stock SGLang |
|---|---|---|---|---|---|
| Wall time, 1 user (s) | 1161.8 | 952.5 | 521.5 | 2.23x | 1.83x |
| Wall time, 4 users (s) | 963.3 | 804.7 | 449.0 | 2.15x | 1.79x |
| Decode per stream, median, 1 user (tokens/s) | 54.7 | 59.1 | 82.3 | 1.50x | 1.39x |
| Decode per stream, median, 4 users (tokens/s) | 14.3 | 21.3 | 31.1 | 2.17x | 1.46x |
| Time to first token, median, 1 user (s) | 2.36 | 1.95 | 1.31 | 1.80x | 1.49x |
| Time to first token, median, 4 users (s) | 4.13 | 2.91 | 2.55 | 1.62x | 1.14x |
| Output tokens of the replay, 1 user / 4 users | 17,536 / 17,144 | 16,537 / 16,656 | 16,873 / 18,125 |
eval1 is a 96-request multi-turn agentic coding replay: sessions are replayed turn by turn with their tool definitions, 1 or 4 sessions at a time, so each session's later turns reuse the prefix cache as they would in an agent loop. Requests are greedy (temperature 0) with the output budget of the original turn. Wall time is the time to finish all 96 requests; speedups are raw wall-time ratios. The engines do not emit the same number of tokens (last row), so the ratios are not normalized for output length. Time to first token is measured to the first content, reasoning or tool-call delta. A tool call that arrives in one piece reports its whole generation time there, so the two median rows mix generation with first-token time; read them as indicative.
Release 1.1: the recipe column's wall times are release 1.0's scaled by a same-session comparison of 1.1 against 1.0 (see How it was measured); the median rows and the output-token row are 1.1's own values from that session. In that comparison 1.1 was 1.5% faster at 1 user and 0.5% faster at 4 users (wall time; standard errors about 2% and 1%), so neither difference is resolved. One of 1.1's four 4-user boots (543.6 s, against 453.0-460.2 s for the other three) is left out of the 4-user rows.
Long context
| Prompt-processing and decode speed (tokens/s) | Stock vLLM | Stock SGLang | This recipe | vs stock vLLM | vs stock SGLang |
|---|---|---|---|---|---|
| Fresh prefill, 2K-token prompt | 862 | 2128 | 3391 | 3.93x | 1.59x |
| Fresh prefill, 35K-token prompt | 2381 | 3205 | 5827 | 2.45x | 1.82x |
| Decode, 1 stream, 2K context | 57.3 | 54.4 | 101.0 | 1.76x | 1.86x |
| Decode, 1 stream, 32K context (median) | 53.8 | 53.4 | 70.9 | 1.32x | 1.33x |
| Decode, 4 streams at 16K each, aggregate | 113.7 | 109.4 | 164.3 | 1.45x | 1.50x |
Prompts are fixed slices of an open-source code corpus followed by "Explain what this code does, step by step."; greedy, the model's default reasoning effort, a fixed number of output tokens (the end-of-sequence token is ignored), so every engine decodes the same token count. Fresh prefill = the first request on a prompt; decode = (400 - 16) tokens over the time difference of a 400-token and a 16-token request on the cached prompt. The 35K row is the mean of a 35,056-token and a 34,173-token prompt. This table was measured on release 1.0 and not repeated for 1.1.
How it was measured
One DGX Spark, 2026-12-02 13:36-17:51 PST: 18 fresh server boots, two per engine for each of the three loads (1-user replay, 4-user replay, and the long-context and quality checks), in an interleaved order. Every value is the mean of an engine's two boots; speedups are the ratio of those means. Each engine ran at its published settings, with the changes named below that a Spark needs; memory was not equalized:
- Stock vLLM: the
vllm/vllm-openaiInkling-2-Mini image (pinned digestc2dc759f), its published DGX Spark recipe with the bundled DSpark drafter (7 draft tokens), 262,144-token context,--gpu-memory-utilization 0.55(our setting: the published recipe sets none, and vLLM's default of 0.9 cannot run beside the host on a Spark). - Stock SGLang: the
lmsysorg/sglangInkling-2-Mini image (pinned digestefac853b), the SGLang cookbook's DGX Spark DSpark settings (TP1, FA4 attention, page 128, 8 draft tokens) plus two changes of ours: 262,144-token context (the cookbook sets none) and--mem-fraction-static 0.55(the cookbook's 0.45 left too small a KV pool for 4 sessions). - This recipe: the same SGLang image,
PROFILE=agenticofrecipe/serve.sh(262,144-token context,--mem-fraction-static 0.82, t5a with 8-token blocks).
Release 1.1 (2026-12-04 09:41-12:33 PST, one DGX Spark): 1.0 and 1.1 in alternating fresh boots in one session, two boots of
each on the 1-user replay and four of each on the 4-user replay, both at --mem-fraction-static 0.81. The recipe column's
wall times are 1.0's divided by the ratio of the two builds' geometric-mean wall times; the decode and first-token medians
and the output tokens are 1.1's own means over its boots in that session. The stock columns and the long-context table
are from the 1.0 measurement.
Quick start
You need a DGX Spark with Docker and the NVIDIA container toolkit, about 25 GB of disk for the weights plus the SGLang image, and no other large GPU program running (the agentic profile claims 82% of the unified memory for SGLang).
hf download diffbot/Inkling-2-Mini-DFlash2-DGX-Spark --local-dir ~/models/Inkling-2-Mini-DFlash2-DGX-Spark
hf download thinkingmachines/Inkling-2-Mini --revision 1fb4134b9a74f9681054f4ef82e4bf1f458a2337 --local-dir ~/models/Inkling-2-Mini
MODEL_DIR=~/models/Inkling-2-Mini bash ~/models/Inkling-2-Mini-DFlash2-DGX-Spark/recipe/serve.sh
The server listens on http://127.0.0.1:8000/v1 (OpenAI-compatible; model inkling-2-mini; reasoning and tool calls are parsed).
The first boot compiles kernels and captures CUDA graphs and takes several minutes longer than later boots, which reuse the
cache in ~/.cache/inkling2-mini-t5a. bash recipe/serve.sh stop stops it. Settings (port, API key, memory fraction, the
long-context profile) are documented at the top of recipe/serve.sh; recipe/README.md explains the stack.
curl -s http://127.0.0.1:8000/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"model": "inkling-2-mini", "messages": [{"role": "user", "content": "Write a binary search in Rust."}]}'
Long-context profile: 1M tokens and image input
PROFILE=long bash recipe/serve.sh serves a 1,048,576-token context with image input (--enable-multimodal), at the same
--mem-fraction-static 0.82 and otherwise the same settings as the agentic profile. Run it on a Spark with nothing else large
running. The speed tables above were measured with the agentic profile, not this one. What its boot test on one DGX Spark
showed for release 1.0 (2026-12-02 13:16-13:35 PST; a functional check, not a benchmark; not repeated for 1.1):
- KV pool of 1,144,960 tokens.
- Needle retrieval at 599K and 900K prompt tokens: both found, with 276 s and 562 s to the first token (fresh prefill).
- Image input: 5 of 6 probes answered correctly; the sixth (reading a three-digit number) used up its 8,192-token budget while reasoning and gave no answer.
- Lowest free host memory during the test: 10.5 GiB.
Release 1.1 was checked from a fresh checkout with DRY_RUN=1 bash recipe/test/clean-checkout.sh for both profiles
(2026-12-04 12:45 PST): every file matched SHA256SUMS, the base weights and the drafter / mix pins matched, and the
docker run command line differs from 1.0's only by the new read-only mount, its PYTHONPATH entry and the five
INKLING_DFPOOL* switches. Release 1.1 then passed the release test (recipe/test/clean-checkout.sh) at MEM=0.78 from a
fresh download of this repository on a DGX Spark, 2026-12-04 PST (long 14:43-14:58, agentic 15:20-15:36): every file matched
SHA256SUMS, the base weights matched, the first boot from an empty kernel cache took 896 s (agentic) and 894 s (long), and
the smoke test passed (chat, a tool call, a 32K-token prompt, and on the long profile an image) with no errors in the server log.
Release 1.0: both profiles passed the release test (recipe/test/clean-checkout.sh) from a fresh checkout of this repository on a DGX Spark,
2026-12-02 18:27-18:58 PST: every file matched SHA256SUMS, the base weights matched recipe/base-1fb4134b.sha256, and the first
boot from an empty kernel cache took 909 s (agentic) and 887 s (long). The smoke test passed (chat, a tool call, a 32K-token prompt,
and on the long profile an image), with no errors in the server log.
bash recipe/test/clean-checkout.sh <this repo> <base model dir> boots a separate copy on port 8115 with a fresh cache, runs
recipe/test/smoke.py (chat, a tool call, a 32K-token prompt) and removes it again.
The t5a drafter
t5a is a DFlash2 block-diffusion draft model (5 layers, 8-token blocks, two global-attention layers) that proposes tokens for Inkling-2-Mini to verify. We fine-tuned it from Inkling-2-Mini-DFlash2-Global (L13), itself derived from Inco AI's Inkling-2-Mini-DFlash2, on text generated by Inkling-2-Mini itself: agentic coding sessions and long code-explanation data, with a smaller share of short coding prompts. The long code-explanation data are slices of permissively licensed open-source repositories and code from tool outputs, asked with the same instruction as the long-context table. The eval1 sessions and the code corpus behind the long-context table were excluded from the training data (by session, by file path and by overlapping 6-line code shingles).
| Files | Contents |
|---|---|
drafter/ |
t5a in BF16 (model.safetensors, 990 MB, and config.json, the original architecture). |
drafter-mix/ |
The same weights pre-quantized for the recipe's drafter kernels (int8 attention, 4-bit feed-forward; 552 MB). The recipe refuses a mix that was not built from the drafter beside it. |
recipe/ |
serve.sh, the launch profiles, tests, and stack/: the frozen serving stack, byte for byte as benchmarked. |
The drafter loads in this recipe's SGLang stack. Other engines need DFlash2 support with global-attention draft layers.
Limitations
- Built and measured on one DGX Spark only; other GB10 systems should work but are untested, and other GPUs are not supported.
- The stack is pinned to one SGLang image; the patches will not apply to other SGLang versions.
- Both profiles claim 82% of the memory for SGLang (the long profile adds image input and a 1M-token context): in the benchmark runs the
host's available memory fell to 7-10 GB at its lowest (stock engines at 0.55: 44-49 GB). Lower
MEMif you run other GPU programs beside it (the KV pool shrinks accordingly). - The quality evidence is the KL table and functional checks (chat, tool calls, long prompts), not a full benchmark suite.
- The speed tables compare the engines at different memory fractions (0.82 for the recipe, 0.55 for both stock engines), which favours the recipe's larger KV pool on the 4-user replay.
Credits and license
Built on Thinking Machines Lab's Inkling-2-Mini, Inco AI's Inkling-2-Mini-DFlash2 (and z-lab's DFlash), Cameron Basham's
Inkling-2-Mini-DFlash2-Global (L13), the SGLang project, and knapcio's MIT-licensed Inkling-2-Mini DGX Spark SGLang recipe
(github.com/knapcio/Inkling-2-Mini-1x-DGX-Spark), the base of
recipe/stack/ (its license and credits are kept there unchanged).
This repository is Apache-2.0 (LICENSE, NOTICE); the third-party code in recipe/stack/ keeps its own MIT, BSD-3-Clause
and Apache-2.0 licenses, listed in THIRD_PARTY_NOTICES.md. Changes and history: recipe/RELEASE_NOTES.md.
Model tree for diffbot/Inkling-2-Mini-DFlash2-DGX-Spark
Base model
thinkingmachines/Inkling-2-Mini