Kalibrated Loop β DeepSeek-V4.1-Flash-1017 (TF_DS_DEPTH=2) for 2Γ NVIDIA DGX Spark
Kalibrated Loop brings recurrent-depth looping (TF_DS_DEPTH=2, running core layers L24β35 twice + coda L36β39) natively to Zig + CUDA (sm_121) TensorFold TP2 on 2Γ NVIDIA DGX Spark (GB10, 128 GB unified memory each) β directly on top of EXL3 2.9 bpw weights, with DSpark MTP speculative decoding (d=5), bit-exact NVMe KV spill persistence, and zero rebuild of the 106 GB rank caches.
- Source patch, Python oracle, eval harness & raw receipts:
GaelicThunder/Kalibrated-Loop-DeepSeek-V4.1-2x-DGX-Spark - Adapter weights credit: the
adapter/r5a-000300/weights (35.4M params, FP32, 136 MB) were trained and released by Jason Titus (jasontitus/dsv41-loop-eval/jasontitus/mlx-stq-trainer). They are mirrored here with SHA-256 checksums for one-command deployment alongside our nativesm_121TensorFold binaries and source patch.
hf download GaelicThunder/DeepSeek-V4.1-Flash-1017-Kalibrated-Loop --local-dir ./kalibrated-loop
What is in this repo
| Path | Size | Contents |
|---|---|---|
adapter/r5a-000300/ |
136 MB | Mirror of Jason Titus' R5-A@300 loop adapter (sushi-dsv41-loop-v1, FP32, SHA256SUMS). |
prebuilt-sm121-cuda133/ |
53 MB | Prebuilt aarch64 / sm_121 (DGX Spark, CUDA 13.3) native binaries from TensorFold-next7-loop v1.1 (tensorfold-native, tf-dsv41-lanes, tf-dsv41-loop-check, SHA256SUMS). |
prebuilt-sm121-cuda133-next9/ |
54 MB | Prebuilt aarch64 / sm_121 (CUDA 13.3 / NGC 26.07, Zig 0.17.0) binaries for next9-loop v1.2 (0052β0055, 0070β0085, deliver() UAF fix, SHA256SUMS). |
prebuilt-sm121-cuda134-next9/ |
54 MB | Prebuilt aarch64 / sm_121 (CUDA 13.4 / NGC 26.10, Zig 0.17.1) binaries for next9-loop v1.2 (tensorfold-native, tf-dsv41-lanes, tf-dsv41-loop-check, SHA256SUMS). |
kit-cubins-sm121-cuda134/ |
56 MB | Recompiled sm_121 EXL3 v19/v7 cubins on CUDA 13.4 (experts.cubin, experts_cb.cubin, linear.cubin, linear_grouped.cubin, SHA256SUMS; +14.6% prefill). |
patches/tensorfold-next6-to-next7-loop.patch |
219 KB | Unified source diff on top of TensorFold-next6 (next7-loop v1.1, Apache-2.0). |
patches/tensorfold-next7-loop-to-next9-loop.patch |
260 KB | Unified source diff (next7-loop β next9-loop v1.2: keyed draft, GPU draw, /snapshot, prefill slice, expert prune/cap, deliver() UAF fix). |
assets/ |
2.0 MB | Hero banner, v1.1 monospace benchmark chart, and v1.2 release card. |
Measured Results (2Γ DGX Spark, Plus-Ten EXL3 2.9 bpw + Keys)
| Metric | Stock (DEPTH=1) |
Kalibrated Loop (DEPTH=2, R5-A@300) |
Delta |
|---|---|---|---|
GPU kernel parity (tf-dsv41-loop-check) |
β | 34/34 PASS (0β1 ulp / bitwise) |
--fmad=false deterministic |
Gate 0 (DEPTH=2 LOOP_ZERO=1 vs DEPTH=1) |
baseline | 100% bit-exact | |ΞNLL| = 0.00e+00, identical SHA-256 & MTP counts |
| NLL β Code (1,606 tok) | 0.5344 |
0.4948 |
-7.43% (3/3 better) |
| NLL β Italian (1,524 tok) | 0.9005 |
0.8274 |
-8.12% (3/3 better) |
| NLL β English prose | 1.7204 |
1.5767 |
-8.35% (3/3 better) |
| NLL β Hermes tool calls (576 tok) | 0.5402 |
0.4759 |
-11.90% (3/3 better) |
LiveCodeBench v6 r13 (13 hard, strict / lenient) |
9/13 / 9/13 |
9/13 / 10/13 |
+1 lenient (arc192_e) |
LiveCodeBench r13 β 32k cap hits |
4 |
1 |
4Γ fewer truncations |
LiveCodeBench r13 β mean thinking tokens |
25,468 |
21,295 |
-16.4% |
LiveCodeBench r13 β DSpark acceptance |
56.5% (2.35 tok/r) |
57.4% (2.37 tok/r) |
+0.9 pp (no collapse) |
LiveCodeBench r13 β decode speed |
63.9 tok/s |
47.2 tok/s |
-26.1% (+16.7% wall-clock) |
| Native Zig decode (code / math / tools suite) | β | 60.4 tok/s (60β75 t/s peak) |
+39% vs Python MTP, 2.4Γ vs Python serial |
| GPQA-Diamond (25 paired, 16k cap) | 20/25 (80.0%) |
20/25 (80.0%) |
0 (flat; all failures were cap hits) |
| NVMe KV Spill restore (across restart) | β | 8,192 tok + 12 pass_ring planes in 2.03s |
bit-exact (0 CRC/size errors, 7.29 MB/rank) |
Key Takeaways & Honest Caveats
- DSpark MTP does not degrade under looping: all 3 DSpark target taps (
[37, 38, 39]) sit in the coda after the looped core ([24, 36)), so speculative acceptance holds (57.4%vs56.5%stock) and native Zig decode stays fast (47β75 tok/s). - NVMe KV spill stays isolated and bit-exact:
next7-loopv1.1 appends the 12 core.pass_ringplanes tospill_state.zigand addsLoopTag {mode, round, core, digest}tofingerprint.zig, keepingDEPTH=1spill stores untouched and byte-identical tonext6. - What did NOT improve: GPQA-Diamond stayed flat at
20/25(theR5-A@300checkpoint is a 300-step English-code SFT adapter, not RLVR-trained on science QA), and raw decode speed pays-26%for the 12 extra active MoE layers (partially offset by-16.4%shorter thinking traces ->+16.7%wall-clock onr13). - Memory footprint:
+228 MiB/rankGPU arena (+310 MiBactive RAM on rank 0). Boots in 45s on 2Γ DGX Spark with4 Γ 400klanes on a1Mshared KV pool.
v1.2 (next9-loop + NGC 26.10 / CUDA 13.4 / Zig 0.17.1) Speedups
- Lossless (
TF_DS_T26_KEYED_DRAFT=1,TF_DS_T27_DEVICE_DRAW=1,TF_DS_RDMA_CPUS=19):+4.2%sampled decode (42.84 β 44.65 t/s, 100% bit-exact SHA parity),/snapshotpool/session telemetry,0070β0072NVMe spill restore-after-drop, and a concurrency use-after-free fix inLaneHost.deliver(). - Opt-in
0053(TF_DS_T13_EXPERT_PRUNE=0.88,3,TF_DS_T13_EXPERT_CAP=16,2,TF_DS_T15_PLACE_BOUND=1): verified clean ondsv41-loop'sstore_y=falseLoRA path;51.91 tok/s(+21.2%,59.0 t/scode,68.2%draft acceptance) on CUDA 13.3 (26.07) and51.13 tok/s(+19.4%) with1,951 tok/sprefill (+14.6%) on CUDA 13.4 (26.10+kit-cubins-sm121-cuda134). Opt-in & lossy by design (EXPERT_PRUNE=offreverts to 100% lossless).
Credits & License
Full credit to every upstream author whose work makes this stack possible:
- Adapter weights (
R5-A@300, 35.4M FP32) & recurrent-depth training: Jason Titus (jasontitus/dsv41-loop-eval,jasontitus/mlx-stq-trainer,@jasontitus). sushi-dsv41-loop-v1export format & Zig reference (sushiPR #280): Beamsters (beamivalice/sushi,@Beamsters1).- TensorFold: Ash Hart (
ashhart/TensorFold,@ashxhart). - Native Zig DeepSeek-V4.1 TP2 CUDA engine & DGX Spark optimizations: Bertholomus AI (
bertholomus/TensorFold,@bertholomusai) and Blackwellboy (BLACKFOLD,TF_DS_ENGRAM_LEAD,TF_FILL_CHUNKS). - 2Γ DGX Spark
next6patch series (NVMe KV spill, CUDA graph cap, RDMA nap, draft calibration): MiaAI-Lab (MiaAI-Lab/DeepSeek-v4.1-Flash-1017-2x-DGX-Sparks,@MiaAI_lab). - Python TensorFold TP2 & container recipe: JJ Eaton (
@jayleaton) and Luis Catacora (@lucataco). - Base model, EXL3 2.9 bpw Plus-Ten & Keys abliteration: DeepSeek-AI, LibertAIDAI, and drowzeys (
drowzeys/keys-DeepSeek-V4.1-Flash-1017-Abliterated). - Discovery / spotlight: Ivan Fioravanti (
@ivanfioravanti). - License: Apache-2.0 (see
LICENSEandNOTICE).
Model tree for GaelicThunder/DeepSeek-V4.1-Flash-1017-Kalibrated-Loop
Base model
deepseek-ai/DeepSeek-V4.1-Flash-1017

