Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
aeb9cb0
inkling2: Mini's shapes on Small's kernels under the contract
jschmied Nov 21, 2026
913847b
cuda experts: Inkling 2 Mini's stored experts, MXFP8 and soft-capped …
jschmied Nov 21, 2026
eed574b
cuda experts: Inkling's w13 interleaves gate and up rows; E8M0 byte 0…
jschmied Nov 21, 2026
b3463dd
local: stack C1
jschmied Nov 21, 2026
ffdc247
local: stack C3
jschmied Nov 21, 2026
1e2b326
core: visit_plan, a looped stack's steps and state slots; Dory's sche…
jschmied Nov 21, 2026
fe7de25
inkling2: Mini's host side (H2): loop_config, visits on core/visit_pl…
jschmied Nov 21, 2026
8027871
inkling2: Mini's forward at one rank on CUDA (C4a): 48 visits, loop g…
jschmied Nov 21, 2026
332e966
inkling2: Mini behind lanes.Backend and the native CUDA registry (C4b…
jschmied Nov 21, 2026
b15dd11
inkling2: Mini decode speed (C4c): graphs, fused input projections, g…
jschmied Nov 21, 2026
75a0c39
inkling2: accept Mini host config and checkpoint names
ashhart Nov 21, 2026
0841f67
inkling2: model the Mini loop on the host
ashhart Nov 21, 2026
41807f3
inkling2: run checkpoint-packed experts on CUDA
ashhart Nov 21, 2026
7ce4e9c
inkling2: run Mini loop math on CUDA
ashhart Nov 21, 2026
a775a32
inkling2: serve Mini text on one CUDA rank
ashhart Nov 21, 2026
c40710c
lanes: make full lone-window commits opt-in
ashhart Nov 21, 2026
ece3a40
inkling2: add Mini Metal kernels and contracts
ashhart Nov 21, 2026
bbcb8ee
inkling2: serve Mini natively on Metal
ashhart Nov 21, 2026
11c3e3c
inkling2: document Mini fixture and reference provenance
ashhart Nov 21, 2026
e718511
inkling2: normalize before CUDA query reductions
ashhart Nov 21, 2026
840a700
inkling2: control packed-expert contracts by phase
ashhart Nov 21, 2026
5acab1f
inkling2: fix native Metal Mini admission and serving
ashhart Nov 21, 2026
0577913
inkling2: prove Mini CUDA serving equivalence
ashhart Nov 21, 2026
56de510
inkling2: compile Mini CUDA tests against current lane types
ashhart Nov 21, 2026
7e30540
inkling2: link Metal host tests on macOS
ashhart Nov 21, 2026
2a8cdd6
inkling2: fix nonfinite prompt expert launches
ashhart Nov 21, 2026
dd60cf1
inkling2: refresh Mini limits and quiet shape refusal
ashhart Nov 21, 2026
3e0e9bc
inkling2: complete native Metal admission and serving tests
ashhart Nov 21, 2026
dc2ca8a
inkling2: Mini prompt-cache states (C4d) and the experts' round_caps …
jschmied Nov 21, 2026
557c8e2
Merge upstream #4387 (ashhart): Inkling 2 Mini on CUDA and Metal
plotarmordev Nov 22, 2026
cab3575
Inkling 2 Mini on TOP: the run script finds the checkpoint first
plotarmordev Nov 22, 2026
d933489
Inkling 2 Mini: what differs on RTX Spark and what must change to bui…
plotarmordev Nov 22, 2026
c5d2dcf
Merge upstream #4364 (jschmied): inkling2: Mini's shapes on Small's k…
plotarmordev Nov 22, 2026
338488d
Merge upstream #4365 (jschmied): cuda experts: Inkling's w13 interlea…
plotarmordev Nov 22, 2026
dd94105
Merge upstream #4441 (jschmied): inkling2: Mini prompt-cache states (…
plotarmordev Nov 22, 2026
49a44d4
inkling2: size the retained engine plan to its layers
plotarmordev Nov 22, 2026
7b83a96
inkling2: upload each sliding attention norm once
plotarmordev Nov 22, 2026
2c43113
inkling2: keep retained gate and sink projections raw
plotarmordev Nov 22, 2026
58b0b22
inkling2: unify the merged host plan and module contracts
plotarmordev Nov 22, 2026
1a56f10
inkling2: complete native inventory and prompt-cache registration
plotarmordev Nov 22, 2026
87a27b6
inkling2: port native checkpoint loading to current core exports
plotarmordev Nov 22, 2026
7ff7dfe
Inkling 2 Mini on TOP: serving checks, float64 reference and 1/4-stre…
plotarmordev Nov 22, 2026
5994b00
lanes: compare opt-in lone keeps against main's default count, not a …
plotarmordev Nov 22, 2026
3d5584c
contract: Inkling 2's sm_121-only launches wait in cuda_pending for t…
plotarmordev Nov 22, 2026
4b8ed02
gitleaks: #4365's stored-experts comment is prose, not a key
plotarmordev Nov 22, 2026
2e5361c
Inkling 2 Mini on TOP: build, check and serve in the run script; the …
plotarmordev Nov 22, 2026
9226939
contract: Mini's ops mix declares its width once after the #4364 merge
plotarmordev Nov 22, 2026
b7c72ce
inkling2: Mini snapshots copy each key head's ring rows (the CUDA cac…
plotarmordev Nov 22, 2026
e0b919c
inkling2 serving test: name the resumed case, cut and first differing…
plotarmordev Nov 22, 2026
2dc74c1
inkling2: use one global attention path across prompt cuts
plotarmordev Nov 22, 2026
8cf739e
inkling2: store loop messages in role-major planes for serving
plotarmordev Nov 22, 2026
0888899
docs: note Mini role-major loop message fix
plotarmordev Nov 22, 2026
588299b
inkling2 serving: compare sampled draws on device BF16 basis
plotarmordev Nov 22, 2026
822e8e1
inkling2: one sequence state and CUDA stream a --parallel lane; share…
plotarmordev Nov 22, 2026
2301ab3
Inkling 2 Mini on TOP: host memory from /proc/meminfo, 4-stream gate …
plotarmordev Nov 22, 2026
4d2358e
docs: Inkling 2 Mini GB10 receipt at 1 and 4 streams with the bandwid…
plotarmordev Nov 22, 2026
987ab29
inkling2 metal: budget a target state per stream; read the first logp…
plotarmordev Nov 23, 2026
9f542e6
inkling2: serve inkling2_loop through jschmied's #4441 engine; drop #…
plotarmordev Nov 23, 2026
54bf2c7
docs: Inkling 2 Mini GB10 receipt on #4441's engine: 32.5 tok/s at on…
plotarmordev Nov 23, 2026
128bd7a
inkling2: contract the served loop.cu message and gate kernels; refus…
plotarmordev Nov 23, 2026
354f41c
docs: llama.cpp baseline reads the Desk's staged GGUF and b12611 source
plotarmordev Nov 23, 2026
184bef5
docs: llama.cpp baseline links libggml-cuda against the toolkit and d…
plotarmordev Nov 23, 2026
fbbd43c
contract: gate the loop launches on their FP64 intervals, not a midpo…
plotarmordev Nov 23, 2026
e0e5c6a
docs: llama.cpp baseline stops when llama-server exits and prints its…
plotarmordev Nov 23, 2026
e425283
docs: Inkling 2 Mini compare.sh runs TensorFold and llama.cpp in one …
plotarmordev Nov 23, 2026
91dd60e
docs: llama.cpp baseline scores its picks teacher-forced on the float…
plotarmordev Nov 23, 2026
43a9d14
docs: Inkling 2 Mini GB10 receipt from top-bde5d508e589 at fbbd43cbe:…
plotarmordev Nov 23, 2026
dda1be7
Merge remote-tracking branch 'origin/feat/188-inkling-2-mini-runs-who…
plotarmordev Nov 23, 2026
a529ce7
docs: Inkling 2 Mini compare.sh builds llama-server as its own phase,…
plotarmordev Nov 23, 2026
0754e13
inkling2: refuse block counts past the residual mixes' eight and head…
plotarmordev Nov 23, 2026
276e99a
inkling2 metal: drop the unused in-flight forward option
plotarmordev Nov 23, 2026
827a058
docs: leave the llama.cpp baseline to card 232
plotarmordev Nov 23, 2026
c624b5f
docs: Inkling 2 Mini job bounded by timeout 600, server ready in 3 mi…
plotarmordev Nov 23, 2026
4f55bab
docs: Inkling 2 Mini job bounds its measurement, not the cold build, …
plotarmordev Nov 23, 2026
740b0b4
docs: llama.cpp baseline runs llama-server on the staged toolchain's …
plotarmordev Nov 23, 2026
d2a0776
docs: Inkling 2 Mini README names the 18.2 GiB text shard and upstrea…
plotarmordev Nov 24, 2026
700945c
Merge remote-tracking branch 'origin/feat/188-inkling-2-mini-runs-who…
plotarmordev Nov 24, 2026
b657446
docs: Inkling 2 Mini compare.sh names where TensorFold's side of the …
plotarmordev Nov 24, 2026
4a5089e
docs: Inkling 2 Mini job runs the reference's planted control beside …
plotarmordev Nov 24, 2026
cf8985f
docs: Inkling 2 Mini README sets llama.cpp's UD-Q4_K_M GGUF beside Te…
plotarmordev Nov 24, 2026
898b8ea
docs: Inkling 2 Mini GB10 receipt from top-0b05213c9f06 at 4a5089e70:…
plotarmordev Nov 24, 2026
941dbad
docs: llama.cpp baseline times the code prompt uncached at one stream…
plotarmordev Nov 24, 2026
5bd99a7
docs: record uncached prompt receipt and stop baseline on timeout
plotarmordev Nov 24, 2026
1a19197
Merge origin/main into feat/188: nvfp4 prompt tiles carry #4493's pai…
plotarmordev Nov 24, 2026
f116edc
Merge remote-tracking branch 'origin/feat/188-inkling-2-mini-runs-who…
plotarmordev Nov 24, 2026
bac1a26
docs: Inkling 2 Mini comparison takes 188's merged head receipt, mark…
plotarmordev Nov 24, 2026
599cf82
Merge pull request #155 from plotarmordev/feat/232-inkling-2-mini-on-…
plotarmordev Nov 24, 2026
752eb27
Merge remote-tracking branch 'origin/main' into feat/188-inkling-2-mi…
plotarmordev Nov 24, 2026
fce7a34
Merge remote-tracking branch 'origin/feat/188-inkling-2-mini-runs-who…
plotarmordev Nov 24, 2026
0ecea66
inkling2 metal: keep main's padded-vocabulary mask stride and its ref…
plotarmordev Nov 24, 2026
90c2b6f
inkling2 metal: keep main's per-head snapshot rows and their cross-ca…
plotarmordev Nov 24, 2026
ee3d93f
inkling2 metal: keep main's norm binding and relative-row stride thro…
plotarmordev Nov 24, 2026
ac50aab
inkling2 metal: keep main's real-checkpoint serving test order and fr…
plotarmordev Nov 24, 2026
e958959
inkling2 cuda: drop #4387's loop engine again, which the merge of ori…
plotarmordev Nov 24, 2026
f6fa4b1
inkling2 cuda: run main's cross-prompt resume check against #4441's e…
plotarmordev Nov 24, 2026
22fb325
changelog: #188 keeps main's Metal fixes and the cross-prompt check
plotarmordev Nov 24, 2026
29f8128
docs: Inkling 2 Mini CUDA receipt from the exact-head job top-a96a7d6…
plotarmordev Nov 24, 2026
9e63d3b
Merge remote-tracking branch 'origin/main' into feat/188-inkling-2-mi…
plotarmordev Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
5be42d15e99da7a7197fbf1e618b62ab31a25ade:tools/zig/nemotron_parse_reference.py:generic-api-key:33
5be42d15e99da7a7197fbf1e618b62ab31a25ade:tools/zig/nemotron_parse_reference.py:generic-api-key:34
5be42d15e99da7a7197fbf1e618b62ab31a25ade:tools/zig/nemotron_parse_reference.py:generic-api-key:35
913847b4d4a06c1cb380ba63c2156b0f621be34b:zig/tests/cuda/stored_experts_check.zig:generic-api-key:73
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel
- Qwen3.8-27B on Metal with `TF_QWEN27_METAL_KV_PAGES=1`: Macs with tensor units (M5) take the flag instead of refusing it, and a paged prompt pass finds each 512-key chunk's two pages once instead of reading the page table at every 32-key step, with every token and cache row unchanged (#3180, part of #1293). Thanks to @CodingEmil.
- Nemotron 3.5 Lightning on HIP: the MTP head file is read at the width its own metadata states, so it drafts beside an oQ checkpoint of any width, and a head at a width the launches do not read is refused by name (#3251, part of #3061). Thanks to @gilby.

- Inkling 2 Mini (`inkling2_loop`) now serves natively on one CUDA rank and on Metal. CUDA runs the 48-visit text loop's cross-pass messages, rank-64 gates and separate sliding Q/K/V inputs with per-visit KV and convolution state, prompt snapshots and exact rollback; routed experts decode stored NVFP4 and MXFP8 weights to bf16 with the reference's rounding and ascending-expert FP32 accumulation, without activation quantization. Metal's default serving path stays unchanged, while opt-in DSpark drafting preserves target tokens and rolls back exactly. CUDA TP, vision and DSpark loading remain refused by name.

- Inkling 2 on CUDA: the family's grouped-expert launches match main's `tf_exl3_grouped_2` bit for bit under the kernel contract, and the vision tower's kernels pass gates 1 to 4 (refs #3476). Thanks to @ajensenwaud.

- Tests: the served-evidence concurrency test pairs its two generated streams in the fake server, so a busy runner can no longer decode them one after the other and turn it red; other conformance fixtures keep their pacing.

- GLM-5.3-Flash on CUDA at tensor-parallel widths where a rank's fused KDA input is not a multiple of eight columns (TP=3, 5, 6 or 7): the stack is padded at load to its own width rounded up to eight columns and stays row-major bf16, so prompt windows take the staged B16 tiles with every byte as before; `TF_GLM_KDA_PAD=1` still tiles the stack for glm_mm (#3697, for #3516). Thanks to @ultradaoto.
Expand Down
4 changes: 2 additions & 2 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ extracted headers, with the same revision annotation. No revision was derived fr
`release_chat_template.jinja` and `release_tokenizer_config.json` in the same folder are byte-identical copies of that
revision's `chat_template.jinja` and `tokenizer_config.json`, under the same license.

The Mini loop host/reference implementations in `zig/src/families/inkling2/loop.zig`, `loop_model.zig`, `loop_engine.zig`,
`loop_math_cuda.zig`, the CUDA and Metal loop kernels and the stored-expert implementations in `modelopt.zig` and
The Mini loop host/reference implementations in `zig/src/families/inkling2/loop.zig`, the CUDA and Metal loop kernels
and the stored-expert implementations in `modelopt.zig` and
`zig/kernels/cuda/inkling2/modelopt.cu` are independent TensorFold implementations of the supplied math-only Mini
specification. Its primary reference is huggingface/transformers PR #51050 at head `6173a2f6`: the Mini configuration and
forward pass in `models/inkling2_loop/modular_inkling2_loop.py` and `modeling_inkling2_loop.py`, with the temporary
Expand Down
1 change: 1 addition & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ pub fn build(b: *std.Build) void {
@import("zig/build/h3_image_contract.zig").steps(b, target, optimize);
@import("zig/build/h3_image_vision.zig").steps(b, target, optimize, test_step);
@import("zig/build/ling_host.zig").tests(b, target, test_step);
@import("zig/build/visit_plan_host.zig").tests(b, target, test_step);
@import("zig/build/inkling2_host.zig").tests(b, target, test_step);
@import("zig/build/gpt_oss_host.zig").tests(b, test_step);
@import("zig/build/digest.zig").steps(b, test_step, draft_ids, build_options);
Expand Down
24 changes: 24 additions & 0 deletions changelog.d/188-inkling-2-mini-runs-whole-on-our-spark-g.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Inkling 2 Mini on CUDA: jschmied's #4441 engine registered, with #4387's checks and a whole-model run on TOP

- Merges Ash's #4387 and jschmied's C1 (#4364), C3 (#4365) and H2 + C4 (#4441) with their commits. `inkling2_loop`
is now served by #4441's engine (graphs, fused input projections, every stream's rows in one forward); #4387's
separate loop engine, which the merge of `main` brought back, stays removed, so CUDA no longer advertises structured
output it refused.
- #4387's serving checks (device draws against host selection, fresh against resumed prompts, a prompt resumed after
another prompt resumed its prefix, two streams in shared rounds against each alone) run against #4441's engine.
Copy drafting is not checked: that engine has no draft path yet.
- The merge of `main` keeps its Metal Mini fixes: a window's grammar masks step by the padded vocabulary's words; a
snapshot copies each key head's live rows, so it restores into a cache of another capacity; norm binds where `sp_norm`
reads; a later stream of a shared forward reads its relative rows where prep wrote them; and the real-checkpoint
serving test draws the first token before its row.
- `docs/recipes/inkling-2-mini-cuda/run-script.sh` runs the original checkpoint on TOP's GB10: the serving checks,
the float64 reference and its planted control, then first-token time, prompt speed, decode speed, memory
(`/proc/meminfo`) and the bandwidth limit at 1 and 4 streams; 4 streams must give 1.5 times one stream's total.
After the build, every check and both levels run inside `timeout 600`.
The recipe's README notes what RTX Spark (native Windows and WSL2) needs.
- `tf-cuda-test kernel-contract "inkling2 loop"` checks the served `loop.cu` message mix and three gate launches
against FP64 references, with planted controls (an aliased block, a gate reading the wrong role plane).
- Metal Mini admission budgets a target state for every stream, so concurrent full-window requests no longer run out
of state; the Metal checkpoint check reads the first logprob row after the first token, and an expired token
handle (more than 4,096 draws old) is refused instead of reading a newer token.
- A forward with token id `vocab` is refused before any launch (host test).
10 changes: 10 additions & 0 deletions changelog.d/232-inkling-2-mini-on-our-spark-size-speed-a.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Inkling 2 Mini against llama.cpp on TOP's GB10

- `docs/recipes/inkling-2-mini-cuda/compare.sh` builds llama.cpp b12611's CUDA `llama-server` from the Desk's staged
sources and serves Unsloth's UD-Q4_K_M GGUF at the CUDA receipt's settings, with each engine's file bytes,
`peak-memory.py`'s server peak, and greedy and teacher-forced agreement with the float64 reference.
- The recipe README sets it beside TensorFold's receipt from 188 (jobs `top-b77911768550`, `top-c0075bd36227`
against `top-0b05213c9f06`): 38.8 against 32.9 tok/s at one stream, 85.9 against 117.9 at four, 15.47 against
18.78 GiB of weights, and 106.4 against 199.4 tok/s uncached at one-stream prompt processing. llama.cpp's
free-running text matches the reference continuation when re-tokenized, but its teacher-forced picks match 31 of 32
reference tokens; TensorFold matches 32 of 32.
92 changes: 92 additions & 0 deletions docs/recipes/inkling-2-mini-cuda/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Inkling 2 Mini on TOP's GB10

`run-script.sh` runs thinkingmachines/Inkling-2-Mini (revision `ed40e7da62`) whole on TOP's Spark through the Desk's
GPU door. The job has no network, so the checkpoint must already sit in the pilot folder as `Inkling-2-Mini` (or
`models/Inkling-2-Mini`); the script refuses and lists the Inkling configs under `/assets` when it does not.

The server is jschmied's #4441 engine (`inkling2.native`, model type `inkling2_loop`, on his #4364 and #4365): graphs,
fused input projections and one batched forward for every stream's rows in a round. #4387's checks run against it.
Upstream, jschmied closed #4441 on 23 Nov as superseded: Mini on CUDA goes through #4387's engine there (#4640, then
#4697, #4718, #4728 and #4729 for speed). This branch is local; an upstream claim must move to that stack first.
The script fails on any of: `tf-cuda-test kernel-contract "inkling2 loop"` (the served message and gate kernels
against FP64 references, with their planted controls), `tf-cuda-test inkling2-serving` (#4387's checks), `tf-cuda-test inkling2-mini-ref` (32
greedy tokens equal to the float64 host reference), that reference's planted control staying green, a failed stream
in `tools/bench_concurrent.py` at 1 and 4 streams, or 4 streams giving under 1.5 times one stream's total tok/s. The
receipt also sets one stream's decode against GB10's bandwidth limit: the weight bytes a token reads (from the
checkpoint's headers) over 273 GB/s.

## Receipt: TOP's GB10, one capped run

Job `top-a96a7d63bedf` at `22fb3250e`, `--context 8192`, greedy, 256 tokens, 3 reps, medians; the build ran first, then
every check and both levels inside `timeout 600`. This is one run with these settings, not a benchmark.

| Streams | First token (code / chat) | Prompt (code) | Decode a stream (code / chat) | Total decode (code / chat) | Failed |
|---|---|---|---|---|---|
| 1 | 0.076 s / 0.097 s | 197.4 tok/s | 32.9 / 33.1 tok/s | 32.9 / 33.1 tok/s | 0 |
| 4 | 0.187 s / 0.207 s | 83.4 tok/s | 29.9 / 30.3 tok/s | 117.7 / 121.1 tok/s | 0 |

The 4-stream gate takes each level's better prompt: 121.1 over 33.1 tok/s, 3.66x. Every stream sends the same prompt,
so the four streams route to the same experts; mixed traffic may give a lower 4-stream rate.

Checks in the same job: the CUDA engine matched the host reference token for token, fresh and resumed prompts gave
identical logits and tokens, a prompt resumed after another prompt resumed its prefix equalled the fresh one, and two
lanes in shared rounds kept their tokens; 0 of 32 greedy tokens differed from the float64 reference (smallest reference
margin 0.11), and its planted control (no messages) differed at 6. The kernel contract passed gates 1-4 on all 5 loop
kernels with both planted controls red.

Memory, sampled after each step (not process peaks): host used (`/proc/meminfo`) was 12.3 GiB before the server,
33.5 GiB with Mini loaded for 4 streams and 33.4 GiB after both levels; the server held 20.0 GiB of GPU memory
(`nvidia-smi`).

Bandwidth limit: a decoded token reads about 5.55 GB of weights (core layers 3 passes, 8 of 128 experts a visit, the
whole unembedding), so 273 GB/s caps one stream near 49 tok/s; 32.9 tok/s is 67% of it. #4387's own engine, removed
here, gave 5.7 tok/s at one stream and 9.4 at four on the same GB10 (job `top-0759755a0515`).

## Against llama.cpp: Unsloth's UD-Q4_K_M GGUF on the same GB10

`compare.sh` builds llama.cpp b12611's CUDA `llama-server` from the Desk's staged sources, checks the GGUF's sha256
(`78fcedcf…34ae`), the gcc archive and the b12611 source tree, and serves it at the receipt's settings (4 slots of
8,192 positions, all layers on the GPU, greedy, 256 tokens, 3 reps, medians). Job `top-b77911768550` at `b65744605`;
the uncached one-stream prompt and source pin were checked by job `top-c0075bd36227` at `941dbada`. TensorFold's column
is the receipt above.

| | TensorFold (bf16 safetensors) | llama.cpp (UD-Q4_K_M) |
|---|---|---|
| Weights on disk | 20,161,820,584 bytes (18.78 GiB, with the 635,801,416-byte draft head `mtp.safetensors`) | 16,610,544,608 bytes (15.47 GiB) |
| Decode, 1 stream (code / chat) | 32.9 / 33.1 tok/s | 38.8 / 39.1 tok/s |
| Decode total, 4 streams (code / chat) | 117.7 / 121.1 tok/s | 85.9 / 87.6 tok/s |
| 4 streams over 1 | 3.66x | 2.24x |
| First token, 1 stream (code / chat) | 0.076 s / 0.097 s | 0.067 s (slot cache hit) / 0.130 s |
| Prompt, 1 stream (code, uncached) | 197.4 tok/s | 106.4 tok/s (15 tokens / one-token response time; median of 3) |
| Prompt, 4 streams (code) | 83.4 tok/s | 43.0 tok/s (cold requests only) |
| Memory, server loaded | 20.0 GiB GPU (`nvidia-smi`) | 18.1 GiB GPU (`nvidia-smi`); peak 20.57 GiB: 18.18 GPU + 2.38 resident |
| Continuation text / teacher-forced tokens vs float64 reference | 32 of 32 token picks | Same free-running text when re-tokenized / 31 of 32 token picks (differs at 5) |

`bench_concurrent.py` warms up with the same code prompt before measuring: llama.cpp's slot cache answers every
one-stream request, so its code first token is a cache hit and `prompt_ttft_tps` is null (only cold requests
qualify). The separate uncached `/completion` measurement above supplies the missing one-stream comparison; it times
the full one-token response (0.14 s) rather than first streamed token, so its client latency includes that token's
transfer. At 4 streams the prompt figure is likewise the median of cold requests only; later rounds likely reuse the
slots the first filled, so it is about one round's requests rather than a median of 3. llama.cpp decodes one stream
18% faster from 18% fewer weight bytes on disk (15% fewer without the draft head, which `serve` does not load); at 4
streams TensorFold's total is 37% higher. TensorFold's memory is a sample after loading, not
`peak-memory.py`'s process peak. Quality: llama.cpp's free-running text matches the 32-token reference continuation
when re-tokenized, but its teacher-forced token picks agree at 31 of 32 positions (different at position 5);
TensorFold's token picks agree at all 32 positions.

## RTX Spark (N1X): what differs and what must change

I see the same chip and memory model as the GB10: sm_121 and one unified pool, so the `-Dsm=121` kernel images are
the same. What differs is the host. RTX Spark runs Windows on Arm, with WSL2 as the
Linux route. From #1010 (`5b1f10812`) and #2107:

- Native Windows builds as `aarch64-windows` with VS 2022 Build Tools' ARM64 C++ tools (`vcvarsall arm64`) as nvcc's
host compiler and the CUDA 13.4 `windows-arm64` redistributables (winget has no arm64 installer). Admission reads the
WDDM pool through `cuMemGetInfo_v2`, and `nvidia-smi`'s NPU row is filtered out.
- Under WSL2 `/proc/meminfo` is WSL's RAM (about 30 GiB of 128 GB), not the GPU's 96 GB WDDM pool; with
`WSL_DISTRO_NAME` set, admission reads the CUDA pool instead (`TENSORFOLD_UNIFIED_HOST_COUNTS` overrides it).
- For Mini on native Windows, I need the Inkling CUDA kernels compiled with MSVC as nvcc's host front end (only gcc 14
has built them so far) and one load of the 18.2 GiB text shard (`model-00001-of-00001.safetensors`) through Windows'
threaded reads.
- For Mini under WSL2, I need neither: it is the Linux build with gcc 14. Only the pool reading above differs.
- Either way, the GB10's exactness checks must be repeated on the N1X. No N1X run of Mini exists yet.
20 changes: 20 additions & 0 deletions docs/recipes/inkling-2-mini-cuda/compare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
# Inkling 2 Mini on TOP's GB10, llama.cpp's side of the README's comparison:
# swarm gpu-run plotarmordev/TensorFold SHA docs/recipes/inkling-2-mini-cuda/compare.sh
# Prints each engine's weight files on disk (TensorFold's include the draft head mtp.safetensors, which serve does not
# load), builds llama-server, then measures it under peak-memory.py with the measured part capped at 10 minutes.
# TensorFold's side is run-script.sh's own job (its float64 reference alone takes over 4 minutes); the README sets the
# two side by side.
set -eu
here=docs/recipes/inkling-2-mini-cuda
pilot=/assets/drama3-pilot
bytes() { stat -L -c %s "$@" 2>/dev/null | awk '{s += $1} END {printf "%.0f bytes (%.3f GiB)", s, s / 2^30}'; }
echo "RESULT tensorfold bf16 checkpoint: $(bytes "$pilot"/Inkling-2-Mini/*.safetensors "$pilot"/models/Inkling-2-Mini/*.safetensors)"
echo "RESULT llama.cpp UD-Q4_K_M GGUF: $(bytes "$pilot/inkling-gguf/Inkling-2-Mini-UD-Q4_K_M.gguf")"
start=$(date +%s)
sh "$here/llama-cpp-build.sh"
echo "build: $(($(date +%s) - start)) s"
start=$(date +%s)
# llama-server runs as the toolchain's loader (llama-cpp-build.sh), so that is the program peak-memory.py watches
timeout 600 python3 "$here/peak-memory.py" ld-linux-aarch64.so.1 sh "$here/llama-cpp-baseline.sh"
echo "measure: $(($(date +%s) - start)) s"
Loading