Kaynağa Gözat

dsv41: ctx 1M -> 512K — decode +50% (71.5 t/s counting), Aiden base analyzed

- 512K: KV pool 13.52 GiB; 1M was costing ~35% of decode (per-step
  indexer at 1M row width)
- gap to Aiden boot-1 (84 t/s) closed 1.75x -> 1.17x; remainder = their
  B12X (+9%) + DCP2 (+9%)
- recipe cites the AidenLab write-up (production-1.2 naming corrected);
  hub check: only production-1.0 public, DCP2 image not pushed yet
Alexander Korolev 1 ay önce
ebeveyn
işleme
0a39b6fdec

+ 39 - 0
history/night-shifts/2026-09-11.md

@@ -127,3 +127,42 @@ thinking ON + reasoning_effort=max by default, served alias
 Note: the 156/176 bench above was measured at thinking OFF (their default);
 thinking-on + max-effort scoring is unmeasured — offer a re-bench if the
 operator wants the apples-to-apples number for the new default.
+
+## DSV4.1 ctx 1M → 512K (boot #5, operator decision) + Aiden base analysis
+
+Operator: "контекст в 512К" + correction: Aiden's page says
+production-1.1 where it should say **production-1.2** (the DCP2-baked
+image; the page is not updated to the end). Recipe now: 524288 ctx, gmu
+0.85, recipe header cites the AidenLab write-up.
+
+Boot #5 results (512K, gmu 0.85):
+- KV pool **13.52 GiB** (vs 11.39 at 1M — the indexer prefill buffer
+  halves, ~2.6 vs ~5.2 GiB).
+- **Counting decode (thinking off): 47.9 → 71.5 t/s (+50%)** — the 1M
+  context was costing ~35% of decode throughput (per-step indexer
+  scoring grows with max context). Thinking on (default): 65.8 t/s.
+- vs Aiden's boot-1 (300K, same stack, 84 t/s counting): gap closed from
+  1.75× to 1.17× — the remainder is exactly their B12X MoE (+9%) and DCP2
+  (+9%) ≈ 18% they ship. Our stack at 512K is at parity with their
+  pre-b12x baseline.
+
+Aiden base (aidenle.com, extracted from the SPA JS bundle):
+- Boot 1 = tonyd2wild boot-10 config = our recipe; +3 changes: B12X MoE
+  backend (b12x==1.3.0 wheel, `--moe-backend b12x`: decode 81→89-93,
+  prefill 9K +22%), explicit `--kv-cache-memory-bytes` (8 GiB = 1.26M
+  tokens, head 9 GB free; 10 GiB = 2 GB free — too close to earlyoom),
+  day-0 official `_C_stable_libtorch` reuse (their build seconds vs our
+  hours — provenance choice, ours is clone-at-pin from source).
+- DCP2 (21→23 patch files, `PROFILE=dcp2`, 5 env switches, image
+  production-1.1/1.2): KV 1,888,800 tokens at 300K (6.3×), decode
+  93.6/64.4/31.5 (1.2), 128K prefill 60.5 s (2,150 t/s), 8-way soak clean,
+  their prod since 08:58. DCP halves KV bytes per rank (window+compressed
+  caches sharded over compressed states), decode cost 5-9%.
+- Docker Hub `aidendle94/sparkrun-vllm-dsv41-gb10`: **only
+  production-1.0 published** (9 GB arm64, b12x + 8GiB KV, no DCP2) —
+  1.1/1.2 not pushed; their DCP2 image A/B is blocked until Aiden
+  publishes it (or the 23-file set lands for our tree).
+
+Next candidates: (a) A/B bench of our 512K config (thinking on, the new
+default) for the apples-to-apples number; (b) b12x into our image;
+(c) DCP2 23-file set from Aiden into our clone-at-pin build.

+ 14 - 7
recipes/dsv41-flash-4x/recipe.toml

@@ -18,15 +18,22 @@
 #   rows — padded speculative batches hang SM120 sparse MLA, FlashInfer
 #   #5015), DSpark k=5 with the checkpoint's own draft layers, tools +
 #   vision on.
-#   * GMU 0.85 (their 0.80): the ~1M indexer prefill buffer (~5.2 GiB)
-#     needs the extra budget; KV pool grows ~6 GiB over 300K.
-#   * 1M ctx (their boot7-go proof: 1,078,380-token pool at gmu 0.80/eager;
-#     at graphs + gmu 0.85 the pool has headroom). Note: their top-k fix
-#     was validated at row widths up to 300K — the full 1M-wide decode is
-#     unproven territory even for them; watch long prompts.
+#   * GMU 0.85 (their 0.80): the indexer prefill buffer grows with max
+#     context (~5.2 GiB at 1M, ~2.6 GiB at 512K); the extra budget keeps
+#     the KV pool at ~11 GiB (≈1.6M tokens) with host headroom.
+#   * 512K ctx (2026-09-11, operator): matches the GLM prod convention
+#     (524288) and stays inside the row width their top-k fix was
+#     validated for (300K measured, 1M-wide never re-run even by them).
+#     The 1.6M-token pool gives 3× headroom at 512K.
 #   * thinking ON + reasoning_effort=max by default (request can override
 #     via chat_template_kwargs), served as "deepseek-v4-flash" (gateway
 #     alias, no config churn).
+#
+# Reference: Aiden's write-up of the same stack + their deltas (B12X MoE
+# backend, explicit KV budget, DCP2 port) —
+# https://aidenle.com/recipes/deepseek-v4-1-flash-4x-dgx-spark/
+# (page says production-1.1 in places; the DCP2-baked image is
+# production-1.2 — the page was not updated to the end).
 
 engine = "vllm"
 name = "DeepSeek-V4.1-Flash MXFP4 (dsv41 img, 4x, DSpark k=5, Engram-on-disk)"
@@ -48,7 +55,7 @@ args = [
     "--trust-remote-code",
     "--distributed-executor-backend", "mp",
     "--gpu-memory-utilization", "0.85",
-    "--max-model-len", "1048576",
+    "--max-model-len", "524288",
     "--max-num-seqs", "8",
     "--max-num-batched-tokens", "8192",
     # boot-4 fix: the V4 indexer backend refuses the smallest-listed block