mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1748] [CLOSED] [Engine] Remote stage: run the later layers of a layer split on other PCs, over TCP (opt-in; Linux and Windows; Qwen3.8-Flash-Next) #3648
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#3648
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/1748
Author: @lask3802
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:remote-stage-pr📝 Commits (10+)
6946676Remote stage: run the later layers of a layer split on another PC over TCP2ba81afRemote stage tools: a node agent, a layer shipper and a split tuner5657d79Remote stage docs and measurements: two and three PCs, two modelsf6241bastage_ship: pieces in flight at once; the agent checks each piece's sha256fecb3c7Remote stage: follow 0.1.43's decode defaults on both PCs9822a07Remote stage: images (--vision) - the worker's layers get the main's positions6efea4aRemote stage docs: images, and the checks after the rebase onto 0.1.43ef046e0Remote stage: a stuck worker ends as a stuck main process does; parking turned off, not refusedae6634fRemote stage: a worker's agent starts an ended worker again8aeb39eRemote stage: the main process connects again, a new main takes a silent worker over📊 Changes
21 files changed (+8511 additions, -266 deletions)
View changed files
📝
CMakeLists.txt(+13 -1)📝
docs/MULTI_GPU.md(+14 -1)➕
docs/REMOTE_STAGE.md(+598 -0)➕
docs/remote-stage/ENGINEERING.md(+823 -0)📝
include/strata/core/expert_source.hpp(+12 -1)📝
include/strata/core/verify.hpp(+42 -0)➕
include/strata/net/stage_link.hpp(+247 -0)📝
include/strata/prefill/prefill.hpp(+28 -0)📝
metal/CMakeLists.txt(+1 -1)📝
serve/server.py(+21 -1)📝
serve/test_server.py(+84 -1)📝
src/core/expert_source.cpp(+58 -38)📝
src/core/verify.cpp(+126 -12)➕
src/net/stage_link.cpp(+1364 -0)➕
src/net/stage_link_test.cpp(+1028 -0)📝
src/prefill/prefill.cpp(+117 -4)📝
src/program/generate.cpp(+1075 -206)➕
tools/stage_node.py(+877 -0)➕
tools/stage_ship.py(+385 -0)➕
tools/stage_tune.py(+758 -0)...and 1 more files
📄 Description
Problem and result
A layer split hands a token from one stage to the next once per verify window, and each prompt chunk's rows once
per chunk, but both stages had to be cards in one PC. A model that one 10 GB card caches poorly stayed slow unless a
second card fit in the same box. This branch puts that hand-off on a TCP link, so the later layers can run on cards
in other PCs:
--layer-split K --split-device 0 --remote-stage HOST:PORT;strata --serve --stage-worker PORT --stage-begin K;relay workers (
--stage-end K2 --stage-next HOST:PORT) make three or more stages;--pipeline-windows 2on the main process (opt-in): its layers run the next decode window, on a guess, while theworker and the head verify this one; workers need no new flag or protocol;
STRATA_REMOTE_TIMING=1prints each stage's own time per prompt chunk and per window;--vision), recovery without a human, and peers that are not trusted (below);tools/stage_node.py), a splitter thatships a node only its layers' bytes (
tools/stage_ship.py), and a tuner that measures configurations(
tools/stage_tune.py).Without
--remote-stageor--stage-workernothing changes (see Approach).Docs:
docs/REMOTE_STAGE.md(use),docs/remote-stage/ENGINEERING.md(design, process, every number). The raw data(every run's JSONL, the timing lines, the tuner reports, the benchmark scripts) is on the branch
remote-stage-dataof my fork: https://github.com/lask3802/Strata/tree/remote-stage-data/bench/results/2026-10-10-remote-stage
This head is the same branch rebased onto 0.2.4.1; its checks and GPU runs are under Approach, "Rebased onto
0.2.4.1". The first subsection below was measured on the 0.2.0-beta head, and so
were the checks and faults under Validation; the later subsections (marked with their engines, 0.1.41 to 0.1.43.1)
are the earlier heads' runs, with the cards the other way round, kept for comparison. Each says where it was run
again.
Results on the 0.2.0-beta head
The same two PCs with their cards swapped since the earlier runs: the main process on an RTX 2080 Ti 11 GB (PCIe 3.0
x16) + Ryzen 9 5900XT, the worker on an RTX 3080 10 GB + Ryzen 9 5900X, 10 GbE, Linux; this head's build on both, the
node agent of this head on the worker.
--kv int8 --kv-resident 32768 --max-context 131072 --spec 4, greedy, theexpert cache automatic, one run per row, all in one session. Short decode: nine prompts of 256 tokens, the mean.
Prefill / decode tok/s: prompts of 7.5K / 30K / 91K tokens read from 0 with 320-token answers (the same prompts as
the 0.1.41 table below). The split is K=26,
--prefill 5888, without--pipeline-windows, as there. The route tailskip is on (the 0.2.0-beta default), unlike in the 0.1.41 table.
--resident-budget-gib 70)Two PCs: decode +41% on the IQ3_S and +54% on UD-Q4_K_XL; the 91K prompt in 59 s instead of 102 (IQ3_S) and in 77 s
instead of 162 (UD-Q4_K_XL). The three-PC rows were not run (the third PC was not reachable).
Pipelined decode (
--pipeline-windows 2), K=26, the 40 varied prompts of 200 tokens, one binary, orderoff-on-on-off:
No gain on this pair at K=26, against +9-12% with the RTX 3080 as the main (below). Here the main process is the slow
side: 28.2-28.6 ms of its own per window against a 12.4-12.6 ms round trip (the K sweep below), so the overlap hides
the shorter of the two, and the 245 cache slots it costs the main process slow that longer part.
K on this pair. The balance moved with the cards: the 2080 Ti main is now about twice the worker's time per
window at K=26, so layers go to the worker. Same session,
--pipeline-windows 2unless marked, the worker on a copyof the layers it needs; 12 of the 40 prompts x 200 tokens, three rounds (the median of the rounds' means), then three
~30K prompts read from 0 with 200 tokens each (the means); the per-window times are the main process's timing lines
over the 12 prompts (
STRATA_REMOTE_TIMING=1):--pipeline-windowsThe main process's time per window and the worker's round trip cross between K=18 and K=22, and decode is flat
there (69.75-69.91, inside the run-to-run spread). Prompts pull the other way below K=22: at K=26 the main process is
the slowest stage per chunk (3.5 s against the worker's 2.4 s), at K=18 and lower the worker is (3.5-4.2 s), and
K=22, about even, reads a ~30K prompt 10% faster than any other K. Without the overlap decode is no slower at either
K tried (70.90 against 69.75 at K=22, 69.75 against 69.91 at K=18), so on this pair the overlap's gain does not show
at any K, while its 444 MiB cost the main process 225-248 cache slots.
The "Strata Link default" rows are my fork's build (this branch with #1887, #2690 and other changes, Expert
Deferral on as its default,
STRATA_VERIFY_DEFER_CPU=1), on both PCs, in the same session after the rows above, withits own flags (
--max-context 262144 --prompt-cache 6 --pcie-frac 0on both PCs) and the same prompts. They are notthis branch alone and not the same flags, so they are not an A/B against the rows above; they show where K lands when
a layer no longer waits for its CPU expert rows of low routing weight. Deferral changes the output (#2690 has its KL). With it,
decode is flat from K=26 to K=20 (84.4-85.4, the two K=26 runs 84.40 and 85.20), the main process's part still the
longer one at every K, and K=22 again reads a ~30K prompt fastest (+13% over K=26).
Images. As in the 0.1.43 table below: fixed expert sets on both PCs, the tail skip off, one-token windows, the
first token's distribution of
vision_check's six picture questions and its text question, against the same buildon the 2080 Ti alone; the split at K=26 with and without the position table (
STRATA_STAGE_POSITIONS=0):With the table the pictures' geometric mean is 42% lower (better on 5 of 6; on the first, 3.9e-6 against 1.3e-6,
both near zero). With the table, 5 of the 7 answers on the split were the same text as on one card; the shapes list
and the screenshot's description were worded differently.
Answers. As in the 0.1.43 tables below: one-token windows, fixed expert sets on both PCs,
STRATA_ROUTE_TAIL_SKIP=0, greedy, two 4-turn conversations of 16K-token prompts (8 answers a run), K=26, each runthe first replay on a freshly started server:
--pipeline-windows 0vs2, automatic cache0, automatic vs--expert-cache 26360at--expert-cache 2636(three servers) and at 2300 (one), each against the first2at--expert-cache 2636(three servers) and at 2300 (one), each against the first2with every third guess made wrong (STRATA_PIPELINE_FORCE_MISS=3), at 2636 and at 2300, against20vs2at the same--expert-cache(2636, and 2300)So on this head, at a fixed cache, every fresh server gave the first one's answers, with either setting (earlier:
2 of 3 servers at
0, 4 of 4 at2). The comparison the table below makes,0against2at one cache size, could not be made here: on a nativepack
--expert-cache Nis a byte budget of N of the largest blobs, cut to the VRAM that is free less the reserves,and
--pipeline-windows 2's 444 MiB comes out of that free VRAM. At N=2636 and at N=2300 both arms hit that cut(2,999 slots at
0both times, 2,760 at2), so the last row still compares two cache sizes. A smaller N, underboth cuts, was not run. Whether the forced misses happened is not shown either: the main process printed no
pipeline count line (
STRATA_DECODE_TIMING=1was set), so the FORCE_MISS row shows only that the variable changedno answer.
Results (engine 0.1.41, before the pipelined decode)
PC A: RTX 3080 10 GB (PCIe 4.0 at x8), Ryzen 9 5900XT, 128 GB DDR4-3200, Linux. PC B: RTX 2080 Ti 11 GB, Ryzen 9
5900X, 64 GB DDR4-2400, Linux. PC C: RTX 3070 8 GB, Ryzen 7 5700X3D, 64 GB DDR4-3600, Windows 11. Links 1 GbE, and
10 GbE between A and B (~400 MB/s, slot-limited).
--kv int8 --kv-resident 32768 --max-context 131072 --spec 4,greedy, one run per row. Prefill / decode tok/s; prompts of 7.5K / 30K / 57K / 91K tokens with 320-token answers.
0.1.42 turned
STRATA_ROUTE_TAIL_SKIPon by default for CUDA serve. The two-PC rows ran again on this head (thefirst subsection, the cards swapped); the three-PC rows and the Windows clocks did not (Not run).
Two PCs: decode +18-44% on IQ3_S, and on UD-Q4_K_XL (which one 10 GB card caches poorly) +42% and a 100K prompt in
88 s instead of 293. Long prompts need a large chunk (5888-8192). A third PC adds a hop to every window: it paid for
100K prompts and cost 1-8% of decode; the tuner's eight three-stage splits of UD-Q4_K_XL tied within the spread.
Windows lowers a worker GPU's clocks between decode windows, while the other stages run. The RTX 3070 under
Windows (or WSL2) waited 12-22 ms for its 8 layers per window, and 3.7-4.1 ms with
nvidia-smi -lgc 1500,1905 -lmc 7001,7001(short decode 33.8 -> 41.8); the 2080 Ti under Linux held P2. The node agent can lock and reset the clocksaround a worker (
"gpu_clocks", as administrator), and the tuner's report says when a Windows node has not.Pipelined decode on a remote main (
--pipeline-windows 2, engine 0.1.43 and later)RTX 3080 main (layers 0-25), RTX 2080 Ti worker (26-47), 10 GbE, RVN IQ3_S,
--spec 4, 40 varied prompts of 200tokens, one binary per session, order off-on-on-off:
Both tables of this subsection ran again on this head with the cards swapped ("Pipelined decode" and "K on this
pair" above).
The overlap hides part of the main process's layers behind the round trip, so with it on it pays to move layers to
the worker until the two are about even. Same PCs, fp32 rows,
--pipeline-windows 2, this branch with #1887 and mybf16 branch on top; 12 of the 40 prompts x 200 tokens, and a ~30K prompt read from 0 then 200 tokens; medians of 3,
one session:
Prompts pull the other way: on two PCs the worker is the slowest stage per chunk (3.5-4.6 s against the main
process's 2.2-2.9 s), so K=24 is +4-5% decode and -10% on long prompts against K=26. On three PCs (an RTX 3070 last
stage over 1 GbE, clocks locked, bf16 rows) the overlap gave +15% decode at 26 / 14 / 8 (59.3 -> 68.3 tok/s), and my
comment on the bf16 rows has the three-PC splits.
--pipeline-windows 2Answers (run again on this head: "Answers" under the first subsection). The cache size is part of the result: a different slot count places other experts on the CPU, which
moves near-tie tokens, so with the automatic cache
--pipeline-windows 2compares two cache sizes, not two loops.Measured with one-token windows (
--spec 4 --mtp-max-t 1 --suffix-draft 0),STRATA_ROUTE_TAIL_SKIP=0, greedy, two4-turn conversations of 16K-token prompts, 8 answers per run, the same two PCs. With the change on engine 0.1.43:
--pipeline-windows 0vs2, automatic cache0at--expert-cache 1951vs0at 2153So the note "The cache size changes no output bit" in
generate.cpp(the cache sizing comment) does not hold on thissetup.
This branch on 0.1.43.1 at
--expert-cache 1951, each run the first replay on a freshly started server, against thebranch's first
--pipeline-windows 0server:0, the branch this one is built on0, three more servers22, every third or second guess made wrong (STRATA_PIPELINE_FORCE_MISS=3/2; 256-317 of about 545 windows undone per run)The runs that differ took another word partway into an answer, with
0as well as with2. Later replays on oneserver drift with either setting; the cause is not known.
Recovery (engine 0.1.43 and 0.1.43.1)
Every row below ran again on this head; those results are in Validation, beside these.
Two PCs fail in ways one PC does not (the worker ends, either PC restarts, the link drops), and each needed a person
before. Fault injection on A + B (10 GbE, RVN IQ3_S, K=26), agent and server, none needing a hand. The first seven
rows ran on 0.1.43 (371b400f), the last three on 0.1.43.1 with
STRATA_REMOTE_CONNECT_S=60, against the build beforethem (0936f027), and again at
4bbcb16eand5c454ed6:kill -9) while idleRetry-After: 30(2.9 s)server_errorkindImages (
--vision, engine 0.1.43)Run again on this head, on the swapped cards: "Images" under the first subsection.
On A + B (RVN IQ3_S), fixed expert sets, the tail skip off, the first token's distribution against the same model on
one card:
STRATA_STAGE_POSITIONS=0)With the served flags the answers were right (shapes, a table's numbers, a chart, a screenshot, text after them).
Byte for byte without a remote stage (earlier bases)
On this head: the five greedy prompts on one 2080 Ti against
main(Validation, the first row); the 16K-token replaywas not run without a remote stage.
mainoncemain, this branch and #1887 twice eachmain's first run an outliermain,main, branch--pipeline-windowsRelated discussion
rebased onto
maine88ee39d. No maintainer agreement on scope yet.cannot be tested across PCs here. This is opt-in and self-contained, and it can be tested on one PC with two cards
(Approach, "Trying it on one PC"). #1055 had the idea for decode only. If it is not wanted upstream, that is fine:
I will keep maintaining it in my fork, and the Windows clock finding above may be useful on its own.
(24 requests, passed on the earlier head f2673bd2).
4bbcb16e) is fixed here (Approach, "Untrusted peers").STRATA_VERIFY_DEFER_CPU) came from this split's measurements but need noremote stage; they are their own PRs and are not part of this branch.
Approach
The link. The protocol (version 5) is a hello, then per-window and per-chunk messages:
StageClienton the mainprocess,
serve_stageon a worker (a receiving thread, double buffers, the take-over, a relay's idle hook),StageRelayfor a worker that forwards to the next. The hello checks the protocol, the geometry each PC read fromits own GGUF, the model pack's fingerprint, the K/V type, the window and context sizes, the prompt chunk (a worker
must be able to lend the main process's chunk whole) and
--vision; the shared token is checked before anythingafter the hello is read. The
Verifier,Prefilland arena get hooks:set_no_head,set_remote(
remote_run_,remote_commit_), a pipelined chunk hand-off, and a layer range for the expert arena andload_experts_gguf, so each PC loads and caches its own layers only.Pipelined decode (
--pipeline-windows 2, opt-in). Without it a decode window is the main process's own part(head, drafter, its layers) and then the round trip through the remote stages, one after the other. With it, #1656's
two-stage loop runs on the main process: layers 0 to K-1 are the front stage, the worker followed by this PC's head
the last one. While the worker and the head verify window N, layers 0 to K-1 already run window N+1 on the guess that
N is accepted whole; a wrong guess is undone on this PC (GDN snapshot). The worker only ever gets verified windows, in
the serial loop's order. Both stages share the main process's GPU, so the second verifier of each and the snapshots,
444 MiB at K=26, are kept out of its expert cache (the log says so). The automatic default still resolves to 0 on a
remote main;
--adapt-asyncturns it off (not measured there); a worker refuses it.Recovery.
.prev.log);STRATA_REMOTE_CONNECT_S(180 s) inall, the hello's reply included; a client that goes away ends the wait and the engine stays; a link lost in the
middle of a request still ends the engine, and the server starts it again;
INFO remote_stage_wait=Slines keepthe server's 90 s frozen-engine check off and reach the client as keep-alives;
STRATA_REMOTE_TAKEOVER_S(30 s);Retry-After: 30, not 400.Untrusted peers. Any host reaching a worker's port could end it without a token: messages were parsed before the
hello, and
T * handoff_floatswrapped before T was bounded. Now a worker reads nothing but a hello first (10 s inall) and nothing more until its token is checked, and bounds T first; the main process caps an error reply at 64 KiB.
stage_link_testsends these headers by hand; each of ten mutations that undo one fix failed a check when it waswritten (two of them only on Windows, where a socket's shutdown does not wake a recv).
Images. A picture's tokens rotate by M-RoPE positions that are not their cell index. The protocol's
Positionsmessage (the main process sends the table before a request with a picture, the identity after it) and
visionin thehello carry them; a relay forwards the table.
Following upstream. Written on
fb58e0d(0.1.41), now onmaine88ee39d(0.2.0-beta, engine 0.1.45.3). What eachrelease needed here:
STRATA_ROUTE_TAIL_SKIPrank from the hello; the CPU prefill share'severy-expert-cached check counts the process's own layers.
share under
STRATA_PCIE_AUTO_SPLIT=1;STRATA_ADAPT_OVERLAPwas left opt-in on a worker, not faster there (6interleaved pairs: decode median 64.19 tok/s on, 64.33 off).
lends for its own chunk or names the
--prefillthat fits; #2010 made the overlap opt-in everywhere; the 503'sRetry-Aftergoes through upstream's_json.--prefill-head-aliasis refused with a remote stage (a worker has no head); a Qwen3.6-35B-A3B file is refused withthe remote stage's flags (its own engine path has no layer split and skips an unknown option in serve mode); a
remote stage is refused on the Metal build (its window runs init, run and commit itself, past the hooks; the Metal
build links the link's code from the first commit on);
--adapt-async 1is turned off with a line on a workerand, in the expert arena's mode, on a remote main; the 8192 automatic chunk cap of a layer split on gfx12 applies to a remote main; pin by
need (
STRATA_PIN_BY_NEED=1) is off with a layer range (its padded stride does not fit a range's packed arena) andthe log says so. A worker's arena counts its deferred registration slices (
STRATA_DEFERRED_REGISTER=1) from itsrange's first layer. The moved
lendandrefillare upstream's current ones (STRATA_REFILL_PARTS, the plannedsegment's
exactchunk, 0.2'splanned_chunk), which a worker calls withexact0;Verifier::runcalls theremote hook before upstream's prelaunch check;
STRATA_HANDOFF_PIPE's pieces stay in-process only; the server'sRetry-Afteruses_json'sretry_after. Read in the code without a change: 0.2's host-aware prompt plan andSTRATA_RAM_ADAPT2act on the mapped file tier only, and the sm_86 / sm_60 defaults are each PC's own. Theconflicts and how each side was kept are in ENGINEERING.md ("After the rebase onto 0.2.0-beta").
What changed:
include/strata/net/stage_link.hpp,src/net/stage_link.cpp(new)StageClient,StageRelay,serve_stage; a connect with a deadline and a stop flag;alive,abort; a hello first, sizes bounded before they are multiplied; POSIX and Winsocksrc/net/stage_link_test.cpp(new)src/program/generate.cpp--pipeline-windowson a remote maininclude/strata/core/verify.hpp,src/core/verify.cppset_no_head,set_remote; for--pipeline-windows, the round trip on a job thread, the head launched when the rows are back,remote_settlefor a drain stopped at an error, the job joined when the engine endsserve/server.py,serve/test_server.pyRetry-After: 30; the wait line is a keep-aliveinclude/strata/prefill/prefill.hpp,src/prefill/prefill.cppinclude/strata/core/expert_source.hpp,src/core/expert_source.cppload_experts_ggufCMakeLists.txt,metal/CMakeLists.txtstage_link.cpp,ws2_32on Windows,stage_link_test; the Metal binary linksstage_link.cpptools/stage_node.py,tools/stage_ship.py,tools/stage_tune.py,tools/test_stage_node.py(new)docs/REMOTE_STAGE.md,docs/remote-stage/ENGINEERING.md(new),docs/MULTI_GPU.mdWhat it leaves alone. Without
--remote-stageor--stage-workerno new code path runs: the newVerifier,Prefilland arena hooks are inert at their defaults (no range, no remote callbacks,no_headfalse). On a remotemain without
--pipeline-windows(or with 0), its windows go through the link on the request's thread and the cachekeeps its size. With a remote stage these are refused at start:
--batch,--peer-device,--control-vector(andthe speed projection),
--expert-cache-remote,--prefill-head-alias,--pipeline-windowson a worker, aQwen3.6-35B-A3B file and the Metal build; the prompt cache, conversation parking, mid-prompt checkpoints,
--kv-grow, pin by need, and--adapt-async 1on a worker and in the arena mode on the main PC are turned offwith a log line. Not touched: setup,
the SYCL port's copies, the HIP-specific code; in the server, only lines that only a remote stage prints.
Trying it on one PC
Two cards in one PC are enough. The worker runs on one card and the main process on the other, over 127.0.0.1; the
reference is the in-process split of the same two cards, so their answers can be compared token for token.
Exact comparisons need the run-to-run noise off on both: the same
--expert-cache N(withautothe slot countmoves with the reserves and other flags, and an expert computed on the CPU instead of the GPU gives other numbers),
fixed expert sets (
--pcie-frac 0 --adapt-every 0 --adapt-swaps 0),STRATA_ROUTE_TAIL_SKIP=0,STRATA_PREFILL_CPU_SHARE=0,STRATA_IQ_MT_MIN=1, and one-token windows (--mtp-max-t 1 --suffix-draft 0). WithMTP's longer windows one card does not repeat its own greedy answers (upstream
main7695859a, RTX 3080 alone, RVNIQ3_S, served decode flags, fixed expert sets, 40 prompts, two runs: 32 of 40 the same, 35 of 40 with
STRATA_IQ_MT_MIN=1), so compare with one-token windows.Rebased onto 0.2.4.1 (2026-10-24)
This head is the branch rebased onto
main8183c6b6(v0.2.4.1 and one docs commit, engine 0.1.49.1). The rebase appliedwith no conflicts, and
git range-diffagainst the 0.2.3 head (bb7984df) shows every commit as the same patch. 0.2.4'sDeepSeek V4.1-Flash engine (
strata-dsv41,src/dsv41) is a binary of its own and has no remote stage.Checked on this head (Linux, the build of the runs below): the build,
stage_link_testand five CPU tests(
conv_cache_test,spec_prob_test,batch_rows_test,conversation_validation_test,conversation_transfer_test) passed. Not run on this head: the Windows build and ctest.GPU runs on this head (2026-10-24). The same two PCs, model and runs as in the 0.2.3 section below: the main
process on the RTX 2080 Ti, the worker on the RTX 3080, 10 GbE, Linux, K=26,
--max-context 131072, greedy, thishead's build on both. The CI container on the main PC's host used 0 cores during every run. In the 0.2.3 section
below, "this head" means the 0.2.3 head (bb7984df); in the sections before Approach, it means the 0.2.0-beta head
(a3e15682).
main--pipeline-windows 2(median of 3)--pipeline-windows 2: prefill / decode--vision, split): six picture questions, then a text turnThe "2080 Ti alone" rows ran
main's build (the default path is byte-identical). The 0.2.3 split rows overlapped abuild on the main PC's host (see the 0.2.3 section), so those are, if anything, low.
Faults on this head, all as on 0.2.3 (
--serve, the split, a 100-token request):Retry-After: 30, "remote stage: the peer closed the connection"server_errorstream event, same messageRebased onto 0.2.3 (2026-10-23)
This head is the branch rebased onto
main5c8dd322(v0.2.3, engine 0.1.48). Git stopped at two conflicts, both inthe first commit and both beside new upstream lines: the
stratatarget in CMakeLists.txt (upstream's DFlash2 tooltargets and
strata_utf8_manifest, next tosrc/net/stage_link.cppandws2_32) and two adjacent member blocks inprefill.hpp(the DFlash2 taps, next toremote_rows_from_). No remote-stage code changed in the rebase.Two 0.2.x defaults could meet a remote stage, and neither does:
--conversation-cache-mibis sized from the free RAM under--servewhen it is not given (#3493). A remote stagestill sets it to 0 before that sizing, on the main process and on a worker, so parking stays off as before.
--draft dflash2is refused under--serve, and a remote stage needs--serve. The verifier's taps also need thewhole model in one stage (
lb == 0,le == n_layers).Checked on this head (Windows, MSVC 19.44 + CUDA 13.0,
-DSTRATA_BUILD_CONVERSATION_TESTS=ON):hc_persist_parity)stage_link_test, the 7 conversation testsThe other 5 fail the same way on v0.2.3 itself in the same environment:
hc_persist_parityandhc_persist_default_offare not run, because the test callssetenv, which MSVC does not have.gemm_bf16_parityandgr_upmix_paritycannot find the CUDA DLLs on ctest's PATH. With the DLLs on the PATH,gemm_bf16_paritypasses andgr_upmix_parityfails 21 cases, also on v0.2.3.ple_parityneeds a model file.GPU runs on this head (2026-10-23). The same two PCs as below: the main process on the RTX 2080 Ti, the worker
on the RTX 3080, 10 GbE, Linux, this head's build on both. The IQ3_S of Qwen3.8-Flash-Next, K=26,
--max-context 131072, greedy. In the older sections below, "this head" means the 0.2.0-beta head (a3e15682).main--pipeline-windows 2(median of 3)--pipeline-windows 2: prefill / decode--vision, split): six picture questions, then a text turnThe split's speed runs overlapped a build on the main PC's host (4.5-6.8 cores for three of the four minutes), so
its numbers on this head are, if anything, low.
Faults on this head, all as on 0.2.0-beta (
--serve, the split, a 100-token request):Retry-After: 30, "remote stage: the peer closed the connection"server_errorstream event, same messageValidation
Revision: this head, a3e15682 (19 commits on
maine88ee39d) (the builds and tests below ran on it before a last wording fix in ENGINEERING.md;git diffoutsidedocs/is empty). The upstream baseline for the Python suites ise88ee39ditself, run the same way in the same environment.Passed:
Windows 11, MSVC 2022 (19.44.35229) + CUDA 13.0.88, Ninja, Release, sm_86 (
-DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_CONVERSATION_TESTS=ON):cmake --build build --target strata stage_link_test conv_cache_test draft_kv_plan_test split_ring_test message_boundary_test coupled_draft_test spec_prob_test bf16_bits_test batch_rows_test batch_groups_test conversation_cache_test conversation_validation_test, rc 0,strata.exelinked. Besides C4996 (
getenvdeprecated, as inmain's own files), every MSVC warning is on a line frommain.The same build, the CPU tests with
CUDA_VISIBLE_DEVICES=-1, each rc 0:stage_link_test(all passed),conv_cache_test,draft_kv_plan_test,split_ring_test(23 checks),message_boundary_test(21),coupled_draft_test,spec_prob_test(72 cases),bf16_bits_test,batch_rows_test,batch_groups_test,conversation_cache_test(4772 checks),conversation_validation_test(972 host-only checks).Linux (Ubuntu 24.04 container), GCC 13.3 + CUDA 13.0.88, sm_75 + sm_86, Ninja, Release, from a clean build
directory (
-DSTRATA_ENABLE_CUDA=ON -DSTRATA_NATIVE_EXPERTS=ON -DSTRATA_BUILD_CONVERSATION_TESTS=ON):ninja strata stage_link_test, rc 0;stage_link_testpasses.g++ -std=c++20 -O2 -Wall -Wextra -cofsrc/net/stage_link.cppandsrc/net/stage_link_test.cpp(GCC 13.3):no warning.
python -m unittest tools.test_stage_nodeon Linux (Python 3.12.3): 48 tests OK;python -m pytest tools/test_stage_node.pyon Windows (Python 3.10.8, pytest 9.0.2): 48 passed.python -m pytest serveon Windows (Python 3.10.8): 867 passed, 17 skipped (maine88ee39d: 864 passed, 17skipped; the three more are this branch's server tests).
python -m pytest tools/test_setup_*.pyon Windows: 681 passed, 2 skipped, and the same 22 failures asmain(below); this branch does not touch setup.
GPUs, this head's Linux build (the same binary on both PCs) against the baseline's: the main process on an RTX
2080 Ti 11 GB (PCIe 3.0 x16) + Ryzen 9 5900XT, the worker on an RTX 3080 10 GB + Ryzen 9 5900X, 10 GbE, Linux; an
IQ3_S of Qwen3.8-Flash-Next (the worker with its layers' shipped bytes), K=26,
--prefill 5888,--max-context 131072on both, the node agent (tools/stage_node.py) of this head on the worker:maine88ee39d--pipeline-windows 0--pipeline-windows 2--visionon both PCs, the split,--pipeline-windows 2; four pictures, six questions, then a text questionFaults, on held splits (
--pipeline-windows 2), the agent restarting the worker. The first four rows are oneheld split; the main engine's rows and the worker stopped while a request waits are a second, with
STRATA_REMOTE_CONNECT_Sunset (180 s); the last three a third, withSTRATA_REMOTE_CONNECT_S=60, as earlier:kill -9) 15 s into an answerRetry-After: 30, "remote stage: the peer closed the connection"server_errorkindkill -9) while idleFailed:
python -m pytest tools/test_setup_*.pyon Windows (Python 3.10.8): 22 failures (test_setup_download'sparallel download, two of
test_setup_engine_hash's refusal tests, and 19 subtests oftest_setup_golden).maine88ee39dfails the same 22 in the same environment, test for test; I have not looked into them, and nonetouches a file of this branch.
Not run:
Windows clock finding and the three-PC splits stay as measured then: the third PC, the Windows one, did not answer
on the day. The new refusals and the turned-off switches of 0.1.44 to 0.2 are read from the code, not run.
--pipeline-windows 0against 2 at one cache slot count (both arms'--expert-cachehit the free-VRAM cut; see"Answers" above), and a count of the windows the forced misses undid.
builds the CUDA target's sources); the Metal build (no Mac).
/W4on the link's files on this head.--prefill-head-alias, Qwen3.6-35B-A3B and gfx12 checks: no file or card for them here.Limits
--pipeline-windows 2: byte for byte with windows of more than one token; how often a guess holds; a Windows main;a drain stopped at an error with a worker window in flight (found in review, not run).
(decode moved by up to ~14% between two runs).
either side of a fault, a worker lending for its own chunk on GPUs, a reconnect in the middle of a request. A ring
topology; a WAN.
LAN hosts from driving a worker; without it a host gets no further than a hello. A worker serves one main process
at a time, so a host that keeps connecting can still hold its port. The docs say to use it on a trusted LAN or
inside a tunnel.
directory: a credential, LAN only.
if that is easier to review.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.