Repository navigation
Conversation
…ndings Live 2x GB10 investigation (docs/headroom-2026-09-11.md, logs/headroom-20260911/). Config and correctness now ship together so a fresh checkout gets the measured best. Decode / launch: - adaptive-k (GLM53_ADAPTIVE_K=ema) is the .env.example default; start.sh auto-adds the required union capture list when the knob is ema/on/1 (the stock list missed the 3- and 5-token graphs). Measured +10.3% hash-map prose, structured neutral (A/B/A, median of 5). - GLM53_SPINWAIT_MS=16 default (frozen sweep winner; re-checked at MNBT 7168). - dense FP8 documented as opt-in with 2026-09-11 KLD/decode numbers and enabled in this kit's .env (provisional numerics). Warmup: - boot-shape-warmup.sh: long-prefill rungs (3584/7168/14336/65536) so BuildPrefillChunkMetadataKernel does not JIT on a real request, payload staging through a file (long prompts exceeded ARG_MAX), and the outcome tally ignores the staged payload files. Prefix caching (the production 8.7% hit-rate cliff): - adopt PR MiaAI-Lab#83 overlay/patch_apc_per_group_retention.py: per-group retention; the EAGLE-exempt DFlash2 drafter no longer spends 33 of the 38 block ids a cached 3584-token segment costs and stops evicting the MLA/mamba blocks that carry the hit (GLM53_APC_RETENTION_INTERVAL_SWA, default auto). - adopt PR MiaAI-Lab#84 overlay/patch_apc_fine_grained_hits.py: exclude the KpoolTail scratch from the fine-grained veto, restoring 64-token hit alignment (GLM53_FINEGRAINED_APC=1). - cherry-pick vLLM #54163 as overlay/patch_dflash_block_drop.py: DFlash/DSpark must not take the EAGLE trailing-block back-off (use_eagle_block_drop); otherwise the Mamba state never materializes and every reply recomputes. - launcher hardening from the PRs: validate_overlay_artifacts fail-closed gate before restart stops anything, GLM53_OVERLAY_ORDER emitted identically to both rank containers, retention/bool knob validation, Dockerfile COPY/RUN. Live A/B boot B3 (same probes): 3-4 x 30k repeats 17.2s/0.000 hits -> 0.4s/1.000; 2 x 60k 34s/0.000 -> 0.4s/0.999; 4-agent x 60k turns 1-3 0.000 / wall 150-196s -> 0.916-0.928 / wall 18s; hash-map prose 34.50 tok/s and coherence unchanged. Host tests pass: test_launcher_rank_parity, test_apc_per_group_retention, test_apc_fine_grained_hits, test_dflash_block_drop_patch, test_hybrid_prefix_hit, test_spinwait_patch, test_indexer_workspace, test_kpool_tail_slotmap, test_xgrammar_termination, test_start_overrides, test_nccl_multi_hca.
Resolved by measurement, not by text: - Adopt upstream's launcher machinery as-is: overlay artifact gate, GLM53_OVERLAY_ORDER, retention knob validation/forwarding, tests, docs, start-tp4.sh, numeric-config changes. - Keep the MiaAI-Lab#83 per-group retention and the pre-MiaAI-Lab#130 hybrid APC overlays. The MiaAI-Lab#130 rework measured worse on this kit's agent probe (3x30k repeats 0.000 vs 1.000 hits; 2x60k 0.955 vs 0.999) across B4/B5 and was isolated from our DFlash block-drop patch by B6. Receipts: docs/headroom-2026-09-11.md section 12.3. - Keep our additions: fine-grained 64-token hits (PR MiaAI-Lab#84), vLLM #54163 block-drop cherry-pick, adaptive-k default + auto capture list, spinwait 16, dual-HCA GID preflight, portable jinja2 host check for the new chat-template validation (linuxbrew python3 lacks jinja2), long-prefill boot warmup rungs. Verification: all 12 host suites pass; B7 live re-validation on the merged launcher reproduces B3 (1x/3x/4x 30k repeats 1.000 at 0.3-0.4s, 2x60k 0.999, 3x5k 0.992; 4-agent x 60k turns 1-3 0.886-0.928, wall 17.7-23.6s). Merged upstream: origin/main @ 9348755 (PR MiaAI-Lab#130).
mmizutani
force-pushed
the
headroom-2026-09-11
branch
from
September 11, 2026 17:17
54b2acf to
71abe1f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Live 2× GB10 headroom investigation of this kit, the prefix-cache fix that came
out of it, and a measured merge of upstream PR MiaAI-Lab#130. Every number below was
measured on this 2× DGX Spark pair; raw receipts are under
logs/headroom-20260911/and the full write-up isdocs/headroom-2026-09-11.md.The headline finding: the production 8.7 % prefix-cache hit rate was a
server-side cliff, not a client, capacity, or config problem. Replaying the
exact deep-swe agent payloads on an idle engine hit where the live run missed;
a sequential probe showed 1–2 long sessions retain prefixes while 3+ lost them
entirely, independent of the 918 k-token pool. Root cause: the
mamba_cache_mode=align+ speculative-decoding bug family already tracked inthis repo (MiaAI-Lab#83, MiaAI-Lab#84, MiaAI-Lab#106) and upstream (vLLM #45238, #54094, #54163, #54076,
#55601).
What ships
Prefix caching (fixes the cliff)
overlay/patch_apc_per_group_retention.py— per-KV-group retention (PR Per-KV-cache-group prefix-cache retention: sparse drafter, dense MLA/mamba MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks#83semantics): the EAGLE-exempt DFlash2 drafter no longer spends 33 of the 38
block ids a cached 3584-token segment costs and stops evicting the MLA/mamba
blocks that carry the hit.
GLM53_APC_RETENTION_INTERVAL_SWA=(auto).overlay/patch_hybrid_prefix_hit.py— pre-APC: opt-in per-group retention, draft eviction priority, and safe DFlash replay MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks#130 hybrid APC (drafter SWAexcluded from the hybrid min; fine-grained eligibility).
overlay/patch_apc_fine_grained_hits.py— PR Re-enable fine-grained (64-token) prefix-cache hits (GLM53_FINEGRAINED_APC) MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks#84,GLM53_FINEGRAINED_APC=1:excludes the KpoolTail scratch from the fine-grained veto, restoring 64-token
hit alignment (was forced to the 3584-token page).
overlay/patch_dflash_block_drop.py— vLLM #54163 cherry-pick:use_eagle()includesdflash, so the scheduler took the EAGLEtrailing-block back-off that DFlash never pollutes; the Mamba state never
materialized at a block boundary and every reply recomputed the context.
Decode / launch (2026-09-11 re-measure)
GLM53_ADAPTIVE_K=emais the.env.exampledefault;start.shauto-addsthe required union capture list when the knob is on (the stock list missed the
3- and 5-token graphs). Measured +10.3 % hash-map prose, structured neutral.
GLM53_SPINWAIT_MS=16default.in this kit's
.env(provisional numerics).Boot warmup
scripts/boot-shape-warmup.sh: long-prefill rungs(3584/7168/14336/65536) so
BuildPrefillChunkMetadataKerneldoes not JIT on areal request, payload staging through a file (long prompts exceeded ARG_MAX),
tally ignores staged payloads.
Other included work
start.sh) +tests/test_nccl_multi_hca.py.(linuxbrew
python3lacks jinja2; the launcher now probes the caller'sinterpreter, then system interpreters;
GLM53_VALIDATE_PYTHONoverrides).Merge reconciliation with
origin/main(PR MiaAI-Lab#130)origin/mainadvanced to9348755("per-KV-cache-group APC retention withDFlash SWA replay"), synced into this fork's
main, which conflicted with thisbranch. The merge was resolved by measurement, not by text. Five same-probe
boots on this kit:
The metric is the global
prefix_cache_hits_total / queries_totaldelta over afill-then-repeat probe; wall time is ~0.4 s per 30 k repeat when it hits and
~17–20 s when it misses.
B6 isolates the cause from this branch's DFlash block-drop cherry-pick: the
difference is the reworked retention/replay overlays themselves. Upstream's own
qualification doc frames MiaAI-Lab#130 as "a draft contribution for maintainer
discussion", measured on 128 k append/edit/branch cases rather than repeat
growth. Resolution: this branch ships the MiaAI-Lab#83 overlay implementations
(live-validated) and adopts PR MiaAI-Lab#130's launcher machinery, artifact gate,
GLM53_OVERLAY_ORDER, retention knob validation, numeric-config changes, docsand non-overlay tests. The two overlay files (and their matching host tests)
are the only functional divergence; it is recorded in
docs/headroom-2026-09-11.md§12.3 and.env.example.Verification
test_launcher_rank_parity,test_numeric_config,test_apc_per_group_retention,test_hybrid_prefix_hit,test_apc_fine_grained_hits,test_dflash_block_drop_patch,test_spinwait_patch,test_indexer_workspace,test_kpool_tail_slotmap,test_xgrammar_termination,test_start_overrides,test_nccl_multi_hca.2×60 k 0.999, 3×5 k 0.992; 4-agent × 60 k bench turns 1–3
0.886–0.928 with per-turn wall 17.7–23.6 s (B3: 0.916–0.928 / 17.7–18.9 s;
before the fix: 0.000 / 150–196 s). Hash-map prose 33.5–34.5 tok/s,
coherence pass.
Remaining upstream items (not blocking)
the exact mamba grid.