Repository navigation
multi-GPU: second GPU as an opt-in expert-cache tier with P2P rows (--peer-device), part 1 of #204 - #229
multi-GPU: second GPU as an opt-in expert-cache tier with P2P rows (--peer-device), part 1 of #204#229q8atnight wants to merge 1 commit into
Conversation
… N): adaptive peer cache, rows over P2P, the peer computes its experts' prompt rows (compact buffers, pipelined out, streaming ring); default output unchanged
|
Peer tier on 2x RTX 2080 Ti 22GB (PCIe P2P, no NVLink) — part 1 compiles and runs on sm_75,
Measured with that (Qwen3.8-Flash-Next IQ3_XXS, INT8 KV, MTP spec=4, temp 0, warm medians of
The decode gain is cache coverage (the two cards hold ~16.9k of 24,576 profiled pairs, ~99% of |
|
This is exactly the kind of independent data the PR needed — a second rig, and one in a config Three things that line up cleanly with our 2x3090 box:
One ask if you have the rig for it later: the byte-identity gate (#152 trio + |
|
Thanks! Please rebase on 0.1.31: #216's session carve and 0.1.30's 1024-token streaming conflict with it, and auto sizing on 22 GB cards needs #216's lending. Also: make |
|
Resubmitted on v0.1.36 as #531 (checklist answered there). |
Part 1 of the peer-tier plan agreed in #204: a second GPU as an opt-in expert-cache tier beside
--gpus. Part 2 (the QSA query split) is not included — see the note at the end.What it does (only with
--peer-device N)cudaHostAllocPortable, the only unconditional change — no behaviour change without a peer).New flags:
--peer-device N(default -1 = off),--peer-reserve-mib(600),--peer-slots(0 = auto),--peer-adapt-swaps(-1),--peer-prefill-rows(-1 = chunk×K/2, 0 = off).Env switches, all only read when a peer is active:
STRATA_PF_PEER_OUT_PIPE,STRATA_PF_PEER_COMPACT,STRATA_PF_PEER_STREAM(0.35),STRATA_PF_PEER_RING(48),STRATA_PEER_DIRECT,STRATA_PEER_HOT(0.45),STRATA_PEER_HOT_AT.Rebased on 0.1.28; upstream's
--expert-cache-device1..3tier, the D-5 issuer thread and D-1 attention are left intact.Exactness (#152 method)
Env trio
STRATA_NO_IQ512=1 STRATA_NO_IQ256=1 STRATA_NO_IQ4NL=1+ no-stream-k MMQ (local debug patch), greedy, the three gate prompts (chat / code / math), IQ3_S:--peer-device) vs plain 0.1.28: byte-identical (PASS).--expert-cache7846 slots; peer run 3896 primary + 3950 peer, static,STRATA_PEER_HOT=0): byte-identical (PASS).Numbers — 2× RTX 3090 (NVLink), IQ3_S, 0.1.28 base, flashbench
--quick(greedy)--gpu1-experts(--expert-cache-device1 10000)--layer-split auto)--peer-device 1, auto)(Peer run: 8,692 primary + 11,168 peer = 19,860 of 24,576 experts on the GPUs. One run per cell.)
About part 2 (QSA query split)
We ported it too, but on 0.1.28 it does not meet the bar: prefill attention now uses the D-1 tensor-core kernel, which our split cannot divide mid-chunk, so the split falls back to the older kernel — not byte-identical, and slower than this PR alone (2,125 vs 2,566 at 32K). So it's left out. We might come back with a redesign that keeps D-1 on both cards; if so it will be a separate PR against this one.