mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2516
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/229
Author: @q8atnight
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:pr/peer-tier📝 Commits (1)
5c134efmulti-GPU: a second GPU as an opt-in expert-cache tier (--peer-device N): adaptive peer cache, rows over P2P, the peer computes its experts' prompt rows (compact buffers, pipelined out, streaming ring); default output unchanged📊 Changes
12 files changed (+1083 additions, -16 deletions)
View changed files
📝
CMakeLists.txt(+1 -1)📝
include/strata/core/expert_source.hpp(+4 -0)➕
include/strata/core/peer_experts.hpp(+101 -0)📝
include/strata/kernels/elementwise.hpp(+2 -0)📝
include/strata/prefill/prefill.hpp(+7 -0)📝
src/core/expert_source.cpp(+32 -4)📝
src/core/mtp.cpp(+1 -1)➕
src/core/peer_experts.cpp(+320 -0)📝
src/core/verify.cpp(+1 -1)📝
src/kernels/cuda/elementwise.cu(+17 -0)📝
src/prefill/prefill.cpp(+512 -8)📝
src/program/generate.cpp(+85 -1)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.