Skip to content

Final release: bit-exact KV shard with the disk prefix cache beside it - #40

Merged
data-angel merged 4 commits into
mainfrom
release/final
Oct 9, 2026
Merged

data-angel merged 4 commits into
mainfrom
release/final

Conversation

@data-angel

Copy link
Copy Markdown
Contributor

Final release: bit-exact KV shard, with the disk prefix cache beside it.

Engine

Enntity/atlas sparkglm/atlas-20261009-final @ b85befc6 = sparkglm/atlas-20261009 (e034500d) plus:

  • Disk prefix cache beside the KV shard (feat/kvshard-nvme): each Spark spills and restores only the latents it owns.
  • Bit-exact shard (feat/kvshard-exact): few-row MLA attention uses one canonical decomposition whether the shard is on or off, so turning it on changes no output bit.
  • Width-invariant rows (fix/canonical-history): one split count for every row count, so a row's bits no longer depend on the DFlash verify width beside it.

Launcher

  • SPARKGLM_KV_SHARD=1 no longer refuses the disk prefix cache; .env.example and the tests are updated.
  • Image build: compile jobs sized from free memory (ATLAS_BUILD_JOBS overrides). The in-image release checks run in their own Dockerfile stage (ATLAS_IMAGE_CHECKS=0 skips them). A cached rebuild on a Spark takes about 3 minutes.

Checks on the pair (engine b85befc6, dev binary, 4x1m profile)

  • Prompt-logprob hash (2,100 rows, two runs per arm): de6a323e9085 with the shard on and off.
  • Disk tier beside the shard (pool capped at 7,500 blocks, 8 × 25K conversations, 3 restores each): turns 2–4 are byte-identical to the resident arm, including turn 4's token logprobs. Both ranks show 16 restores, 32,800 spills and no rank disagreement. Restore median 27 µs/block, read 5.2 GB/s.
  • Before the width fix, the canonical form's split count followed the verify width (3–11 partitions), and turn 4's logprobs drifted by up to 0.55 after a restore. ATLAS_GLM_KV_CANONICAL=0 isolated it, and a new GPU test (a_row_does_not_depend_on_the_rows_beside_it) fails before the fix and passes after.
  • Decode cost (shard on, dev profile), before the width fix: C1 per-step speed within 0.3% of production e034500d; C4 aggregate 68.7 vs 70.1 tok/s, within noise. The fix adds about 10–25 µs per MLA layer at verify widths (microbench), roughly 0.2–0.5 ms per verify step.

🤖 Generated with Claude Code

data-angel and others added 4 commits October 8, 2026 23:21
The engine now spills and restores each rank's own half of the sharded latents
(Enntity/atlas feat/kvshard-nvme), so serve.py, start.sh and start-node.sh no
longer refuse the combination and the shard stays on whether or not
PREFIX_CACHE_DIR is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n stage (ATLAS_IMAGE_CHECKS=0 skips them)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 63918b5)
… cache beside it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…beside them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@data-angel
data-angel merged commit c9471a6 into main Oct 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant