# Inkling-2-Small on 4× DGX Spark with SGLang (experimental)

Status: experimental. Measured: 2026-11-15 (page updated 2026-11-23). Web page: https://aidenle.com/recipes/inkling-2-small-sglang-4x-dgx-spark/
Image: `lmsysorg/sglang:dev-inkling-2-small`

Serves the Inkling-2-Small model, text and pictures, on four DGX Spark nodes at 55–56 tok/s for one request at temperature 1.0. Experimental: it runs on a development image and has open problems, listed on the page.

**Time:** About 5 min to boot, about 17 min the first time

**Result:** Inkling-2-Small, text and pictures: 55–56 tok/s for one stream at temperature 1.0, 92–107 tok/s in total at 4 streams and 131–137 at 8, with 524K tokens of context

## What you need

- Four DGX Spark nodes with nothing else on their GPUs, linked by a RoCE network
- The weights on every node: 394 GB, or about 93 GB pre-sharded
- About 37 GB per node for the image lmsysorg/sglang:dev-inkling-2-small
- Docker with the NVIDIA container runtime, and key-based ssh from one node to the other three

## Overview

> **Warning: Experimental.**
>
> - In service on one four-node fleet since 2026-11-12, on a development image of SGLang, not a release.
> - Open problems are listed under Notes, among them a silent stall of the whole fleet.
> - For a recipe with more serving time behind it, use [DeepSeek-V4.1-Flash on SGLang](https://aidenle.com/recipes/deepseek-v4-1-flash-sglang-4x-dgx-spark.md).
> - For a cache of 1.41M tokens and a one-script setup, use [the 4-bit KV cache recipe](https://aidenle.com/recipes/inkling-2-small-nvfp4-kv-sglang-4x-dgx-spark.md).
> - For long-session parallel tool calling and system-prompt adherence, use [the tool-call fix recipe](https://aidenle.com/recipes/inkling-2-small-tool-fix-sglang-4x-dgx-spark.md).

This recipe serves [thinkingmachines/Inkling-2-Small](https://huggingface.co/thinkingmachines/Inkling-2-Small) on four DGX Spark nodes behind one OpenAI-compatible endpoint. The model is a mixture of experts (MoE) with 594B parameters, 17B of them active for each token. It reads text and pictures, calls tools and reasons before it answers.

One request writes its answer at 55–56 tokens per second (tok/s) at temperature 1.0. The engine is the SGLang team's unmodified image, `lmsysorg/sglang:dev-inkling-2-small`, with small MIT-licensed Python files (hooks) for the Spark's GPU, GB10.

> **Code.**
>
> Code (MIT): [github.com/aidendle94/sparkrun-recipes](https://github.com/aidendle94/sparkrun-recipes/tree/main/recipes/inkling-2-small/sglang). Weights, about 93 GB a node with `PRESHARDED=1`: [aidendle94/Inkling-2-Small-DGX-Spark](https://huggingface.co/aidendle94/Inkling-2-Small-DGX-Spark). The image and weights have their own licences. The RoCE hook ports the vLLM adapter by Jason, @original-el8.

## Build

### Run it

1. **Put the weights on every node.** Use the official 394 GB checkpoint or the node's pre-sharded folder (see Code). On a node that serves something else, cap the download's memory (`systemd-run --user -p MemoryMax=4G hf download ...`).
2. **Pull the image on every node.** It is about 37 GB. If a boot fails inside a hook, pull the digest in the block below and set `INKLING_IMAGE` to it.
3. **Clone the recipe on the node of rank 0 and fill in the site file.** Every line of `launch/fleet.env.example` says how to find its value.
4. **Dry-run, then launch.** `--dry-run` prints the four `docker run` commands without starting anything. The relaunch script starts the fleet and a watchdog. A boot takes about 5 minutes, and about 17 minutes the first time.
5. **Read the text of overlapping requests.** Run `bench/concurrency_check.py` after every boot of a changed configuration, and leave `PAGED_DECODE=1` set.

launch · rank 0:

```bash
# On every node: the measured checkpoint revision, and the image.
hf download thinkingmachines/Inkling-2-Small --revision b0e7afb8892a07897c78ce1c5b801a0d9cbd5e7b
docker pull lmsysorg/sglang:dev-inkling-2-small
#   measured on lmsysorg/sglang@sha256:424c1da97f6d6eef1612006c77b2ca791657a8184c1fbdbc682ebf9485d3b32c

# On the node of rank 0.
git clone https://github.com/aidendle94/sparkrun-recipes
cd sparkrun-recipes/recipes/inkling-2-small/sglang
cp launch/fleet.env.example launch/fleet.env      # then edit it: nodes, users, RDMA devices
launch/launch-inkling2.sh --dry-run
launch/relaunch-inkling2.sh

# First request (port 8210 on rank 0).
curl -s http://<rank-0>:8210/v1/chat/completions -H 'content-type: application/json' \
  -d '{"model":"inkling-2-small","messages":[{"role":"user","content":"Is 91 prime?"}],"max_tokens":400}'

# A request with a picture (picture.png is any PNG; for a JPEG, write image/jpeg).
printf '{"model":"inkling-2-small","max_tokens":800,"messages":[{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,%s"}},{"type":"text","text":"What is in this picture?"}]}]}' \
  "$(base64 -w0 picture.png)" > request.json
curl -s http://<rank-0>:8210/v1/chat/completions -H 'content-type: application/json' -d @request.json

# The checks to run after every boot of a changed configuration.
mkdir -p logs && python3 bench/concurrency_check.py && python3 bench/reasoning_cache_check.py --expect on

# Pictures with known content; expect "21 of 21 passed".
mkdir -p logs/test_images && docker run --rm --network none -v "$PWD/logs/test_images":/o -v "$PWD/bench":/b:ro \
  --entrypoint /opt/sglang/bin/python3 lmsysorg/sglang:dev-inkling-2-small /b/make_test_images.py /o
python3 bench/image_check.py
```

With nothing set, the launcher gives each request 524,288 tokens of context and caps the KV pool at 793,000 tokens. `POOL=<tokens>` sets another cap. The recipe's README lists every default and the switch that turns it off.

earlier configurations with the launcher of 2026-11-17:

```bash
# With a newer launcher, use the same two lines from the recipe's README.
# 600,000-token pool, no prefill switches
SWA_RATIO= WMARK_BOOST= DRAFT_KV_FP8= PREFILL_GLUE= BIAS_FAR= FI_MXFP8= launch/relaunch-inkling2.sh

# the defaults before 2026-11-17: 262,144 tokens of context
CTX=262144 MEMFRAC=0.93 POOL= SWA_RATIO= WMARK_BOOST= DRAFT_KV_FP8= PREFILL_GLUE= BIAS_FAR= FI_MXFP8= \
  PREFILL_DECODE_INTERVAL= launch/relaunch-inkling2.sh
```

To stop the fleet, kill the watchdog first, then run `launch/launch-inkling2.sh --stop`. The pid of the watchdog is in the last `watchdog started` line of `~/inkling2-watchdog.log`.

## Performance

| Pictures, measured 2026-11-21 with all defaults | Result |
|---|---|
| One request, 60–80 answer tokens at reasoning effort `low` | 1.2–1.6 s for a 1,400-pixel-wide text picture. 3.2 s for a 4,096 × 4,096 picture |
| Text decode, temperature 1.0, with and without picture input | One stream 56.31 and 54.94 tok/s |

Picture input on the test fleet, one boot, all defaults.

### Cold prefill

| Cold prefill, one boot a row | 30K tokens | 120K tokens | 300K tokens |
|---|---|---|---|
| Without the prefill switches | 2,474 tok/s | 2,241 tok/s (53.6 s) | not measured |
| All three (the defaults) | 3,110 | 2,786 (43.1 s) | 2,223 (135.1 s) |

Prompts the server has not seen, one boot of the test fleet per row, 2026-11-17.

Measured: 2026-11-13 to 2026-11-21, one boot per number

Experimental: the model runs on four nodes (TP4) with MIT-licensed hooks and DSpark decoding, at temperature 1.0 unless labelled greedy.

| Measurement | Value | Note |
|---|---|---|
| Prefill · cold, 30K / 120K tokens | 2,821 / 2,615 tok/s | Prompts the server has not seen, idle fleet, measured 2026-11-23 |
| Decode · one stream, temperature 1.0 | 55–56 tok/s | 16 coding questions with 400-token answers, every launcher default |
| Context | 524K tokens | Launcher default since 2026-11-17 |
| KV pool | 793K tokens | The default cap of the 8-bit (FP8) pool |
| Aggregate · 4 / 8 streams | 92–107 / 131–137 tok/s | All streams together, at temperature 1.0 |
| Pictures · one request | 1.2–3.2 s | 1.2–1.6 s for a text picture 1,400 pixels wide, 3.2 s for a 4,096 × 4,096 one |
| Decode behind a long context | 68 / 60 tok/s | One stream after 130K / 500K tokens of context, with the 793K pool |
| Tool calls | 252 / 283 right | Of the cases not right, 20 gave valid but unexpected calls and 11 failed |
| Boot to healthy | ~5 min | With a warm kernel cache |
| Hooks | 32 files | MIT-licensed |

**Cold prefill without and with the three prefill switches** (tok/s on new prompts · higher is better)

|  | without the switches | with all three (the default) |
|---|---|---|
| 30K tokens | 2474 | 3110 |
| 120K tokens | 2241 | 2786 |

One boot each, 2026-11-17. Only the third switch changes the rounding, NLL 0.9840 both ways.

**Decode before and after splitting the experts by width** (tok/s, greedy, 400-token coding answers · higher is better)

|  | 96 whole experts a node (stock) | all 384 experts at quarter width, 12-bit attention weights |
|---|---|---|
| 1 stream | 48.3 | 60 |
| 4 streams, batch total | 88 | 106 |
| 8 streams, batch total | 114 | 130 |

Only the rounding of the output changes.

## Notes

#### Using it as a client

- **Send temperature 0 for lookups in long contexts and for agent work.**
- **Send the reasoning back with the history.**
- **Give long-context turns 4,000 output tokens or more.**
- **Leave the tools out of the request instead of sending `tool_choice: none`.**
- **Send pictures as data URLs or http(s) URLs.**

#### Known problems

- **The whole fleet can stall silently,** with no known cause, and the watchdog then relaunches it.
- **The server fetches picture URLs:** a request can make the node of rank 0 fetch any http(s) URL it can reach, including addresses on the fleet's own network, so expose the endpoint only to clients you trust, or set `IMAGES=` for text only.
- **A short request waits behind a long prefill** until the whole prefill is done.
- **The reasoning can loop on long near-identical lists** until it runs out of tokens, so give the model a search tool for such lists.
- **Log-probability requests over long spans can take a node down,** so keep scored spans to a few hundred tokens.
- **Run no other GPU work beside the serving fleet, however small.**
- **Sustained all-node load runs the GPUs hot,** with the rank-0 node at 95–98 °C under the heaviest test loads, so pace long load tests by temperature.
