Skip to content

KV pages: one core owner with reservation leases, Nemotron CUDA pilot (#781) - #935

Merged
ashhart merged 3 commits into
ashhart:mainfrom
jschmied:kv-pool
Oct 18, 2026
Merged

ashhart merged 3 commits into
ashhart:mainfrom
jschmied:kv-pool

Conversation

@jschmied

Copy link
Copy Markdown
Contributor

The first slice of #781, as agreed there: a model-free core layout and reservation owner, then Nemotron on CUDA. Rebased on main 46a08c1 (1.0.12).

Core (zig/src/core/kv_pool.zig)

  • Layout: fixed bytes, token bytes, page rows, snapshot slot bytes; need(prompt, max_tokens, window) = pages of prompt + max_tokens + 16.
  • plan: room, less the engine's own sequence (counted once), the other streams' fixed parts, the snapshot slots and the copied-KV budget, then pages. Never more pages than every other stream could hold at once.
  • Pool: page ids, holders, free list and promised count. Leases beside it: promise / unpromise / take / cover (rolls back if the table write fails) / adopt / share / finish. A promise that doesn't fit asks the store to reclaim first, then fails with LaneMemory. prompt_radix.pagesOf hands a Pool to the paged store as its Pages.
  • test-kv-pool: Nemotron's arithmetic (2,048 + 4,096 + 16 rows = 13 pages, 45.5 MiB). Every table write and every allocation fails in turn, and nothing leaks. 300 random admit/keep/resume/finish/cancel/failure runs through prompt_radix, with every page's holders checked after each step and everything free at the end. A lane host where a second request waits for the first stream's pages and runs when it ends; a LaneMemory requeue; past the whole pool alone, it fails in words.

Nemotron CUDA

  • The engine's own full-window sequence, its graphs and the lone fast path are unchanged.
  • The other --parallel streams get paged sequences made at load (64 MiB fixed each). Their K and V rows (6 attention layers + the MTP head, 7 KiB a token) come from one arena of 512-row pages.
  • Admission: the engine's own sequence is free, or the pool holds the request's pages.
  • kv_write, attn_chunk (and its prefetch and shared-window copies) and the prompt chunk's pattn read a page table at a fixed device address. A null table keeps the contiguous rows.
  • The copy store stays, with the MTP lookahead. It copies a paged sequence's rows page by page.
  • Snapshot Mamba states live in slots made at load. These replace the spares and the per-save cuMemAlloc. --prompt-cache-gib is split into slots and the copied rows' budget, and Store.most caps the number of states at the slot count.
  • The startup line shows the pool. An idle pool logs promised 0, free + store == total; slots free + held == count.
  • TF_KV_PAGES=0: a window per stream, as before. TF_KV_PAGES=all: every stream on pages (for checks; with --parallel 1 the one stream keeps the engine's own). TF_KV_POISON=1: NaN in pages a stream takes.
  • The captured Triton set and --slide keep a window per stream.

What 1.0.12 changed that touches this

  • prefill_attention.cu now shares one row body (prefill_attention_rows.cuh) between pattn_kernel, the tree kernel and the full kernel. The page table goes into that body; the tree and full kernels pass a null table, so LFM2 and the vision towers read contiguous rows as before (lfm2-attention and lfm2-vision output identical to main's).
  • Super VL (nemotron_h_omni) opens the same Nemotron engine, so its other streams take pages too. Its vision tower and image rows are engine-wide, not per stream, and ranks past 0 of a latent MoE hold no KV. Not run here (no checkpoint on this box).
  • GLM and the other CUDA families have no layout and keep a window per stream. The paging and slot code in native/cuda.zig (moved to native/cuda_kv_pool.zig) only applies to a family that declares it.
  • --learn-conversations reads disk states into a kept state, which takes a snapshot slot. The disk recall now frees a slot first, as the in-memory paths do (new test in rows_test.zig). Its probe at startup takes a slot after the slots are made.
  • --record with paged streams: the recorder reads the per-stream hidden rows, which every paged sequence has.

Checks (GB10, NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit, main 46a08c1 as reference)

  • zig build test, test-kv-pool, zig fmt --check pass. Lean check: 516 problems against main's 517.
  • tf-cuda-test glue: 1,365 of 1,365 comparisons equal, including the paged kernels against contiguous ones, alone and in shared windows, at page edges.
  • tf-cuda-test paged, pages shuffled and NaN-filled: the paged prompt pass and 24 decoded tokens equal the own sequence's. States at 511/512/513, 1023/1024/1025, 2047/2048/2049 and len-5 resume equal to fresh in both directions. tf-cuda-test resume passes.
  • Resumed == fresh:
    • reuse_served.py record on TF_KV_PAGES=all TF_KV_POISON=1 --parallel 4, replayed on TF_KV_PAGES=0 --prompt-cache-gib 0: 43 of 43 token SHAs equal.
    • The same record on main: identical SHAs and cached counts for all 44 rows. The 6 "not cached as planned" rows fail the same way on main (the tool's expectations: the lookahead's one row, and --min-prompt).
  • Seeded and greedy drafted == plain, and concurrent (4 at once) == solo: 24 of 24 with every stream paged, with the default split, and at --parallel 1. All three give main's SHAs.
  • Admission: with a 54-page pool, three 15,000-token requests ran one after another, each starting after the previous one ended. Idle log even.
  • reuse_served.py evict (1 GiB): same rows and SHAs as main. Its 3 expectation failures fail the same way on main.
  • --record with paging on: 24 of 24 token SHAs equal to the run without it. The recorded rows equal main's recording byte for byte (36 of 36 streams). Whether a stream's last row is recorded depends on how its verify windows fell, on main too.
  • --learn-conversations: after a restart, turn 2 read 5,255 tokens from disk, and its SHA equals a fresh pass.
  • Decode, alternated against main (--parallel 4, two rounds): fibonacci 77.8/78.1 tok/s on main, 78.0/78.1 on this branch; chat 55.1/55.3 vs 55.0/55.2. 4 streams, code: 193.6/225.3 vs 229.4/224.6.
  • 23 guard mutations (pool, lane host, store slot caps, disk recall, paged kernels, page copies, page release), each caught by a test.
  • Not run: Super VL and multi-rank tensor-parallel paging (no checkpoint, one Spark), and structured_served.py.

…shhart#781)

kv_pool.zig holds a family's stream layout (fixed bytes, token bytes, page rows, snapshot slot bytes), the load
plan (room less the engine's own sequence, the other streams' fixed parts, snapshot slots and copied KV, then
pages) and Pool: page ids, holders, the free list and the promised count. Leases promise, take, cover (with a
table write that rolls back on failure), adopt a store's resumed pages, share a kept page and finish. A promise
that does not fit asks the store to reclaim before it fails with LaneMemory. prompt_radix.pagesOf gives a Pool
to the paged store as its Pages.

test-kv-pool: the plan's arithmetic at Nemotron's numbers (a 2,048-token prompt with 4,096 reply tokens reserves
13 pages, 45.5 MiB); every table write and every allocation failing in turn; 300 random admit, keep, resume,
finish, cancel and failure runs through prompt_radix with every page's holders checked after each step and all
free at the end; a lane host whose second request waits for the first stream's pages, runs once it ends, and
fails in words past the whole pool. The fake target gains a reservation hook for this.
… core pool (ashhart#781)

The engine keeps its own full-window sequence, graphs and lone fast path as they were; it is counted once, in the
model's memory. The other --parallel streams get paged sequences made at load (64 MiB fixed each) whose K and V rows
(six attention layers and the MTP head, 7 KiB a token) live in one arena of 512-row pages from kv_pool. A request
reserves ceil((prompt + max_tokens + 16) / 512) pages at prefill; the lane host admits it when the engine's own
sequence is free or the pool holds its pages, and a promise that fails returns LaneMemory, so it waits.

The attention kernels (kv_write, attn_chunk, its prefetching and shared-window copies, the prompt chunk's pattn)
take a page table at a fixed device address and the elements between pages; a null table keeps the contiguous rows.
The copy store stays, with the MTP lookahead: it copies a paged sequence's rows page by page, its snapshots' Mamba
states sit in slots made at load (they replace the spares and the per-save cuMemAlloc), and --prompt-cache-gib is
split into those slots and the copied rows' budget, both out of the room before any page. The startup line shows
the pool; an idle pool logs promised 0 and free + store == total. TF_KV_PAGES=0 restores a window per stream,
TF_KV_PAGES=all puts every stream on pages for checks, TF_KV_POISON=1 fills taken pages with NaN.

Checks on GB10 with the MLX 4-bit checkpoint: tf-cuda-test glue (paged kernels byte-equal to contiguous ones,
alone and in shared windows, across page edges); tf-cuda-test paged (a paged sequence's prompt pass, decode and
states resumed both ways at rows 511-513, 1023-1025, 2047-2049 equal the own sequence's); reuse_served record on
a TF_KV_PAGES=all server against replay on a TF_KV_PAGES=0 server with the cache off: 43 of 43 token SHAs equal,
and all 44 rows equal main's record; greedy and seeded drafted == plain and concurrent == solo, 24 of 24, equal to
main's SHAs; a pool of 54 pages ran three 30-page requests one after another.

@cwschroeder cwschroeder left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed a9dfd3846fb0a12d959dc47f3652842081651691 against the first-pilot choices in #781. The core reservation/rollback paths and the CUDA table, sequence-capacity and snapshot-slot wiring look consistent in source. I ran zig build test-kv-pool on an M5 Max with Zig 0.17.0. Astra separately reviewed the core ownership paths and tests.

One small generic Store.most gap is reproducible: the reuses early exit runs before the entry-count limit. With the existing Fake.pooled, most = 1, spare storage available, and two different direct keeps at rows 4 and 6, both saves succeed and the store retains two entries.

The current Nemotron CUDA snapshot adapter has no reuses callback, so this does not demonstrate a memory fault in the pilot. It does violate the new generic count limit.

I put a two-file patch together: require entries.len < most on the reuse exit too, with a regression through the real Store. The test checks one retained entry, one live snapshot, the newer state and exactly one eviction.

Check Result
New regression on the unchanged PR Fails: expected 1 entry, found 2
Proposed guard, complete cache/disk test root 98/98 pass
test-kv-pool, whole-tree format and whitespace Pass
Lean 516 findings against main's 517, 0 new

Astra also reviewed the fix and test without a remaining source blocker. The proposed patch also passes the complete local zig build test, test-kernel-contract, test-golden and fuzz-cortheon commands, plus whole-tree format and whitespace checks; the goldens have 0 unexpected differences. I have not run a CUDA kernel, model, Super VL, multi-rank or performance test; the device receipts in the description remain the author's measurements.

@jschmied

Copy link
Copy Markdown
Contributor Author

@cwschroeder, thank you. Your patch is in as 197db0ca, unchanged. Without the guard, the new test fails here as well (expected 1, found 2). With it, zig build test and test-kv-pool pass, zig fmt --check is clean, and lean is at 516.

The only family that sets most is the Nemotron CUDA pool (cuda_kv_pool.zig:52), which has no reuses. flashnext_host has reuses but keeps the default most, so for now the guard changes nothing at runtime.

@cwschroeder

Copy link
Copy Markdown
Contributor

Confirmed at 197db0cae4341a978bd40cb4eff9ef6d618cf541: its complete file tree (26f8120aca5a665e2af29be78234ac28f2fb5f43) is identical to the proposed and locally tested 9d130fd5 candidate. All four current-head GitHub checks are green. The generic count-limit finding is resolved in this revision.

I also checked the adapter distinction: cuda_kv_pool sets most without reuses, while the Flash Next host installs reuses with the default count limit. Agreed that this is a core-contract safeguard for that combination, not evidence of a present pilot memory fault or performance gain. My earlier review's device-test limits still apply.

@ashhart

ashhart commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Thank you, @jschmied, the reservation, table-failure and holder-conservation tests make the three #781 pilot choices concrete.

We checked 197db0c. The copy store keeps its MTP lookahead, leases sit beside one Pool owner, and the engine's full-window sequence is charged once before planning extra streams. prompt_cache.zig:464 also closes the generic reuses/count-limit case.

This is ready for the core and scoped Nemotron pilot landing checks. We will retain paging-off/all/poison, disk recall, record and full-token controls, and run the still-open Super VL, multi-rank and structured-output cells on the integrated source before extending coverage. No new source blocker appeared in this focused ownership read.

Posted by Ash's AI Assistant Synthena

@ashhart
ashhart merged commit ecfa803 into ashhart:main Oct 18, 2026
4 checks passed
ashhart added a commit that referenced this pull request Oct 18, 2026
… cap, Module.holds and paged attention changed them

The serving-identity pin came with Living Weights pinned against a base without Drama's process-wide allocation cap
(cuda/memory.zig), Module.holds (cuda/module.zig) or #935's paged attention (nemotron_attention.cu,
prefill_attention.cu and prefill_attention_rows.cuh), so it failed on the first of them. Those files now pin the
bytes those reviewed landings left, and cuda/root.zig's approved hash is the Living Weights exports over them. The
learning changes it guards are unchanged: every other serving file still has its released bytes or an approved
append.
ashhart added a commit that referenced this pull request Oct 18, 2026
The dense family's pin of its serving CUDA sources failed on prefill_attention.cu, which #935's reviewed paged attention changed (an optional page table and page stride; the contiguous path's arithmetic is the same). Its other twelve pins and the launch argument sequence still match.
ashhart added a commit that referenced this pull request Oct 18, 2026
… 13.0 and 13.2 from every SM's image

Living Weights brought 95 Flash Next and shared training launches and 34 dense ones, and #935 six paging launches,
all with zero records that kept the CUDA resource gate red until measured. kernel-contract-limits over every SM's
fatbins (sm_80, 86, 89, 120 and 121) gives their usage: nvcc 13.0's go in the records, and the 37 launches 13.2
compiles otherwise (their registers, mostly) join the 13.2 set from registry_learning.zig. Two serving records were
zeroed for re-measurement and come back as they were (fn_attn_prep and fn_qsa_pool, whose sources Living Weights
did not change), and of the two vision launches in the prefill attention image #935 changed, full_kernel<72>'s
record takes its new usage. The pending sets' red tests become checks that every measured record fits every SM,
and the per-compiler set test finds overrides among all the audited records.
ashhart added a commit that referenced this pull request Oct 18, 2026
… lost with the learning records

cda734f7d put tf_nemo_attn_chunk_segs's 13.2 usage (78 to 97 registers, 45,568 static bytes) in registry_learning.zig
beside the learning launches, so the Living Weights revert dropped it and 13.2's limits marked the launch stale on
sm_120 and sm_121. It now sits in paging_pending.zig with the launch's 13.0 record.
@ashhart

ashhart commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Thank you, @jschmied, for the page owner, and @cwschroeder for the reuse guard. 1.1.0 includes #935 (ecfa8031b) as the Nemotron CUDA pilot. Streams lease attention pages as they grow and return them at completion; failed reservations roll back. One startup budget accounts for pages and prompt states, keeping states on device when the requested cache fits and using host fallback otherwise. Model/image operators, shared drafting and prompt caching retain their existing ownership. Draft/plain, cache/resume, concurrent/solo, conservation and resource results: Host ownership and GB10 serving passed; RTX PRO 6000 cache counts matched 12/12 on-device, 4/12 with oversized host fallback.

Posted by Ash's AI Assistant Synthena

BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
…re owner, with leases for the streams beside the engine's own

ashhart#935's page owner, reservation leases, rollback and the Nemotron pilot, on this line's kept prompt states: a snapshot
is an owned device buffer for tool callers, a borrowed slot for a configured device cache, or a pinned host state on
a discrete card that cannot hold the cache asked for (the startup line says which), and device and host copies walk
the bound page sequence. Startup reserves a host cache's one staging buffer before it plans the page pool and refuses,
naming the bytes it needs and has, when the room is short; keep 0 reserves and allocates nothing. Every paged
constructor's cleanup and Pages.deinit drain before an owner is released. The six paging launches and the changed
prefill attention image stay unqualified until their records are measured. test-kv-safety-host and test-kv-merge-host
run the actual startup, planner and constructors under allocation and completion faults, with the tests named for what
they check.

Co-authored-by: Christian Schröder <[email protected]>
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
… cap, Module.holds and paged attention changed them

The serving-identity pin came with Living Weights pinned against a base without Drama's process-wide allocation cap
(cuda/memory.zig), Module.holds (cuda/module.zig) or ashhart#935's paged attention (nemotron_attention.cu,
prefill_attention.cu and prefill_attention_rows.cuh), so it failed on the first of them. Those files now pin the
bytes those reviewed landings left, and cuda/root.zig's approved hash is the Living Weights exports over them. The
learning changes it guards are unchanged: every other serving file still has its released bytes or an approved
append.
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
…urce

The dense family's pin of its serving CUDA sources failed on prefill_attention.cu, which ashhart#935's reviewed paged attention changed (an optional page table and page stride; the contiguous path's arithmetic is the same). Its other twelve pins and the launch argument sequence still match.
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
… 13.0 and 13.2 from every SM's image

Living Weights brought 95 Flash Next and shared training launches and 34 dense ones, and ashhart#935 six paging launches,
all with zero records that kept the CUDA resource gate red until measured. kernel-contract-limits over every SM's
fatbins (sm_80, 86, 89, 120 and 121) gives their usage: nvcc 13.0's go in the records, and the 37 launches 13.2
compiles otherwise (their registers, mostly) join the 13.2 set from registry_learning.zig. Two serving records were
zeroed for re-measurement and come back as they were (fn_attn_prep and fn_qsa_pool, whose sources Living Weights
did not change), and of the two vision launches in the prefill attention image ashhart#935 changed, full_kernel<72>'s
record takes its new usage. The pending sets' red tests become checks that every measured record fits every SM,
and the per-compiler set test finds overrides among all the audited records.
BlivionIaG pushed a commit to BlivionIaG/TensorFold that referenced this pull request Oct 20, 2026
…record, lost with the learning records

cda734f7d put tf_nemo_attn_chunk_segs's 13.2 usage (78 to 97 registers, 45,568 static bytes) in registry_learning.zig
beside the learning launches, so the Living Weights revert dropped it and 13.2's limits marked the launch stale on
sm_120 and sm_121. It now sits in paging_pending.zig with the launch's 13.0 record.
Bizuayeu added a commit to Bizuayeu/TensorFold that referenced this pull request Oct 21, 2026
…core pool

Every stream made a sequence sized for the window on its first bind, and admission priced every
stream at that size: at a 1M window, 12.9 GiB a rank whatever the conversation's length. The
family now declares a kv_pool.Layout (ashhart#781), as Nemotron does (ashhart#935): a stream's fixed part and
13,056 bytes a token in pages of 512 rows. The server plans the pool beside the engine's own
full-window sequence, counted once, and attach makes the paged sequences and the pages. A request
takes the pages of its prompt, its reply and one verify window when it starts and gives them back
when it ends; admission waits while the pool lacks them. The prompt cache keeps its copied rows
beside the pages.

TF_KV_PAGES chooses which streams page. auto, the default, pages from three ranks up and keeps a
window each below: on two GB10s the room left after the weights (6 to 9 GiB) is under the default
16 GiB prompt cache, which the plan funds after a page a stream and before any other page, so the
pool would hold little more than a page a stream. on pages every stream past the engine's own at
any rank count, off (or 0, as for Nemotron) gives every stream a window as before, and all puts
every stream on pages for checks, the engine's own sequence left idle. TF_KV_POISON=1 fills a
stream's pages with NaN before its rows are written, as for Nemotron.

On more than one rank, rank 0 plans by the smallest room and sends the pool's size in a new pool
step; every rank makes the same pool, and each stream's begin step carries its page ids, which
the other ranks write to their tables without taking pages of their own. A page size that
differs between the ranks is refused by name.

With --kv-cache fp8 the streams keep their windows: auto does not page, and on and all are refused
by name (Fp8OnPages), as the FP8 cache's scales have no place on a page yet.
@jschmied
jschmied deleted the kv-pool branch October 23, 2026 21:02
Bizuayeu added a commit to Bizuayeu/TensorFold that referenced this pull request Oct 24, 2026
…core pool

Every stream made a sequence sized for the window on its first bind, and admission priced every
stream at that size: at a 1M window, 12.9 GiB a rank whatever the conversation's length. The
family now declares a kv_pool.Layout (ashhart#781), as Nemotron does (ashhart#935): a stream's fixed part and
13,056 bytes a token in pages of 512 rows. The server plans the pool beside the engine's own
full-window sequence, counted once, and attach makes the paged sequences and the pages. A request
takes the pages of its prompt, its reply and one verify window when it starts and gives them back
when it ends; admission waits while the pool lacks them. The prompt cache keeps its copied rows
beside the pages.

TF_KV_PAGES chooses which streams page. auto, the default, pages from three ranks up and keeps a
window each below: on two GB10s the room left after the weights (6 to 9 GiB) is under the default
16 GiB prompt cache, which the plan funds after a page a stream and before any other page, so the
pool would hold little more than a page a stream. on pages every stream past the engine's own at
any rank count, off (or 0, as for Nemotron) gives every stream a window as before, and all puts
every stream on pages for checks, the engine's own sequence left idle. TF_KV_POISON=1 fills a
stream's pages with NaN before its rows are written, as for Nemotron.

On more than one rank, rank 0 plans by the smallest room and sends the pool's size in a new pool
step; every rank makes the same pool, and each stream's begin step carries its page ids, which
the other ranks write to their tables without taking pages of their own. A page size that
differs between the ranks is refused by name.

With --kv-cache fp8 the streams keep their windows: auto does not page, and on and all are refused
by name (Fp8OnPages), as the FP8 cache's scales have no place on a page yet.
Bizuayeu added a commit to Bizuayeu/TensorFold that referenced this pull request Oct 24, 2026
…core pool

Every stream made a sequence sized for the window on its first bind, and admission priced every
stream at that size: at a 1M window, 12.9 GiB a rank whatever the conversation's length. The
family now declares a kv_pool.Layout (ashhart#781), as Nemotron does (ashhart#935): a stream's fixed part and
13,056 bytes a token in pages of 512 rows. The server plans the pool beside the engine's own
full-window sequence, counted once, and attach makes the paged sequences and the pages. A request
takes the pages of its prompt, its reply and one verify window when it starts and gives them back
when it ends; admission waits while the pool lacks them. The prompt cache keeps its copied rows
beside the pages.

TF_KV_PAGES chooses which streams page. auto, the default, pages from three ranks up and keeps a
window each below: on two GB10s the room left after the weights (6 to 9 GiB) is under the default
16 GiB prompt cache, which the plan funds after a page a stream and before any other page, so the
pool would hold little more than a page a stream. on pages every stream past the engine's own at
any rank count, off (or 0, as for Nemotron) gives every stream a window as before, and all puts
every stream on pages for checks, the engine's own sequence left idle. TF_KV_POISON=1 fills a
stream's pages with NaN before its rows are written, as for Nemotron.

On more than one rank, rank 0 plans by the smallest room and sends the pool's size in a new pool
step; every rank makes the same pool, and each stream's begin step carries its page ids, which
the other ranks write to their tables without taking pages of their own. A page size that
differs between the ranks is refused by name.

With --kv-cache fp8 the streams keep their windows: auto does not page, and on and all are refused
by name (Fp8OnPages), as the FP8 cache's scales have no place on a page yet.
ashhart pushed a commit that referenced this pull request Oct 25, 2026
…core pool

Every stream made a sequence sized for the window on its first bind, and admission priced every
stream at that size: at a 1M window, 12.9 GiB a rank whatever the conversation's length. The
family now declares a kv_pool.Layout (#781), as Nemotron does (#935): a stream's fixed part and
13,056 bytes a token in pages of 512 rows. The server plans the pool beside the engine's own
full-window sequence, counted once, and attach makes the paged sequences and the pages. A request
takes the pages of its prompt, its reply and one verify window when it starts and gives them back
when it ends; admission waits while the pool lacks them. The prompt cache keeps its copied rows
beside the pages.

TF_KV_PAGES chooses which streams page. auto, the default, pages from three ranks up and keeps a
window each below: on two GB10s the room left after the weights (6 to 9 GiB) is under the default
16 GiB prompt cache, which the plan funds after a page a stream and before any other page, so the
pool would hold little more than a page a stream. on pages every stream past the engine's own at
any rank count, off (or 0, as for Nemotron) gives every stream a window as before, and all puts
every stream on pages for checks, the engine's own sequence left idle. TF_KV_POISON=1 fills a
stream's pages with NaN before its rows are written, as for Nemotron.

On more than one rank, rank 0 plans by the smallest room and sends the pool's size in a new pool
step; every rank makes the same pool, and each stream's begin step carries its page ids, which
the other ranks write to their tables without taking pages of their own. A page size that
differs between the ranks is refused by name.

With --kv-cache fp8 the streams keep their windows: auto does not page, and on and all are refused
by name (Fp8OnPages), as the FP8 cache's scales have no place on a page yet.
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.

3 participants