Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9207fc2
server: compile for aarch64-windows (POSIX modes, COM vtable alignment)
plotarmordev Nov 22, 2026
0294bef
build: skip tf-muse on Windows, as its rank 1 follows over POSIX TP
plotarmordev Nov 22, 2026
57d20c4
build: compile-native-cuda-windows also checks the sm_121 aarch64 pro…
plotarmordev Nov 22, 2026
d53f4d8
cuda: glm_index_rope's turn is __noinline__, which nvcc with cl.exe a…
plotarmordev Nov 22, 2026
67ec38b
docs: n1x-run.ps1 runs Inkling 2 Mini on the RTX Spark laptop in thre…
plotarmordev Nov 23, 2026
b2ddc3d
docs: Inkling 2 Mini recipe names the N1X differences and its pending…
plotarmordev Nov 23, 2026
e5db560
tests: inkling2-mini-ref exits non-zero when its planted control diff…
plotarmordev Nov 23, 2026
b8ebd6f
contract: name the MLP128 tile's sm_120-only rule instead of the clus…
plotarmordev Nov 23, 2026
99bf651
docs: n1x-run.ps1 queries the N1X by name, as the laptop's nvidia-smi…
plotarmordev Nov 23, 2026
2a37918
docs: Inkling 2 Mini N1X run 1 on the laptop: build and checks pass, …
plotarmordev Nov 23, 2026
226b907
docs: GB10 job top-9defa53c0bfc confirms the planted control's non-ze…
plotarmordev Nov 23, 2026
484a03c
docs: n1x-run.ps1 times serving from the server's done lines and runs…
plotarmordev Nov 23, 2026
df6af47
docs: Inkling 2 Mini N1X run 2 receipt: checks pass, 32.2 tok/s at on…
plotarmordev Nov 23, 2026
b785448
docs: the GB10 script's planted control needs its differing tokens, n…
plotarmordev Nov 23, 2026
a86ccbd
docs: n1x-run.ps1 builds in two steps of at most 9 minutes (nvcc's im…
plotarmordev Nov 23, 2026
26de830
docs: n1x-run.ps1 keeps its zig build targets an array, as run 3's fa…
plotarmordev Nov 24, 2026
0e5960e
build: tf-cuda-test step installs the CUDA runner alone
plotarmordev Nov 24, 2026
2ce7e54
docs: n1x-run.ps1 builds tf-cuda-test and tensorfold-native a step ea…
plotarmordev Nov 24, 2026
2aa2a8c
build: key CUDA images by nvcc's bytes, as the side-effect nvcc --ver…
plotarmordev Nov 24, 2026
2c9228a
docs: n1x-run.ps1 builds tf-cuda-test's 37 contract images as their o…
plotarmordev Nov 24, 2026
ed0a702
docs: Inkling 2 Mini N1X run 6 receipt: all seven steps exit 0, 32.3 …
plotarmordev Nov 24, 2026
dc7fb7c
Merge remote-tracking branch 'origin/feat/188-inkling-2-mini-runs-who…
plotarmordev Nov 24, 2026
abc67b2
docs: bound N1X check, control and serve steps at 9 min like the buil…
plotarmordev Nov 24, 2026
1964849
docs: run-script's one planted control runs beside the float64 refere…
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
18 changes: 18 additions & 0 deletions changelog.d/243-inkling-2-mini-runs-on-net-s-rtx-spark-l.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Inkling 2 Mini on the RTX Spark N1X laptop (native Windows ARM64): the Windows fixes and its run steps

- Brings 189's Windows ARM64 fixes onto 188's Inkling 2 Mini engine: `__noinline__` in `glm_index_rope.cuh` and
`/wd4819` for nvcc with cl.exe, POSIX file modes and COM `@alignCast` in the server, no `tf-muse` on Windows, and
`compile-native-cuda-windows` checking the sm_121 aarch64 product.
- `docs/recipes/inkling-2-mini-cuda/n1x-run.ps1` runs Mini on the laptop through `codync@rtx-spark` in steps of under
10 minutes (nvcc's kernel images, the contract images `tf-cuda-test` embeds, `tf-cuda-test` alone through the new
`zig build tf-cuda-test` step, the server, 188's exactness checks, the reference's planted control, 1/4-stream
serving timed by the server's own `done` lines with the WDDM pool's peak), with no Python, installs or downloads; each
build step logs zig's output; it queries the N1X by name, as the laptop's
`nvidia-smi` also lists an NPU. Run 6 on the laptop: all seven steps exit 0, every check passes (32 of 32 greedy
tokens equal the float64 reference), 32.3 tok/s at one stream and 115.8 total at four, first token 0.099 s, pool
peak 23,324 MiB.
- `tf-cuda-test inkling2-mini-ref` exits non-zero when its planted control differs, as every other failure does; the
GB10 and N1X scripts require that exit and the plant's differing tokens, so a load or CUDA failure cannot pass it.
The kernel contract says the MLP128 tile is served only on sm_120 instead of blaming the cluster path on sm_121.
- CUDA kernel images are keyed by nvcc's own bytes instead of a side-effect `nvcc --version` capture, which was
rewritten every build and so missed every image's cache: each warm build ran nvcc on all of them again.
112 changes: 96 additions & 16 deletions docs/recipes/inkling-2-mini-cuda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,99 @@ Bandwidth limit: a decoded token reads about 5.55 GB of weights (core layers 3 p
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`).

## 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.
Job `top-9defa53c0bfc` at `2a37918af` reran it with the planted control's new exit: the control's 6 of 32 differing
tokens exit non-zero and the script goes on, ending 0 with 33.8 tok/s at one stream and 121.4 at four (3.59x).

Job `top-3546b0a66f9b` at `abc67b2d` ran the planted control after the reference instead of beside it: 0 and 6 of 32
differed as before (154.9 s and 150.8 s), 32.9 tok/s at one stream, then the 600 s window closed in the 4-stream
bench. The script runs its one planted control beside the reference.

## RTX Spark (N1X): native Windows ARM64 on Net's laptop

`n1x-run.ps1` runs the same checkpoint (`C:\models\Inkling-2-Mini-ed40e7da62`) on the laptop through its Codync bot
`codync@rtx-spark`, relayed by the Desk, one step a run. It installs and downloads nothing; the laptop has PowerShell
but no Python or WSL, so the 1/4-stream client is the script's own, not `bench_concurrent.py`.

1. `-Step fatbins`, `-Step images`, `-Step runner`, then `-Step server`: `zig build fatbins`, `zig build
kernel-contract-fatbins`, `zig build tf-cuda-test`, then `zig build native`, each `-Dsm=121 -Doptimize=ReleaseFast`
with the CUDA 13.5 `windows-arm64` nvcc and `cl.exe` arm64 (`vcvarsall arm64`). 189's Windows fixes are on this
branch (`__noinline__` in `glm_index_rope.cuh`, `/wd4819`, POSIX file modes and COM `@alignCast` in the server, no
`tf-muse`). Each stops at 9 min and prints its log's tail and the images installed; a cut-off step resumes from
the zig cache.
2. `-Step check`: 188's GB10 checks unchanged, so the laptop's output is held to the host reference the same way:
`kernel-contract "inkling2 loop"`, `inkling2-serving` and `inkling2-mini-ref` (32 greedy tokens equal to the float64
reference).
3. `-Step control`: the reference's planted control, which must exit non-zero with its tokens differing.
4. `-Step serve`: one server at `--parallel 4 --context 8192`, greedy 256-token replies at 1 and 4 streams; first token
and decode per stream come from the server's own `done` lines, with the ready time, the WDDM pool's peak
(`nvidia-smi -lms 500` in its own process) and the server's peak working set.

Steps 2-4 share the builds' 9-minute deadline: each `tf-cuda-test` call, the 240 s server-load wait and each request
is bounded by the step's remaining time, and a killed call prints its log's tail like a build step's.

What differs from the GB10 and is not copied from it:

- `nvidia-smi` there also lists an NVIDIA NPU, so the script finds the N1X by name and queries only its index;
`memory.used` over every device gave an array and stopped run 1's serve step.
- A cold build took 647 s (run 1) and 901 s (run 2) in one piece, over a run's 10 minutes, so nvcc's kernel images are
their own step; `install` also builds a dozen products this card never runs (run 4 below), so the runner and the
server are a step each, and the 37 images only `tf-cuda-test` embeds (DeepSeek's EXL3 units, the contract's
controls, H3) are a step before the runner (run 5 below). The host float64 reference takes 226 s on the laptop, so
the planted control is its own step: run 2 ran both in one step for 11 min 10 s.
- The serve step times replies from the server's log, not the client: run 2's client read the stream line by line and
spawned `nvidia-smi` per line, which put it at 6.7 tok/s at one stream while the server decoded at 32.2.
- Memory is the WDDM pool the firmware gives CUDA (51,816 MiB on this laptop), not `/proc/meminfo`; admission reads it
through `cuMemGetInfo_v2`. The 20 GB checkpoint leaves about 20 GiB of it for the cache and four streams.
- The power cap (42-49 W at about 2.1 GHz in HP Performance mode, near 1.4 GHz in power saving, from the 2026-11-04
receipt in [WINDOWS.md](../../WINDOWS.md)) bounds decode, so each run prints the power plan, limit and SM clock.

Run 1 at `b2ddc3de` (clean tree): build exit 0; check passed as in run 2; serve was ready in 55.3 s, then the NPU row
above stopped the script before any tok/s.

Run 2 at `2a37918a` (request `bb869e9b`, clean tree): one 15-minute `build` and one `check` with the control (11 min
10 s), both exit 0 with run 6's results; serve 32.2 tok/s at one stream, 117.0 total at four, pool peak 23,335 MiB.

Run 3 at `a86ccbd1` (request `39062c42`, clean tree): `-Step fatbins` exited 1 in 20 s with `no such step:
fatbins-Dsm=121`, as PowerShell unrolled the one-element target list to a string that `+` then appended to; the
script now keeps it an array.

Run 4 at `26de8309` (request `407e1d7b`, clean tree): `-Step fatbins` exited 0 in 83 s with 143 images; `-Step build`
(`install native`) stopped at 9 min twice without a compile error, building `tf-drama-quant`, `tf-qwen35-learn` and
the rest of `install` beside the two binaries the checks and serving run. Cold aarch64-windows ReleaseFast
cross-compiles on a Mac took 104 s for `tf-cuda-test` and 129 s for `tensorfold-native`, each on one core.

Run 5 at `2ce7e54c` (request `4fbd4d3b`, clean tree): `-Step fatbins` exited 0 in 122 s with nothing changed since
run 4's, and `-Step runner` stopped at 9 min twice with no output, while `-Step server` exited 0 in 449 s. Every
warm build had run nvcc on every image again: each image's cache key held a side-effect `nvcc --version` capture,
rewritten each build, so no step resumed. Images are now keyed by nvcc's own bytes (a second `fatbins
kernel-contract-fatbins` with a stand-in nvcc makes 0 of its 180 calls), the runner's 37 nvcc-only images are their
own step, and each build step logs zig's output. Serve passed again: ready in 55.2 s, 32.2 tok/s at one stream (first
token 0.098 s), 115.4 total at four, pool peak 23,119 MiB; check and control did not run without `tf-cuda-test`.

### Receipt: run 6 at `2c9228a8`, one capped run

Desk run on `codync@rtx-spark`, relayed by Capri, 24 Nov 13:56:50-14:27:27, warm folder `tf243-a86c`, clean tree.
`vcvarsall arm64` 0, cl 14.44.35207 HostARM64, nvcc 13.5 V13.5.37, zig 0.17.0; N1X sm_121, 48 SMs, 51,816 MiB,
driver 621.01, power plan Balanced. Each step is
`powershell -ExecutionPolicy Bypass -File docs\recipes\inkling-2-mini-cuda\n1x-run.ps1 -Step <step>`. This is one run
with these settings, not a benchmark.

| Step | Exit | Time | Result |
|---|---|---|---|
| `fatbins` | 0 | 84 s | 143 images |
| `images` | 0 | 151 s | 180 images |
| `runner` | 0 | 493 s | `tf-cuda-test` |
| `server` | 0 | 347 s | `tensorfold-native` |
| `check` | 0 | | `kernel-contract "inkling2 loop"` 5/5 pass gates 1-4, 2/2 controls red, 0 limit problems (101,376 B shared, 1024 threads; MLP128 sm_120 only); `inkling2-serving` PASS (CUDA equals the host reference token for token, fresh equals resumed, 2 lanes share rounds and a 3rd waits at 17.60 GiB weights); `inkling2-mini-ref` 0 of 32 greedy tokens differ (smallest margin 0.110) |
| `control` | 0 | | planted control 6 of 32 differ (positions 15, 18, 19, 38, 39, 42), its exit non-zero as required |
| `serve` | 0 | | ready in 58.5 s |

| Streams | First token | Decode a stream | Total decode | Failed |
|---|---|---|---|---|
| 1 | 0.099 s | 32.3 tok/s | 32.3 tok/s | 0 |
| 4 | 0.087-0.356 s | 28.5 / 28.8 / 29.1 / 29.4 tok/s | 115.8 tok/s (3.59x) | 0 |

Times are the server's `done` lines (256 tokens each). Peak GPU memory: the WDDM pool went from 2,714 MiB before the
server to 23,315 MiB after load and peaked at 23,324 MiB; the server's working set peaked at 3,973 MiB. The server
warned that `tfgrammar.dll` is missing (a source build). As deployments, not chips: this laptop decoded one stream at
32.3 tok/s against GB10's 32.5, and four at 115.8 against 117.8.
Loading