Inkling 2 Small (594B total, 17B active, 384 experts × top-8, text and image input) with its 587B routed-expert weights vector-quantized to 12 bits per 8 weights by hVQ: 110.1 GiB of parts that serve on one 128 GB DGX Spark (GB10) through ds4-dfm-rs, with the native 1,048,576-token context, the vision tower and the DSpark drafter.
Every 8-weight vector of an expert row is one 12-bit index into a per-layer book of 4,096 E4M3 codewords, times one F16 gain per row; hVQ assigns the codes with error feedback through each expert's input correlation (method). Everything else stays close to the source: Q4_K attention and head, BF16 router, norms, convolutions and vision tower, a Q8_0 drafter. The 8 full-attention layers keep their K/V in NVFP4, on the device up to 262,144 positions and in an SSD file past them.
Status, 2026-11-14: converted, verified, uploaded and served on DGX Spark. 52 parts (118,182,291,328 bytes), each checked against its SHA-256 in
release.jsonwhen the engine loads it. Measured against the original MXFP8 model (held-out, teacher-forced reference forward): the same top-1 token on 88.1% of generated positions, KL 0.163, NLL 0.849 → 0.987. On DGX Spark (GB10), the released files through ds4-dfm-rs: the held-out text scores NLL 0.9869 per generated token, where the reference forward of the same bytes gives 0.9873 and the original 0.8492; the held-out images 0.699 against 0.694.ds4 --serving-checkpasses; chat, thinking, tools, images and all four API surfaces answer (below).
Experimental low-bit release. The routed experts are stored at 1.5 bits per weight. The measurements below describe teacher-forced fidelity. Sampled generation was checked on a small seeded set only; no task benchmark has been run.
Problems or odd output? Post the prompt, sampling settings and runtime commit in the Community tab.
| Source | thinkingmachines/Inkling-2-Small-MXFP8 at 086a047e8b7ff2ac902dd52355328ddb66b16914; the routed experts' e4m3 values and ue8m0 scales decode exactly |
| What is quantized | The routed experts of all 48 layers (384 × gate/up/down, 587.07B weights): GVQ1 12-bit, one book of 4,096 E4M3 codewords per layer, F16 row gains, hVQ codes |
| What is not | Attention q/k/v/r/gate/o and the output head: Q4_K, importance-weighted. Router, norms, convolutions, attention-residual queries and relative-position profiles: source BF16/F32. Token embedding and vision tower: source BF16. DSpark drafter: Q8_0 |
| Setting | hVQ t = 1, damping 0, shrink 4,096 tokens: the settings measured for the DeepSeek V4.1 hVQ release, not re-swept here |
| Calibration | 3,620,637 text tokens (2,723 sequences, 21 domains) and 234 images (162,819 tokens); held-out sets disjoint |
| Fidelity (reference forward, vs the original) | Generated-position KL 0.163, same top-1 88.1%, NLL 0.849 → 0.987; held-out images KL 0.088, same top-1 95.3% |
| Initial engine qualification on DGX Spark | Held-out text NLL 0.9869 (reference forward 0.9873, original 0.8492), the text's token top-1 at 74.8% of generated positions; images 0.699 (0.694, 0.688); serving checklist passes |
| Speed on DGX Spark | Prefill 1,428.9 tok/s, decode 31.53 tok/s over 2K–64K without the drafter; 846.2 / 24.63 at a 258K frontier; two DSpark drafts add 9.5% on greedy requests (November 25 measurements) |
| Size | 52 parts, 118,182,291,328 bytes (110.1 GiB); routed experts 1.5 bits per weight |
| Context | 1,048,576 tokens, the native window: NVFP4 K/V, resident to 262,144 positions, an SSD file past them |
| Images | Up to 4,096 pixels a side (10,609 tokens); a longer side is downsampled to 4,096, as the model card's own evaluation did |
| Runtime | ds4-dfm-rs main (#151, #152, #153; the speeds below need #161) on DGX Spark (CUDA). llama.cpp, Ollama and Transformers do not read this format |
release.json is the entry point; the parts are independent GGUF files, not numbered splits.
| Part | Storage | GiB | Residency on GB10 |
|---|---|---|---|
layer-00-experts.gguf … layer-47-experts.gguf: routed experts, 48 layers × 384 × gate/up/down |
GVQ1 12-bit (K = 4096, one E4M3 codebook per layer, F16 row gain), hVQ | 102.85 | device |
body-nonexpert.gguf: attention q/k/v/r/gate/o (48 layers) and the output head; router, norms, convolutions, attention-residual queries, relative-position profiles |
Q4_K importance-weighted; the rest source BF16 / F32 | 3.14 | device |
mtp-q8_0.gguf: MTP drafter (5 layers + Markov head) |
Q8_0 matrices, BF16 head and norms | 1.75 | device, while drafting |
vision-bf16.gguf: 23-layer ViT and merger |
source BF16 | 0.61 | mapped on demand, only while an image is encoded |
embed-tokens-bf16.gguf: token embedding [201024, 4608] |
source BF16 | 1.73 | SSD rows: one 9,216-byte row per token |
Converted from the MXFP8 release of the same model at
086a047e (routed experts e4m3 with a ue8m0 scale per 32 weights, decoded exactly; everything else BF16 as in the
NVFP4 release). SOURCE.md explains the choice and accounts for every source tensor.
| Recipe for the routed experts | Expert GiB | Beside the drafter, the 4 GiB floor and K/V |
|---|---|---|
| 13-bit + 8-bit residual (MiniMax-M3.1 VQ style) | 179.7 | does not fit |
| 13-bit, all layers | 111.4 | does not fit: nothing left for K/V |
| 12/13 mix | 102.8 + 0.18 per 13-bit layer | only by giving up context |
| 12-bit, all 48 layers | 102.8 | fits, with NVFP4 K/V and an SSD tier |
Inkling 2 Small has the largest routed-expert set of the releases this method has served (587.07B weights), and its 8 full-attention layers are plain GQA (8 KV heads × 128): 36 KiB of BF16 K/V per token including the drafter's full-context layer, 36 GiB at the native 1,048,576 tokens. So every expert layer stays at 12 bits and the K/V moves:
O_DIRECT file (measured below).Teacher-forced on 26 held-out text cases (62,552 tokens: web text in five languages, code, math, chat with and without thinking, tool calls, SWE traces, two 8K documents) and 8 held-out image cases, against the MXFP8 original run by the same reference forward. Full tables: EVALUATION.md.
| vs the original MXFP8 model | KL, generated | Same top-1, generated | NLL, generated | KL, all positions | Images: KL / top-1, answers |
|---|---|---|---|---|---|
| Original | 0 | 100% | 0.849 | 0 | 0 / 100% |
| Original weights, K/V FP8 | 0.0016 | 98.88% | 0.850 | 0.0062 | 0.008 / 98.2% |
| Original weights, K/V NVFP4 | 0.0028 | 98.54% | 0.849 | 0.0085 | 0.007 / 98.5% |
| iVQ experts (same books, t = 0) | 0.2493 | 85.12% | 1.055 | 0.2281 | 0.134 / 91.8% |
| hVQ experts | 0.1562 | 88.33% | 0.981 | 0.1484 | 0.077 / 95.3% |
| This release (hVQ experts + Q4_K body + NVFP4 K/V) | 0.1630 | 88.12% | 0.987 | 0.1555 | 0.088 / 95.3% |
The tables above run the release's bytes through the reference forward in PyTorch. These
run the released files on one DGX Spark (GB10, CUDA 13.4, clocks 300–2,200 MHz) through
ds4-dfm-rs: the loader, the NVFP4 K/V, the GVQ1 kernels and the engine's own arithmetic are
included. The scores come from main at c1235c35, the serving checks from
main at a0178c3d, after #153 kept the default plan on the serial session. The engine scored every generated
position of the same held-out cases token by token; the reference's sums come from this
repository's quality/eval/release.
| Held-out, generated positions | Tokens | NLL: original | NLL: reference forward | NLL: engine on DGX Spark | Engine top-1 is the text's token |
|---|---|---|---|---|---|
| Text, 25 cases | 46,598 | 0.849 | 0.987 | 0.987 | 74.8% |
| Images, 8 cases | 342 | 0.688 | 0.694 | 0.699 | 87.4% |
By kind of text (NLL per generated token):
| Held-out text | Tokens | NLL: original → reference → engine | Engine top-1 is the text's token |
|---|---|---|---|
| WikiText-2 | 4,096 | 1.32 → 1.63 → 1.63 | 62.0% |
| Web en / ko / zh / ja / es | 10,705 | 1.45 → 1.58 → 1.58 | 62.6% |
| Math web | 1,638 | 0.46 → 0.77 → 0.77 | 78.4% |
| Code files (Python, C) | 4,094 | 0.19 → 0.26 → 0.26 | 93.0% |
| Chat ko / zh / ja | 6,569 | 0.57 → 0.58 → 0.58 | 83.8% |
| Reasoning (think) | 5,681 | 0.49 → 0.53 → 0.52 | 84.0% |
| Code chat (think) | 2,963 | 0.74 → 0.73 → 0.73 | 76.9% |
| Instruction following | 1,780 | 0.55 → 0.67 → 0.67 | 78.8% |
| Tool calls / agents (JSON) | 583 | 0.62 → 0.66 → 0.65 | 83.5% |
| SWE agentless | 298 | 0.65 → 0.68 → 0.68 | 80.5% |
| Long 8K document | 8,191 | 0.84 → 1.13 → 1.13 | 71.1% |
Per case the engine's NLL stays within 0.007 of the reference forward's (25 of 25), so the released files serve the conversion's quality. The reference runs did not record how often the original's top-1 is the text's token, so that column has no counterpart.
The capital of France is and a chat question,
NVFP4 K/V): the engine's top-1 is the reference's at every position (6/6, 26/26), last-position
KL 0.0018.Serving. ds4 --serving-check passes every item with the K/V resident and with every block
past the first 1,024 positions forced to the SSD file: prefix reuse, rewind and continue (17/17
top-1), disk and snapshot sessions, and the opt-in banks' warm, fork, partial, disk and width
checks. Behind ds4-server on the default plan (1M, no drafter) the model is resident 55 s after launch with 5.8 GiB of memory left available. One request per surface, 11 / 11 as expected: chat, SSE streaming, thinking, a tool call and its follow-up with the tool's result, a base64 image, /v1/messages, /v1/responses, /v1/completions, a 24,644-token prompt with one planted fact, and the same prompt again from the live state (24,576 tokens cached; 4.5 s against 27.4 s for the first). A second turn that re-renders the first answer resumes after the first turn's prompt (6,174 of 6,298 tokens cached).
A seeded set at temperature 1.0 (top_p 1.0):
| 44 requests | Result |
|---|---|
| Thinking arithmetic (en, ko): exact answer | 24 / 24 |
Thinking closed and finished with stop |
24 / 24 |
| Tool call valid (name, city, unit) | 12 / 12 |
Chat ko / en / zh / ja, code, translation: stop |
8 / 8 |
It shows no gross failure, not a ranking.
Updated November 25, 2026: a second optimization campaign, four prefill and four decode changes
(PR #161); the model files are unchanged. These rates use ds4-dfm-rs
496f315e.
| 2K–64K sweep, three fresh runs | Prefill tok/s | Decode tok/s |
|---|---|---|
| Median of the runs' means over 32 frontiers | 1,428.9 | 31.53 |
| 2K frontier | 1,342.5 | 32.70 |
| 8K frontier | 1,551.3 | 32.65 |
| 16K frontier | 1,506.7 | 32.23 |
| 32K frontier | 1,437.6 | 31.49 |
| 48K frontier | 1,371.1 | 30.94 |
| 64K frontier | 1,299.0 | 30.24 |
Every frontier prefills 2,048 new tokens of Italian prose in one 2,048-row chunk and decodes 128 forced greedy tokens without the drafter, all K/V resident, default PDL. Per-frontier cells are medians of three fresh processes; the plot shows them over the first release's engine. Final run means span 1,428.6–1,435.7 prefill and 31.30–32.04 decode. Raw runs and protocol.
Three fresh matched runs of the starting 4242cf82 give 1,239.9 / 29.72 tok/s:
+15.2% prefill / +6.1% decode (the November 15 card had 1,248.1 / 29.79, the first release
979.6 / 23.62). One GB10, CUDA 13.5.37, unchanged 300–2,200 MHz clock policy; the six sweeps kept
at least 5.68 GiB available, with PSI 0 once the model was resident.
Long prompts. The same steps to 258K, and whole cold prompts on a context of at most 262,144
tokens (-c), which prefill in 4,096-row chunks (prefill / decode tok/s):
| 8K | 64K | 131K | 196K | 258K | |
|---|---|---|---|---|---|
| Frontier, 2,048 new tokens | 1,547.8 / 32.52 | 1,309.8 / 30.21 | 1,099.8 / 28.05 | 954.6 / 26.20 | 846.2 / 24.63 |
the same at 4242cf82 |
1,391.9 / 31.29 | 1,084.0 / 27.95 | 863.2 / 25.08 | 719.7 / 22.50 | 617.3 / 20.66 |
| Cold prompt of that length | 1,657.1 / 32.76 | 1,574.9 / 30.59 | 1,190.9 / 23.74 | ||
the same at 4242cf82 |
1,377.1 / 31.28 | 1,238.4 / 27.77 | 866.0 / 20.41 |
A longer context, the native 1M plan included, keeps 2,048-row chunks (4,096 rows take 1.4 GiB it does not have): a cold 8K / 64K / 258K prompt then prefills at 1,494 / 1,424 / 1,104 tok/s.
The optimization report records the profiles, all eight rounds, what was measured and not adopted, and the numerical gates: frontier KL against the chunk-size switch, and a 1,280-position teacher-forced NLL/top-1 comparison against an existing arithmetic switch. Those are bounded regression checks, not a task benchmark. Vision speed was not remeasured.
The native 1M context. 1,040,000 tokens at the default threshold prefill at 518.5 tok/s
on average (284.7 at 4242cf82: +82.1%; 268.2 on the first release's engine). Past 262,144 positions the full
layers attend densely over the SSD file, so every decoded token reads (context − threshold) ×
9,216 bytes at the drive's ~6 GB/s; no kernel changes that:
| Prompt | K/V resident to | Decode tok/s | First token |
|---|---|---|---|
| 1,040,000 tokens | 262,144 positions (default) | 0.86 | 1.17 s |
| 1,040,000 tokens | 262,144, with 7 DSpark drafts (first release's engine) | 1.94 | |
| 1,040,000 tokens | 524,288 (first release's engine) | 1.26 | 0.79 s |
| 524,288 tokens | 262,144 (default) | 2.54 | 0.40 s |
| 524,288 tokens | 524,288: all of it | 19.59 | 0.05 s |
DS4_INKLING2_KV_RESIDENT_CTX=524288 takes 2.36 GB that the drafter and the image reserve
otherwise use (3.9 GiB stayed available in the 524,288-token run). With the K/V resident a token
costs 30.6 ms at 8K, 40.6 at 258K and 51.0 at 524K. Paging rarely routed experts instead of K/V
is the engine's next step for the native context: in two 258K sessions the coldest 6.9 GB of
experts took 0.007% and 0.15% of the routes
(analysis).
DSpark. Through the server at the PR's head, up to 512 tokens per request (code, explanation,
Korean, arithmetic, an Italian prose continuation), every server at -c 131072 --mem-floor-gb 2:
| Decode tok/s | Plain | 2 drafts |
|---|---|---|
| Greedy, mean of 5 | 32.89 | 36.02 (+9.5%) |
| Sampled (T 0.7, top_p 0.95), mean of 5 | 32.60 | 33.98 (+4.2%) |
| Code, greedy | 32.9 | 38.8 (+18%) |
| Prose continuation, greedy | 32.4 | 30.9 (−4.5%) |
A two-draft trial reads 1.81 plain tokens' worth of weights (its three verify rows route to almost twice one row's experts, and the drafter adds its own 1.75 GB and a second read of the head) and takes 2.14 plain tokens' time, so a trial has to keep more than about 2.1 of its three tokens to pay: the code and arithmetic requests do, raw prose (2.09) just misses. A rate gate falls back to plain decoding while drafts lose, which limits the prose loss. Where a greedy drafted stream leaves plain decoding's argmax, the plain top-1 leads by at most 0.37 logits (verify rows run batched kernels; measured on the first release's engine).
VQ → iVQ → hVQ, as in DeepSeek-V4.1-Flash-1017-hVQ-GGUF. Every 8 consecutive input-axis weights of an expert row are one index into a per-layer book of 4,096 E4M3 codewords, times one F16 gain per row.
Inkling2 decoder layers.R and the column weights D give
H = D½ R D½; the 8-column blocks of every row are assigned in order and each block's error is fed forward into
the blocks not yet assigned (GPTQ / GPTVQ error feedback through the factor of H), then the row gains are refit
by least squares under H. t = 1, no damping, a 4,096-token shrink: the settings measured for the DeepSeek
release.On the calibration statistics, across all 48 layers, hVQ leaves 45% of iVQ's gate/up output error and 81% of its down error at the same codebook (every layer improves).
RECIPE.md has every setting; conversion-receipts/ has every layer's record.
Prior work behind each stage (VQ, iVQ, hVQ) is reviewed on the DeepSeek V4.1 hVQ card.
2,723 text sequences, 3,620,637 tokens, rendered with the model's own chat_template.jinja
(thinking rows at effort high, the rest at none, tool calls in the template's JSON format)
and tokenized with its tokenizer. The mix follows the DeepSeek V4.1 hVQ release's 21 domains:
web text in English, Korean, Chinese, Japanese and Spanish; code; math; chat and instruction
following; reasoning with thinking; tool calls; SWE agent traces; long documents, from the same
pinned dataset revisions where they apply. 234 images (photos from TextVQA, receipts from
CORD v2, charts from PlotQA, GUI screenshots from ScreenSpot) are rendered as user image and
question with the assistant's answer, at most 1,024 image tokens each.
calibration/calib_manifest.json and calibration/images_manifest.json list every row's source,
revision, position and licence.
The held-out set (26 text cases, 62,552 tokens; 8 image cases) was reserved first and shares no
64-token window with the calibration rows. It chose no setting: t, damping and shrink are the
DeepSeek release's.
release.json is the entry point: it names every part with its role, residency, size and
SHA-256, and the K/V contract. The parts are independent GGUF files, not numbered splits.
| Path | Contents | Size |
|---|---|---|
layer-00-experts.gguf … layer-47-experts.gguf |
Routed experts, GVQ1 12-bit hVQ, one part per layer | 102.85 GiB |
body-nonexpert.gguf |
Attention, head, router, norms, convolutions, attention-residual queries | 3.14 GiB |
mtp-q8_0.gguf |
DSpark drafter (5 layers and the Markov head) | 1,875,141,120 B |
vision-bf16.gguf |
23-layer ViT and merger | 655,423,872 B |
embed-tokens-bf16.gguf |
Token embedding, read one row per token | 1,852,638,208 B |
| All 52 parts | 118,182,291,328 B | |
release.json, tensor-manifest.json |
Part list and K/V contract; every stored tensor and every source tensor's disposition | |
FORMAT.md, RECIPE.md, SOURCE.md, EVALUATION.md |
Byte contract, recipe, provenance, measurements | |
conversion-receipts/, calibration/, quality/, tools/ |
Per-part records, calibration manifests, evaluation rows, the conversion scripts | |
memory-budget.json |
The memory plan the recipe was sized against | |
SHA256SUMS |
Every file |
The release does not repackage the tokenizer, chat template or configs. The engine reads them
from the source revision beside the parts and checks each against the SHA-256 it pins:
config.json, tokenizer.json, tokenizer_config.json, chat_template.jinja and
processor_config.json of thinkingmachines/Inkling-2-Small-MXFP8 at 086a047e. Files of a
later revision of that repository are refused.
set -e
# 1. Download and verify the release (about 118 GB)
hf download Baekpica/Inkling-2-Small-VQ-GGUF --local-dir Inkling-2-Small-VQ-GGUF
(cd Inkling-2-Small-VQ-GGUF && sha256sum -c SHA256SUMS)
# 2. The source revision's tokenizer, template and configs, beside the parts
hf download thinkingmachines/Inkling-2-Small-MXFP8 \
config.json tokenizer.json tokenizer_config.json chat_template.jinja processor_config.json \
--revision 086a047e8b7ff2ac902dd52355328ddb66b16914 --local-dir Inkling-2-Small-VQ-GGUF
# 3. Build ds4-dfm-rs and serve: the native 1M context, K/V past 262,144 positions on the SSD
git clone https://github.com/Baekpica/ds4-dfm-rs.git && (cd ds4-dfm-rs && make cuda-spark)
./ds4-dfm-rs/ds4-server --cuda -m Inkling-2-Small-VQ-GGUF --host 0.0.0.0 --port 8000
The server provides OpenAI-style /v1/chat/completions, /v1/completions and /v1/responses,
and Anthropic-style /v1/messages, with tool calls and base64 PNG or JPEG images.
reasoning_effort sets the template's thinking effort: none 0, low 0.2 (the default when a
request names none), high 0.9, max 0.99. Other plans:
# DSpark drafting (2–7 drafts): the default 1M plan cannot hold the drafter at the 4 GiB floor
./ds4-dfm-rs/ds4-server --cuda -m Inkling-2-Small-VQ-GGUF --mtp-mode on --mtp-draft 2 -c 131072 --mem-floor-gb 2
# Two concurrent banks
./ds4-dfm-rs/ds4-server --cuda -m Inkling-2-Small-VQ-GGUF --max-seqs 2 -c 131072 --mem-floor-gb 2
# Disk KV across restarts; or print the memory quote only
./ds4-dfm-rs/ds4-server --cuda -m Inkling-2-Small-VQ-GGUF --kv-disk-dir ~/.cache/ds4/inkling2-kv
./ds4-dfm-rs/ds4-server --cuda -m Inkling-2-Small-VQ-GGUF --check-config
The SSD tier writes an unlinked file in ~/.cache/ds4/kv-offload (6.75 GiB reserved at 1M;
DS4_KV_OFFLOAD_DIR moves it). The
ds4-dfm-rs Inkling-2 guide
has the memory plan, every flag and the measurements behind them.
--mem-floor-gb 2. Banks are opt-in for the same reason.image_red_blue golden was not compared: its probe image stayed on the
conversion host. The held-out images above cover the vision path.inkling2_mtp.py), which the engine follows.tools/vq_calib/), MIT. The NVFP4 K/V encoder and the DSpark
rate gate come from its MiniMax-M3.1 VQ support; the vision tower's linears, attention and GELU
from its DeepSeek V4.1 port by JLFN.The weights are derived from Inkling 2 Small, released by Thinking Machines Lab under the
Apache License 2.0; this conversion keeps that license (LICENSE).
Use is also subject to the Inkling acceptable use policy.
thinkingmachines/Inkling-2-Small