[GH-ISSUE #5265] [Engine] layer split auto: price the prompt read by the bytes each stage streams over its own link #3134

Open
opened 2026-11-07 14:38:20 +07:00 by bsakaguchi · 7 comments
Owner

Originally created by @Norhiro on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5265

Area

[Engine]

Problem

On a two-card layer split with unequal links, --layer-split auto picks the split by the predicted decode window. The prompt read then runs much slower than a split chosen for it.

Rig: RTX 3060 12 GB on PCIe 3.0 x16 (probe 12.3 GB/s) + RTX 5060 Ti 16 GB on 3.0 x8 (6.9 GB/s), i7-7800X, 125 GiB RAM, Qwen3.8-Flash-Next UD-Q4_K_XL native. All experts were in RAM, with v0.2.10 chunk-major (the default).

  • Auto picks K=18 for 60.0 ms per decode window. The 3060 gets layers 0-17 and the 5060 Ti on the narrow link gets the other 30.
  • A 31.1K-token prompt takes 39.8-44.1 s to the first token. The 4 s spread is explained below.
  • The two links differ by 1.8x, so both get "miss cost x1.00". link_miss_scale only scales from a 4x gap on (#2007), so the search does not see the difference.

Why the prompt read is slow here (nsys, one 31.1K prompt, auto K=18):

  • The 5060 Ti received 263 GB of expert copies. That is 83,861 copies of 3.14 MB, and its copy engine was busy 38.4 s of the 44 s.
  • Its kernels ran only 36% of the time. 20 s of its idle time is 50,856 gaps of 0.2-1 ms (median 364 us), each between one expert's GEMM and the next expert's dequant. That is the time one 3.14 MB expert takes over x8.
  • The 3060 received 168 GB in 13.7 s and then waited for the second stage.

So in chunk-major each chunk re-streams nearly every expert of every layer: copies ÷ (chunks × layers) comes to about 450-580 a layer a chunk out of 512, and the read is the slower stage's link time.

What I measured

The prompts are the same 31.1K and 26.2K tokens every time. There is one start per row; the rows marked "same session" were re-run on the same day.

Layer sweep with --trim-stage-weights:

split 3060 layers prompt chunk 31.1K TTFT 26.2K TTFT
auto (K=18, no trim) 0-17 6,400 / 6,144 39.84 / 43.99 s 38.21 / 39.64 s
K=18 + trim 0-17 8,192 33.53 s 33.13 s
K=24 + trim 0-23 8,192 29.89 s (29.98, 29.95 same session) 29.96 s
K=28 + trim 0-27 8,192 32.37 s 31.09 s
K=31 + trim 0-30 8,192 33.77 s 31.35 s
K=34 + trim 0-33 7,936 35.88 s 32.59 s
K=24 + trim + STRATA_PREFILL_AUTO_MAX=16384 0-23 11,008 29.19 s 28.25 s
  • Decode after a 4K prompt was 26-34 tok/s on auto and 30-37 tok/s with K=24 + trim (two requests each).
  • On my RAG question set (16 requests), K=24 + trim + AUTO_MAX gave the same retrieval and the same answers in substance as auto. Eight of the answers were byte-identical; the other eight differ in wording the way two auto starts do.

A cliff in the auto chunk. On auto, a 3060 cache of 1,473 slots gives a 6,400-token chunk and 1,472 slots gives 6,144. That puts the 31.1K prompt in 5 or 6 chunks, a 4 s difference between two starts of the same config.

A model of the prompt read, fitted to these runs

TTFT ≈ t0 + Σ over chunks of the slowest stage
stage(chunk t) = max( layers × N × slot_bytes / link_GBps , layers × c × layer_ms × t )
  • layer_ms is the engine's own per-layer time (1.46 ms on the 3060, 0.75 ms on the 5060 Ti).
  • With c from the nsys kernel time (31 us a layer a token on the 3060, 17 us on the 5060 Ti, so c ≈ 0.0212), the fit over 22 points gives N = 516 (≈ n_expert = 512), a cache term φ = 0, t0 = 5.4 s, RMSE 1.0 s (max 2.3 s).
  • With each configuration left out in turn, the held-out TTFT is predicted within 0-1.3 s (K=34: 2.5 s).
  • The model picks K=24 as the best split, and that matches the sweep.
  • φ = 0 means the expert cache does not reduce what a chunk-major prompt streams. A cache only helps the prompt read by making the auto chunk larger, which means fewer chunks.

Prototype: STRATA_SPLIT_OBJECTIVE=prompt (opt-in, +47/−2 in src/program/generate.cpp)

When the variable is set, consider() scores a placement by the formula above for one chunk at its slowest stage. The decode window only breaks ties.

  • The link speeds and layer times are the ones the engine already probes. The chunk is STRATA_SPLIT_PROMPT_CHUNK, or --prefill N, or else 8192.
  • The startability gate is unchanged.
  • The log says why the split was picked:
    layer split auto (STRATA_SPLIT_OBJECTIVE=prompt): K=23 - predicted 5824 ms per 8192-token prompt chunk at its slowest stage, 63.7 ms per decode window
    layer split auto (prompt): CUDA0 layers 0-22, per chunk: experts in 2983 ms over 12.4 GB/s, compute 5824 ms
    layer split auto (prompt): CUDA1 layers 23-47, per chunk: experts in 5823 ms over 6.9 GB/s, compute 3250 ms
    
  • Unset, the behaviour is unchanged: same K=18, same log.

Same build, same session:

K chunk 31.1K 26.2K decode after 4K
auto 18 6,144 44.13 s 39.33 s 27.2 / 33.0 tok/s
STRATA_SPLIT_OBJECTIVE=prompt 23 8,192 32.86 s (−26%) 32.16 s (−18%) 28.4 / 33.0 tok/s

Part of the gain is the chunk: at K=23 the auto chunk came out at 8,192, so the prompt needs 4 chunks instead of 6. Auto cannot use stage trim, so the hand-picked K=24 + trim + AUTO_MAX (29.2 s) stays about 3.7 s ahead.

  • #2393 / PR #2385 proposed --layer-split-objective interactive|prompt|decode. Both were closed in the 0.2.0-beta tracker reset, not rejected.
    • Its prompt objective takes the slowest stage of layer time plus the decode miss cost from the routed mass the caches hold.
    • The difference here is the bytes term. On this rig the prompt read streams nearly every expert of every layer per chunk whatever the cache holds (φ = 0 above), so the decode miss model does not predict it.
  • #509 (3080 + V100 on x4, auto 2.86x slower on prefill) and #2052 (4080 + 3060, both x8 Gen4, prefill 1000 → 250-300 tok/s on two cards; still open) look like the same pattern.
  • #2644 and #1616 are the share and three-layer passes. With the prompt objective the first pick is not a tiny stage, so they do not trigger.

Questions on scope

  1. Is an opt-in objective for the prompt read wanted? If so, which form: an env variable like the prototype, or --layer-split-objective prompt as in #2385? I would rather build on #2385's flag than open a competing one.
  2. Should the bytes term (n_expert × slot / link) replace or join the miss-cost term in the prompt objective?
  3. Could auto use stage trim once the split is chosen? Today trim needs an explicit K. On this rig trim is worth another ~3-4 s by letting the auto chunk grow to 8,192.
  4. A note on four or more cards. I leave this to you. The prototype was measured on two cards only. By reading the code it would also reach the three-GPU search (not run), but not the four-GPU one.
    • The four-GPU search scores its placements itself, and beyond four the layers are shared in proportion to speed.
    • The same min-max over stages could apply there: prefix sums of the bytes per layer for four cards, a DP for more.
    • With more stages, though, the pipeline fill may need a (chunks + stages − 1) term that two cards do not show (α = 0 above).
    • I cannot measure that without a four-card rig, so I mention it only as a possibility.

Validation

Passed:

  • Build: CUDA build of the prototype on v0.2.10 (ffa80d73): sm_86;120, CUDA 13.3, g++ 15, STRATA_ISA_FLOOR=avx, 170/170.
  • Runs: the tables above, on Fedora 44 with driver 615.71.09. Every run is 0.2.10 chunk-major with all experts in RAM.

Not run:

  • HIP and SYCL builds.
  • Three or four GPUs; I have only two cards.
    • Unconfirmed static analysis: the three-GPU search goes through the same consider(), so the variable would change its scoring too. I have not run it on three cards and do not know whether the formula holds there; the pipeline fill may matter more with three stages.
    • The four-GPU search scores its placements itself, so the prototype leaves it unchanged.
  • Other models and other cards. c = 0.0212 comes from one nsys run on this pair.
  • Layer-major, and experts read from the drive.

AI-assisted: Claude Code ran the measurements on my machine and drafted this; the numbers and log lines are from those runs.

Originally created by @Norhiro on GitHub (Nov 5, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5265 ### Area [Engine] ### Problem On a two-card layer split with unequal links, `--layer-split auto` picks the split by the predicted decode window. The prompt read then runs much slower than a split chosen for it. **Rig:** RTX 3060 12 GB on PCIe 3.0 x16 (probe 12.3 GB/s) + RTX 5060 Ti 16 GB on 3.0 x8 (6.9 GB/s), i7-7800X, 125 GiB RAM, Qwen3.8-Flash-Next UD-Q4_K_XL native. All experts were in RAM, with v0.2.10 chunk-major (the default). - **Auto picks K=18 for 60.0 ms per decode window.** The 3060 gets layers 0-17 and the 5060 Ti on the narrow link gets the other 30. - **A 31.1K-token prompt takes 39.8-44.1 s to the first token.** The 4 s spread is explained below. - **The two links differ by 1.8x, so both get "miss cost x1.00".** `link_miss_scale` only scales from a 4x gap on (#2007), so the search does not see the difference. **Why the prompt read is slow here (nsys, one 31.1K prompt, auto K=18):** - **The 5060 Ti received 263 GB of expert copies.** That is 83,861 copies of 3.14 MB, and its copy engine was busy 38.4 s of the 44 s. - **Its kernels ran only 36% of the time.** 20 s of its idle time is 50,856 gaps of 0.2-1 ms (median 364 us), each between one expert's GEMM and the next expert's dequant. That is the time one 3.14 MB expert takes over x8. - **The 3060 received 168 GB in 13.7 s and then waited for the second stage.** So in chunk-major each chunk re-streams nearly every expert of every layer: copies ÷ (chunks × layers) comes to about 450-580 a layer a chunk out of 512, and the read is the slower stage's link time. ### What I measured The prompts are the same 31.1K and 26.2K tokens every time. There is one start per row; the rows marked "same session" were re-run on the same day. **Layer sweep with `--trim-stage-weights`:** | split | 3060 layers | prompt chunk | 31.1K TTFT | 26.2K TTFT | |---|---|---|---|---| | auto (K=18, no trim) | 0-17 | 6,400 / 6,144 | 39.84 / 43.99 s | 38.21 / 39.64 s | | K=18 + trim | 0-17 | 8,192 | 33.53 s | 33.13 s | | **K=24 + trim** | 0-23 | 8,192 | **29.89 s** (29.98, 29.95 same session) | **29.96 s** | | K=28 + trim | 0-27 | 8,192 | 32.37 s | 31.09 s | | K=31 + trim | 0-30 | 8,192 | 33.77 s | 31.35 s | | K=34 + trim | 0-33 | 7,936 | 35.88 s | 32.59 s | | K=24 + trim + `STRATA_PREFILL_AUTO_MAX=16384` | 0-23 | 11,008 | 29.19 s | 28.25 s | - **Decode after a 4K prompt** was 26-34 tok/s on auto and 30-37 tok/s with K=24 + trim (two requests each). - **On my RAG question set** (16 requests), K=24 + trim + AUTO_MAX gave the same retrieval and the same answers in substance as auto. Eight of the answers were byte-identical; the other eight differ in wording the way two auto starts do. **A cliff in the auto chunk.** On auto, a 3060 cache of 1,473 slots gives a 6,400-token chunk and 1,472 slots gives 6,144. That puts the 31.1K prompt in 5 or 6 chunks, a 4 s difference between two starts of the same config. ### A model of the prompt read, fitted to these runs ``` TTFT ≈ t0 + Σ over chunks of the slowest stage stage(chunk t) = max( layers × N × slot_bytes / link_GBps , layers × c × layer_ms × t ) ``` - `layer_ms` is the engine's own per-layer time (1.46 ms on the 3060, 0.75 ms on the 5060 Ti). - With `c` from the nsys kernel time (31 us a layer a token on the 3060, 17 us on the 5060 Ti, so c ≈ 0.0212), the fit over 22 points gives **N = 516 (≈ n_expert = 512), a cache term φ = 0, t0 = 5.4 s, RMSE 1.0 s** (max 2.3 s). - With each configuration left out in turn, the held-out TTFT is predicted within 0-1.3 s (K=34: 2.5 s). - **The model picks K=24 as the best split, and that matches the sweep.** - φ = 0 means the expert cache does not reduce what a chunk-major prompt streams. A cache only helps the prompt read by making the auto chunk larger, which means fewer chunks. ### Prototype: `STRATA_SPLIT_OBJECTIVE=prompt` (opt-in, +47/−2 in `src/program/generate.cpp`) When the variable is set, `consider()` scores a placement by the formula above for one chunk at its slowest stage. The decode window only breaks ties. - **The link speeds and layer times are the ones the engine already probes.** The chunk is `STRATA_SPLIT_PROMPT_CHUNK`, or `--prefill N`, or else 8192. - **The startability gate is unchanged.** - **The log says why the split was picked:** ``` layer split auto (STRATA_SPLIT_OBJECTIVE=prompt): K=23 - predicted 5824 ms per 8192-token prompt chunk at its slowest stage, 63.7 ms per decode window layer split auto (prompt): CUDA0 layers 0-22, per chunk: experts in 2983 ms over 12.4 GB/s, compute 5824 ms layer split auto (prompt): CUDA1 layers 23-47, per chunk: experts in 5823 ms over 6.9 GB/s, compute 3250 ms ``` - **Unset, the behaviour is unchanged:** same K=18, same log. Same build, same session: | | K | chunk | 31.1K | 26.2K | decode after 4K | |---|---|---|---|---|---| | auto | 18 | 6,144 | 44.13 s | 39.33 s | 27.2 / 33.0 tok/s | | `STRATA_SPLIT_OBJECTIVE=prompt` | 23 | 8,192 | **32.86 s (−26%)** | **32.16 s (−18%)** | 28.4 / 33.0 tok/s | Part of the gain is the chunk: at K=23 the auto chunk came out at 8,192, so the prompt needs 4 chunks instead of 6. Auto cannot use stage trim, so the hand-picked K=24 + trim + AUTO_MAX (29.2 s) stays about 3.7 s ahead. ### Related - **#2393 / PR #2385** proposed `--layer-split-objective interactive|prompt|decode`. Both were closed in the 0.2.0-beta tracker reset, not rejected. - Its prompt objective takes the slowest stage of layer time plus the decode miss cost from the routed mass the caches hold. - The difference here is the bytes term. On this rig the prompt read streams nearly every expert of every layer per chunk whatever the cache holds (φ = 0 above), so the decode miss model does not predict it. - **#509** (3080 + V100 on x4, auto 2.86x slower on prefill) and **#2052** (4080 + 3060, both x8 Gen4, prefill 1000 → 250-300 tok/s on two cards; still open) look like the same pattern. - **#2644** and **#1616** are the share and three-layer passes. With the prompt objective the first pick is not a tiny stage, so they do not trigger. ### Questions on scope 1. Is an opt-in objective for the prompt read wanted? If so, which form: an env variable like the prototype, or `--layer-split-objective prompt` as in #2385? I would rather build on #2385's flag than open a competing one. 2. Should the bytes term (n_expert × slot / link) replace or join the miss-cost term in the prompt objective? 3. Could `auto` use stage trim once the split is chosen? Today trim needs an explicit K. On this rig trim is worth another ~3-4 s by letting the auto chunk grow to 8,192. 4. **A note on four or more cards. I leave this to you.** The prototype was measured on two cards only. By reading the code it would also reach the three-GPU search (not run), but not the four-GPU one. - The four-GPU search scores its placements itself, and beyond four the layers are shared in proportion to speed. - The same min-max over stages could apply there: prefix sums of the bytes per layer for four cards, a DP for more. - With more stages, though, the pipeline fill may need a (chunks + stages − 1) term that two cards do not show (α = 0 above). - I cannot measure that without a four-card rig, so I mention it only as a possibility. ### Validation **Passed:** - **Build:** CUDA build of the prototype on v0.2.10 (`ffa80d73`): sm_86;120, CUDA 13.3, g++ 15, `STRATA_ISA_FLOOR=avx`, 170/170. - **Runs:** the tables above, on Fedora 44 with driver 615.71.09. Every run is 0.2.10 chunk-major with all experts in RAM. **Not run:** - HIP and SYCL builds. - Three or four GPUs; I have only two cards. - **Unconfirmed static analysis:** the three-GPU search goes through the same `consider()`, so the variable would change its scoring too. I have not run it on three cards and do not know whether the formula holds there; the pipeline fill may matter more with three stages. - The four-GPU search scores its placements itself, so the prototype leaves it unchanged. - Other models and other cards. `c` = 0.0212 comes from one nsys run on this pair. - Layer-major, and experts read from the drive. AI-assisted: Claude Code ran the measurements on my machine and drafted this; the numbers and log lines are from those runs.
Author
Owner

@udqe commented on GitHub (Nov 5, 2026):

The other half of the control for this model: a pair whose links are equal enough that the pathology cannot form. Same engine, and conveniently we booted STRATA_PREFILL_TIMING=1 this morning for the other thread (#5202), so the per-phase summaries are fresh.

Our box: 2x RTX 4090 Windows pair under a fixed layer split (22), links the engine probes as near-identical Gen4 x16 - the gap is nowhere near the 4x gate of link_miss_scale either, but unlike your rig the two stages would balance even if the gate moved. Per-prompt summaries of 150 K-295 K reads: the copy side of the read is wait copy 2.8 % and gather 1.0 % of the GPU timeline at 295 K (941 ms select and 3,415 ms select across sizes aside) - the read is owned by embed+steps ~25 %, the expert GEMMs ~28 % and dequant ~16 %. That is the symmetric-link prediction of your own model: when link GBps is equal, the min-max over stages balances by construction, the byte term stops discriminating between placements, and the decode-chosen split serves prompts nearly as well - which matches our season: our split was picked on decode measurements early in the season and we have never measured a prompt-side regret against it at these sizes. Your issue is therefore the clean statement of what the pathology actually is: an unequal link crossed with a chunk-size cliff, not chunk-major streaming per se - on equal fast links the same streaming is real (your phi = 0 holds here too: our cache never stopped the stream) and merely cheap.

On your question 3, a production data point: our config has run STRATA_STAGE_TRIM=1 with a hand-picked split since early in the season (it is one of the eight env keys we quote in our footers), and through 168 engine boots of varied traffic the trim path has produced no failure we have had to chase; our auto prompt chunk reads 8192 in today's log. We cannot answer "would auto pick a trim-compatible K" - no auto here after the initial search - but the trim engine itself is stable enough in our traffic mix to survive being an auto-side default, which is what your question is really probing.

On question 1, with a fact checked on today's tree: #2385 closed unmerged, and --layer-split-objective does not exist in main at 2026-11-03 (grep empty) - so "build on #2385's flag" is really "resurrect that flag surface", and worth saying out loud to the maintainer, because #2385's interactive objective (decode optimum first, prompt-pipeline min-max only among non-regressing placements) is already half of your design, missing exactly your bytes term. If the surface returns, your objective slots in as its prompt mode with the byte term as the scoring function, and the env-vs-flag question answers itself in the planner's own vocabulary. Either way keep the prototype's three log lines - your own PR #5255 is the argument: a placement decision that prints its numbers (predicted X ms per chunk at its slowest stage) is reviewable by a reader who cannot run your rig. The link_miss_scale line you cite is real, by the way: generate.cpp:5773 (main@11-03) comments "only from a 4x gap on" verbatim - the search really is blind to your 1.8x pair today.

Offer and caveats: today's three summaries (150,691 / 199,339 / 294,925 tokens with full phase lists) are yours to fold in as symmetric-link validation rows if they help the fit - with the honest caveat that our pair runs --pcie-frac 0.20, so our per-chunk streamed set is not your near-512-of-512, and the transferable numbers are the copy-phase shares rather than the bytes; the timing run itself costs ~4 % of read rate (declared there too); and we have not built or run your prototype, so nothing here tests the objective itself, only the model's symmetric prediction.

Scope: measurement quotes are from our production log today (protocol and the TIMING-overhead caveat disclosed in #5202); user, not maintainer, on a box shape your sweep does not cover (equal links) and covers in kind (Windows).

(ai-assisted; our quoted lines from production boot 2026-11-05 11:09 JST, per-prompt strata prefill timing summaries)

<!-- gh-comment-id:6648134512 --> @udqe commented on GitHub (Nov 5, 2026): The other half of the control for this model: a pair whose links are equal enough that the pathology cannot form. Same engine, and conveniently we booted `STRATA_PREFILL_TIMING=1` this morning for the other thread (#5202), so the per-phase summaries are fresh. Our box: 2x RTX 4090 Windows pair under a fixed layer split (22), links the engine probes as near-identical Gen4 x16 - the gap is nowhere near the 4x gate of `link_miss_scale` either, but unlike your rig the two stages would balance even if the gate moved. Per-prompt summaries of 150 K-295 K reads: the copy side of the read is `wait copy 2.8 %` and `gather 1.0 %` of the GPU timeline at 295 K (941 ms select and 3,415 ms select across sizes aside) - the read is owned by embed+steps ~25 %, the expert GEMMs ~28 % and dequant ~16 %. That is the symmetric-link prediction of your own model: when link GBps is equal, the min-max over stages balances by construction, the byte term stops discriminating between placements, and the decode-chosen split serves prompts nearly as well - which matches our season: our split was picked on decode measurements early in the season and we have never measured a prompt-side regret against it at these sizes. Your issue is therefore the clean statement of what the pathology actually is: an unequal link crossed with a chunk-size cliff, not chunk-major streaming per se - on equal fast links the same streaming is real (your phi = 0 holds here too: our cache never stopped the stream) and merely cheap. On your question 3, a production data point: our config has run `STRATA_STAGE_TRIM=1` with a hand-picked split since early in the season (it is one of the eight env keys we quote in our footers), and through 168 engine boots of varied traffic the trim path has produced no failure we have had to chase; our auto prompt chunk reads 8192 in today's log. We cannot answer "would auto pick a trim-compatible K" - no auto here after the initial search - but the trim engine itself is stable enough in our traffic mix to survive being an auto-side default, which is what your question is really probing. On question 1, with a fact checked on today's tree: #2385 closed unmerged, and `--layer-split-objective` does not exist in main at 2026-11-03 (grep empty) - so "build on #2385's flag" is really "resurrect that flag surface", and worth saying out loud to the maintainer, because #2385's `interactive` objective (decode optimum first, prompt-pipeline min-max only among non-regressing placements) is already half of your design, missing exactly your bytes term. If the surface returns, your objective slots in as its `prompt` mode with the byte term as the scoring function, and the env-vs-flag question answers itself in the planner's own vocabulary. Either way keep the prototype's three log lines - your own PR #5255 is the argument: a placement decision that prints its numbers (`predicted X ms per chunk at its slowest stage`) is reviewable by a reader who cannot run your rig. The `link_miss_scale` line you cite is real, by the way: `generate.cpp:5773` (main@11-03) comments "only from a 4x gap on" verbatim - the search really is blind to your 1.8x pair today. Offer and caveats: today's three summaries (150,691 / 199,339 / 294,925 tokens with full phase lists) are yours to fold in as symmetric-link validation rows if they help the fit - with the honest caveat that our pair runs `--pcie-frac 0.20`, so our per-chunk streamed set is not your near-512-of-512, and the transferable numbers are the copy-phase shares rather than the bytes; the timing run itself costs ~4 % of read rate (declared there too); and we have not built or run your prototype, so nothing here tests the objective itself, only the model's symmetric prediction. Scope: measurement quotes are from our production log today (protocol and the TIMING-overhead caveat disclosed in #5202); user, not maintainer, on a box shape your sweep does not cover (equal links) and covers in kind (Windows). (ai-assisted; our quoted lines from production boot 2026-11-05 11:09 JST, per-prompt `strata prefill timing` summaries)
Author
Owner

@Norhiro commented on GitHub (Nov 5, 2026):

@udqe thank you. The symmetric pair is the control this needed, and "an unequal link crossed with a chunk-size cliff, not chunk-major streaming per se" is a better statement of the problem than mine.

Your data. Yes please, the three summaries would help. I would use them for what they can show:

  • What I can test: on equal x16 links, the copy side stays a small share of the read, so the decode-chosen split loses little on prompts.
  • What I cannot test: your bytes. With --pcie-frac 0.20 your stream is not the near-512-of-512 set mine is, so I would not fit N or φ from them.
  • What would make the rows comparable: if the summaries carry the chunk size and the probed link GB/s per card, I can put your rig through the same formula. The question is whether it predicts that the byte term does not discriminate between placements there. If they don't, the copy shares alone are still a useful second machine.

Question 3. 168 boots of STRATA_STAGE_TRIM=1 with a hand-picked split and no failure to chase is the evidence the "could auto trim" question needed. Thank you for writing it down.

Question 1, restated after your check. You are right: --layer-split-objective is not in main, so building on #2385 means bringing that flag back, not reusing it. For the maintainers, the proposal is:

  1. Revive --layer-split-objective decode|prompt. decode stays the default and keeps today's behaviour byte for byte.
  2. Make prompt score a placement by the slowest stage per chunk. Each stage costs max(layers × n_expert × slot bytes / its probed link, layers × c × layer_ms × chunk), the formula above. #2385's prompt objective used the decode miss cost from the routed mass the caches hold. On this rig that cost does not predict the prompt read (φ = 0).
  3. Keep the three log lines. They show the predicted ms per chunk at the slowest stage, then each stage's receive and compute. Then a reader without the rig can check why a split was picked, the same argument as in #5255.
  4. Leave out #2385's interactive objective (decode optimum first, prompt min-max only among non-regressing placements) unless the maintainers want it. On this pair it cannot reach K=23. The decode prediction rises from 60.0 to 63.7 ms, but the measured decode did not drop.

I have not written the flag version yet; the prototype is still the env variable. I will turn it into the flag form if the scope is agreeable.

I had not used STRATA_PREFILL_TIMING=1. I will run it next time beside nsys, so the phase shares here can be compared with yours on the same footing.

<!-- gh-comment-id:6648229915 --> @Norhiro commented on GitHub (Nov 5, 2026): @udqe thank you. The symmetric pair is the control this needed, and "an unequal link crossed with a chunk-size cliff, not chunk-major streaming per se" is a better statement of the problem than mine. **Your data.** Yes please, the three summaries would help. I would use them for what they can show: - **What I can test:** on equal x16 links, the copy side stays a small share of the read, so the decode-chosen split loses little on prompts. - **What I cannot test:** your bytes. With `--pcie-frac 0.20` your stream is not the near-512-of-512 set mine is, so I would not fit N or φ from them. - **What would make the rows comparable:** if the summaries carry the chunk size and the probed link GB/s per card, I can put your rig through the same formula. The question is whether it predicts that the byte term does not discriminate between placements there. If they don't, the copy shares alone are still a useful second machine. **Question 3.** 168 boots of `STRATA_STAGE_TRIM=1` with a hand-picked split and no failure to chase is the evidence the "could auto trim" question needed. Thank you for writing it down. **Question 1, restated after your check.** You are right: `--layer-split-objective` is not in main, so building on #2385 means bringing that flag back, not reusing it. For the maintainers, the proposal is: 1. **Revive `--layer-split-objective decode|prompt`.** `decode` stays the default and keeps today's behaviour byte for byte. 2. **Make `prompt` score a placement by the slowest stage per chunk.** Each stage costs `max(layers × n_expert × slot bytes / its probed link, layers × c × layer_ms × chunk)`, the formula above. #2385's prompt objective used the decode miss cost from the routed mass the caches hold. On this rig that cost does not predict the prompt read (φ = 0). 3. **Keep the three log lines.** They show the predicted ms per chunk at the slowest stage, then each stage's receive and compute. Then a reader without the rig can check why a split was picked, the same argument as in #5255. 4. **Leave out #2385's `interactive` objective** (decode optimum first, prompt min-max only among non-regressing placements) unless the maintainers want it. On this pair it cannot reach K=23. The decode prediction rises from 60.0 to 63.7 ms, but the measured decode did not drop. I have not written the flag version yet; the prototype is still the env variable. I will turn it into the flag form if the scope is agreeable. I had not used `STRATA_PREFILL_TIMING=1`. I will run it next time beside nsys, so the phase shares here can be compared with yours on the same footing.
Author
Owner

@udqe commented on GitHub (Nov 5, 2026):

The two fields you asked for, plus one wrinkle about where our link numbers come from - it matters for how comparable they are.

  • Chunk: 8192 on the TIMING boot (the per-chunk lines read 8192 tokens each; same session as the three summaries, boot 2026-11-05 11:09 JST).
  • Probed links: CUDA0 26.4 GB/s, CUDA1 26.4 GB/s, both "miss cost x1.00". Wrinkle: on this engine those lines print only during an auto search - our production boots with the fixed split and print nothing about links (all 92 link lines in our log are search boots), so the values above are from the 2026-10-31 04:55 boot, the last time the search ran. Same-boot serve line for context: PCIe share: the CPU pool takes 50 us per missed expert (62.7 GB/s of expert bytes), the link 26.4 GB/s -> pcie_frac 0.20 (was 0.55 - ours is a manual override, and this is the line where our per-chunk streamed set is capped before your n_expert term; quoting it rather than interpreting it, since the exact pool/link split is yours to read as the code says.
  • Slot bytes: 14.82 GiB / 5,064 slots on CUDA0 and 16.71 GiB / 5,737 slots on CUDA1 - 2.98-3.00 MiB a slot, i.e. your 3.14 MB decimal a copy. Same model on both rigs, so the bytes per expert agree and your formula's slot term transfers even though the streamed count does not.
  • Layers per stage as already stated: 22 / 26.

One caveat that generalizes to your 12.3 and 6.9: our season-long probe record shows CUDA0 reading 6.7 GB/s in 10 of 57 starts (CUDA1 never read low), and a boot that takes a misprobe runs with it all day. If the objective ever scores placements from a fresh probe, a single-start value is a fragile input on Windows; your logged predicted-ms line is what makes that failure visible, which is one more argument for keeping it.

For your run beside nsys: the per-chunk line carries GPU timeline X ms, wall Y ms, host staging Z ms - share comparisons are cleanest on the GPU timeline column, and host staging drifts upward within a prompt as chunks queue behind the GPU (ours grew 391 to 5,344 ms across one 150 K read), so don't read that column as a stall rate.

The three summaries plus these fields are then a full row for the symmetric case: equal probed links, x1.00 both sides, 8192 chunk, 3.14 MB slots, and a read owned by embed+GEMM+dequant with the copy side at 2.8 % + 1.0 %. If your formula lands on "the byte term does not discriminate here", the rig and the numbers say the same thing from opposite ends of the link-gate.

Since nobody else seems to: we pulled your four related issues today and they check out as described - #509 is a gen3 x4 riser on the V100 side (2.86x prefill gap), #2052 is indeed still open, and #2644/#1616 are the tiny-stage passes, with #1616's chunk clamp from a one-layer card being the same #448 machinery your 1,473/1,472-slot cliff rides on. The lineage in your issue is real, not recycled.

(ai-assisted; quoted lines from our engine log, boots 2026-10-31 04:55 and 2026-11-05 11:09 JST)

<!-- gh-comment-id:6648409114 --> @udqe commented on GitHub (Nov 5, 2026): The two fields you asked for, plus one wrinkle about where our link numbers come from - it matters for how comparable they are. - **Chunk: 8192** on the TIMING boot (the per-chunk lines read 8192 tokens each; same session as the three summaries, boot 2026-11-05 11:09 JST). - **Probed links: CUDA0 26.4 GB/s, CUDA1 26.4 GB/s, both "miss cost x1.00".** Wrinkle: on this engine those lines print only during an auto search - our production boots with the fixed split and print nothing about links (all 92 link lines in our log are search boots), so the values above are from the 2026-10-31 04:55 boot, the last time the search ran. Same-boot serve line for context: `PCIe share: the CPU pool takes 50 us per missed expert (62.7 GB/s of expert bytes), the link 26.4 GB/s -> pcie_frac 0.20 (was 0.55` - ours is a manual override, and this is the line where our per-chunk streamed set is capped before your n_expert term; quoting it rather than interpreting it, since the exact pool/link split is yours to read as the code says. - **Slot bytes: 14.82 GiB / 5,064 slots on CUDA0 and 16.71 GiB / 5,737 slots on CUDA1 - 2.98-3.00 MiB a slot, i.e. your 3.14 MB decimal a copy.** Same model on both rigs, so the bytes per expert agree and your formula's slot term transfers even though the streamed count does not. - Layers per stage as already stated: 22 / 26. One caveat that generalizes to your 12.3 and 6.9: our season-long probe record shows CUDA0 reading **6.7 GB/s in 10 of 57 starts** (CUDA1 never read low), and a boot that takes a misprobe runs with it all day. If the objective ever scores placements from a fresh probe, a single-start value is a fragile input on Windows; your logged predicted-ms line is what makes that failure visible, which is one more argument for keeping it. For your run beside nsys: the per-chunk line carries `GPU timeline X ms, wall Y ms, host staging Z ms` - share comparisons are cleanest on the GPU timeline column, and host staging drifts upward within a prompt as chunks queue behind the GPU (ours grew 391 to 5,344 ms across one 150 K read), so don't read that column as a stall rate. The three summaries plus these fields are then a full row for the symmetric case: equal probed links, x1.00 both sides, 8192 chunk, 3.14 MB slots, and a read owned by embed+GEMM+dequant with the copy side at 2.8 % + 1.0 %. If your formula lands on "the byte term does not discriminate here", the rig and the numbers say the same thing from opposite ends of the link-gate. Since nobody else seems to: we pulled your four related issues today and they check out as described - #509 is a gen3 x4 riser on the V100 side (2.86x prefill gap), #2052 is indeed still open, and #2644/#1616 are the tiny-stage passes, with #1616's chunk clamp from a one-layer card being the same #448 machinery your 1,473/1,472-slot cliff rides on. The lineage in your issue is real, not recycled. (ai-assisted; quoted lines from our engine log, boots 2026-10-31 04:55 and 2026-11-05 11:09 JST)
Author
Owner

@Norhiro commented on GitHub (Nov 5, 2026):

@udqe thank you for the fields, and for checking the four linked issues. Here is the follow-up I promised, plus one result that tests the formula harder than the K sweep did.

Your rig in the formula. With equal links the byte term grows with the layer count at the same rate on both stages. Even with N = 516 as an upper bound (your pcie_frac 0.20 streams fewer), it is about 1.35 s per 8,192-token chunk for 22 layers and 1.60 s for 26. So it points to the same split the compute term does, and does not discriminate. That matches your 2.8 % + 1.0 % copy share and the decode-chosen split serving prompts fine.

Probe stability, the other end. On this Linux box the probe never misread: 71 boots logged, CUDA0 (3060, Gen3 x16) at 12.3–12.4 GB/s and CUDA1 (5060 Ti, Gen3 x8) at 6.7–6.9 GB/s. With your 10 of 57 low reads on Windows, I agree a single-boot value is a fragile input. So the predicted-ms line should print the GB/s it priced, so a misprobe shows up in the same line.

STRATA_PREFILL_TIMING=1 on this pair (31.1K prompt, GPU-timeline column as you suggested):

  • Auto split (K = 18, chunk 6,400): the 5060 Ti chunks spend 36–42 % in wait copy.
  • K = 24 + --trim-stage-weights + STRATA_PREFILL_AUTO_MAX=16384 (chunk 11,008): 14–23 %, and the 3060 becomes compute-bound (attn 23 %, GEMM 26 %, wait copy 1 %).
  • TIMING itself cost +4.4 % here (30.32 s vs 29.03–29.08 s), close to your ~4 %.

K sweep and repeats (trim, chunk 8,192, 31.1K):

K 22 23 24 25 26
measured (s) 30.51 29.63 29.89 30.13 30.65
formula (s) 30.1 — 29.4 — 30.4

Three restarts of the best config gave 29.03 / 29.08 / 29.04 s, so ±0.05 s between boots.

A harder test: NVFP4 experts on the same pair. Same build, all experts in RAM, w4a8 on both cards (the 3060 has no FP4 MMA; asking for w4a4 printed the per-card fallback note, as documented). The expert copy shrinks from 3.15 to 2.76 MB, and the auto chunk grows with the freed VRAM:

experts, K auto chunk 31.1K (s) 26.2K (s) decode (tok/s)
UD-Q4_K_XL, 24 10,752 29.00 28.22 29.5–37.1
NVFP4-GPTQ, 24 13,824 28.92 23.71 40.4–45.0
NVFP4-GPTQ, 21 14,848 29.84 22.99 41.3–45.6
NVFP4-GPTQ, 18 15,872 24.78 / 25.22 23.82 / 24.36 39.1–44.1
NVFP4-GPTQ, 16 16,128 26.32 24.91 38.8–41.7

The best K moves from 24 to 18. With smaller copies the 5060 Ti's receive is no longer the limit. The 3060's compute is, at about 1.8x the 5060 Ti's time per layer, so the 3060 gets fewer layers. Fewer layers on the 3060 also frees enough VRAM for a 15,872-token chunk, which reads 31.1K in two chunks instead of three.

I priced each stage with per-layer copy sizes (UD mixes Q4_K/Q5_K, so even UD needs that) and read the chunk off a short engine start for each candidate. On that basis the formula ranked NVFP4 K = 18 first. It reads 1–3 s low on NVFP4, though, so the compute coefficients are not right for that format yet.

What this means for the proposal:

  1. Per-layer bytes. The prompt score should sum the stage's own layers' copy sizes, not use one slot size. The prototype already takes cost(l) per layer.
  2. Both terms. max(receive, compute) is needed, not the byte term alone. The NVFP4 optimum is set by compute.
  3. Chunk size is still outside the formula. The auto chunk comes out of the VRAM plan after the split is chosen. The cliff (two vs three chunks here) is worth as much as the split itself. I would rather say plainly that the objective does not model it than pretend it does. The logged line is how a reader would see it.

RAG answers on a fixed 16-question set scored the same for UD and NVFP4-GPTQ. That is a narrow check, not a quality claim.

<!-- gh-comment-id:6652736259 --> @Norhiro commented on GitHub (Nov 5, 2026): @udqe thank you for the fields, and for checking the four linked issues. Here is the follow-up I promised, plus one result that tests the formula harder than the K sweep did. **Your rig in the formula.** With equal links the byte term grows with the layer count at the same rate on both stages. Even with N = 516 as an upper bound (your `pcie_frac 0.20` streams fewer), it is about 1.35 s per 8,192-token chunk for 22 layers and 1.60 s for 26. So it points to the same split the compute term does, and does not discriminate. That matches your 2.8 % + 1.0 % copy share and the decode-chosen split serving prompts fine. **Probe stability, the other end.** On this Linux box the probe never misread: 71 boots logged, CUDA0 (3060, Gen3 x16) at 12.3–12.4 GB/s and CUDA1 (5060 Ti, Gen3 x8) at 6.7–6.9 GB/s. With your 10 of 57 low reads on Windows, I agree a single-boot value is a fragile input. So the predicted-ms line should print the GB/s it priced, so a misprobe shows up in the same line. **`STRATA_PREFILL_TIMING=1` on this pair** (31.1K prompt, GPU-timeline column as you suggested): - Auto split (K = 18, chunk 6,400): the 5060 Ti chunks spend 36–42 % in wait copy. - K = 24 + `--trim-stage-weights` + `STRATA_PREFILL_AUTO_MAX=16384` (chunk 11,008): 14–23 %, and the 3060 becomes compute-bound (attn 23 %, GEMM 26 %, wait copy 1 %). - TIMING itself cost +4.4 % here (30.32 s vs 29.03–29.08 s), close to your ~4 %. **K sweep and repeats** (trim, chunk 8,192, 31.1K): | K | 22 | 23 | 24 | 25 | 26 | |---|---|---|---|---|---| | measured (s) | 30.51 | 29.63 | 29.89 | 30.13 | 30.65 | | formula (s) | 30.1 | — | 29.4 | — | 30.4 | Three restarts of the best config gave 29.03 / 29.08 / 29.04 s, so ±0.05 s between boots. **A harder test: NVFP4 experts on the same pair.** Same build, all experts in RAM, `w4a8` on both cards (the 3060 has no FP4 MMA; asking for `w4a4` printed the per-card fallback note, as documented). The expert copy shrinks from 3.15 to 2.76 MB, and the auto chunk grows with the freed VRAM: | experts, K | auto chunk | 31.1K (s) | 26.2K (s) | decode (tok/s) | |---|---|---|---|---| | UD-Q4_K_XL, 24 | 10,752 | 29.00 | 28.22 | 29.5–37.1 | | NVFP4-GPTQ, 24 | 13,824 | 28.92 | 23.71 | 40.4–45.0 | | NVFP4-GPTQ, 21 | 14,848 | 29.84 | 22.99 | 41.3–45.6 | | NVFP4-GPTQ, 18 | 15,872 | **24.78 / 25.22** | **23.82 / 24.36** | 39.1–44.1 | | NVFP4-GPTQ, 16 | 16,128 | 26.32 | 24.91 | 38.8–41.7 | The best K moves from 24 to 18. With smaller copies the 5060 Ti's receive is no longer the limit. The 3060's compute is, at about 1.8x the 5060 Ti's time per layer, so the 3060 gets fewer layers. Fewer layers on the 3060 also frees enough VRAM for a 15,872-token chunk, which reads 31.1K in two chunks instead of three. I priced each stage with per-layer copy sizes (UD mixes Q4_K/Q5_K, so even UD needs that) and read the chunk off a short engine start for each candidate. On that basis the formula ranked NVFP4 K = 18 first. It reads 1–3 s low on NVFP4, though, so the compute coefficients are not right for that format yet. What this means for the proposal: 1. **Per-layer bytes.** The prompt score should sum the stage's own layers' copy sizes, not use one slot size. The prototype already takes `cost(l)` per layer. 2. **Both terms.** `max(receive, compute)` is needed, not the byte term alone. The NVFP4 optimum is set by compute. 3. **Chunk size is still outside the formula.** The auto chunk comes out of the VRAM plan after the split is chosen. The cliff (two vs three chunks here) is worth as much as the split itself. I would rather say plainly that the objective does not model it than pretend it does. The logged line is how a reader would see it. RAG answers on a fixed 16-question set scored the same for UD and NVFP4-GPTQ. That is a narrow check, not a quality claim.
Author
Owner

@udqe commented on GitHub (Nov 6, 2026):

Convergence note: since the exchange above, the two halves of this ask have each grown an independent witness on a third and fourth machine, and there is now code moving toward the same seam from a different direction. None of it tests your formula on new byte-cells - the two rows I can add are about the piece that applies even when the link term cannot discriminate, which is exactly your symmetric-pair conclusion.

Row 1 - the equal-link short-prompt cost, on a third machine. #5376 (RX 9070 pair, same UD-Q4_K_XL pack as our control, both cards x8 PCIe 5.0 so links are as equal as ours): dual versus single, same profile, three repetitions per case. At 16K prompts the second card pays the way your formula says it should (prompt rate +33%, TTFT -25%). But the SHORT case moves the wrong way: TTFT 0.60 s single -> 0.96 s dual (+60%), totals +25%. That is on a pair where link_miss_scale would score both stages x1.00 and the byte term would balance - the pathology your rig caught at 31K does not need an unequal link to show up at the other end of the size range; a fixed per-request split cost is enough. If auto priced the read at all, this is the cell where it should say "the decode-chosen split costs a short prompt 0.36 s" - today nothing says it.

Row 2 - a crossover documented at the doc level, the fourth machine. #5187 measured the same trade end to end (2x 4060 Ti 16 GB, split engine versus stock layer split, agent workload): the layer split wins where requests are long and loses below about 730 generated tokens per request, with the crossover now printed in docs/SPLIT_ENGINE.md itself, stated with the one-machine-one-run caveat. Same physics as the decode-chosen-split question here: the right answer depends on work per request, so a price that is constant in request length cannot be the last word.

The code is moving too, from PRs rather than reports. #4534 (price a pipelined two-stage split) and #4549 (keep the draft head's room out of the split search) are both live and both in this search's territory - #4549 is literally about a term the search over-counts by the draft-head reservation, which is our box's shape (283 MiB printed per boot). Whatever the formula's final shape, it should absorb those two without breaking the byte term this thread worked out.

Where I would still add one term, agreed with your thread's conclusion rather than against it: on equal-link pairs - the class this thread now covers from two sides (ours at 26.4/26.4 GB/s probed, the 9070 pair at x8 5.0) - the stream term does not discriminate, and the only thing left that the search cannot see is the fixed cost per request: hand-off, first-chunk latency, and the short-prompt penalty above. A probe-time constant, measurable once at boot the way the links already are, would make the search honest on symmetric pairs without touching your unequal-link formula at all. Two of the four machines in this thread's evidence set are symmetric; that class is the common case, and it is currently the one the search optimizes blind.

Numbers quoted from #5376 (medians of n=3, complete runs, both 12/12) and #5187 (their table, one run each, stated as such by their author); our own rig's fields are in the comments above and unchanged.

<!-- gh-comment-id:6680709498 --> @udqe commented on GitHub (Nov 6, 2026): Convergence note: since the exchange above, the two halves of this ask have each grown an independent witness on a third and fourth machine, and there is now code moving toward the same seam from a different direction. None of it tests your formula on new byte-cells - the two rows I can add are about the piece that applies even when the link term cannot discriminate, which is exactly your symmetric-pair conclusion. **Row 1 - the equal-link short-prompt cost, on a third machine.** #5376 (RX 9070 pair, same UD-Q4_K_XL pack as our control, both cards x8 PCIe 5.0 so links are as equal as ours): dual versus single, same profile, three repetitions per case. At 16K prompts the second card pays the way your formula says it should (prompt rate +33%, TTFT -25%). But the SHORT case moves the wrong way: TTFT 0.60 s single -> 0.96 s dual (+60%), totals +25%. That is on a pair where `link_miss_scale` would score both stages x1.00 and the byte term would balance - the pathology your rig caught at 31K does not need an unequal link to show up at the other end of the size range; a fixed per-request split cost is enough. If `auto` priced the read at all, this is the cell where it should say "the decode-chosen split costs a short prompt 0.36 s" - today nothing says it. **Row 2 - a crossover documented at the doc level, the fourth machine.** #5187 measured the same trade end to end (2x 4060 Ti 16 GB, split engine versus stock layer split, agent workload): the layer split wins where requests are long and loses below about **730 generated tokens per request**, with the crossover now printed in `docs/SPLIT_ENGINE.md` itself, stated with the one-machine-one-run caveat. Same physics as the decode-chosen-split question here: the right answer depends on work per request, so a price that is constant in request length cannot be the last word. **The code is moving too, from PRs rather than reports.** #4534 (price a pipelined two-stage split) and #4549 (keep the draft head's room out of the split search) are both live and both in this search's territory - #4549 is literally about a term the search over-counts by the draft-head reservation, which is our box's shape (283 MiB printed per boot). Whatever the formula's final shape, it should absorb those two without breaking the byte term this thread worked out. **Where I would still add one term, agreed with your thread's conclusion rather than against it:** on equal-link pairs - the class this thread now covers from two sides (ours at 26.4/26.4 GB/s probed, the 9070 pair at x8 5.0) - the stream term does not discriminate, and the only thing left that the search cannot see is the fixed cost per request: hand-off, first-chunk latency, and the short-prompt penalty above. A probe-time constant, measurable once at boot the way the links already are, would make the search honest on symmetric pairs without touching your unequal-link formula at all. Two of the four machines in this thread's evidence set are symmetric; that class is the common case, and it is currently the one the search optimizes blind. Numbers quoted from #5376 (medians of n=3, complete runs, both 12/12) and #5187 (their table, one run each, stated as such by their author); our own rig's fields are in the comments above and unchanged.
Author
Owner

@Norhiro commented on GitHub (Nov 6, 2026):

@udqe thank you for collecting these. I measured the same short-prompt case on this pair before answering, because it tests which decision the per-request cost would change.

The standard benchmark, standard-v1, on this rig. Engine 0.1.57, NVFP4-GPTQ experts, one run each. The run is nonconforming only because I skipped model hashing.

short TTFT 4K TTFT 16K TTFT decode (short) sanity
pair, K=18 (3060 x16 first, 5060 Ti x8) 2.61 s 8.30 s 20.75 s 45.2 tok/s 12/12
5060 Ti alone (x8) 1.51 s 10.25 s 21.87 s 33.6 tok/s 11/12
3060 alone (x16) 1.42 s 9.75 s 36.63 s 26.5 tok/s 12/12

The 11/12 is one miss on I2 at temperature 1.0. So the #5376 shape shows up here too: the pair loses on the short prompt and wins from 4K on. On this rig the short-prompt cost is about 1.1 s, not 0.36 s.

On an unequal pair that cost depends on K. I timed only the read of an ~80-token prompt (engine prompt_ms, 10 prompts with distinct first tokens, so there was no prefix reuse):

K (layers on the x16 card) 12 18 24 30 5060 Ti alone
prompt_ms, median 2,677 2,456 2,230 1,994 1,353

The read gets about 38 ms faster per layer moved to the x16 card. Each layer costs about 27 ms on the 3060 stage and 65 ms on the 5060 Ti stage. The 2.4x gap is wider than the 1.8x link ratio, so it is not only bytes over the link. Extending the line to K=48 gives about 1.3 s, close to the 3060 alone (1.12–1.39 s). That leaves little room for a fixed split cost on this rig, but it is an extension of a line, not a measurement. Four points on one line cannot separate a constant from the per-layer slope.

What I take from it.

  • On equal links you are right that a fixed per-request cost is what is left. But a cost that is the same for every two-stage placement shifts all the scores by the same amount, so it cannot change which K wins. It only matters for one card versus two, which the search does not price today: it goes to one card only when a card is dropped.
  • On unequal links most of the short-prompt cost belongs in the per-stage terms. It already moves with K. It also points the other way from long prompts: short reads prefer more layers on the fast link (K=30), while my 31K reads with NVFP4 were fastest at K=18. So "which K" now depends on prompt length as well as the decode window.
  • Both points come back to a workload assumption. That is #5187's ~730-token crossover in a different decision. I would rather not have the search guess it from one boot.

So my proposal is to keep #5265 to choosing K within a fixed stage count, with the prompt length as an input. The prompt objective would score at a given prompt length, the auto chunk by default. The log line would print the predicted short-prompt cost next to the long one, so the trade is visible. One card versus two, with the fixed cost you describe, could be its own issue that prints the crossover length rather than choosing. I can write that up if you think it is worth filing.

(A side note on #5376: the "short" totals, 6.4 → 8.0 s, include output length under reasoning_effort xhigh. So I would quote the TTFT there, as you did, rather than the totals.)

#4534 and #4549. Both should fit without changing the byte term.

  • #4534 changes the decode price under --pipeline-windows 2, the slower stage instead of the sum. In the prompt objective the decode prediction only breaks ties, so it would change the tie-breaker and nothing else.
  • #4549 changes the last stage's cache room. That moves the slot count and the auto chunk, which the objective reads from the VRAM plan rather than modelling, so it would show up as a different chunk size in the log line.

I have not run either PR on this rig. The flag version (--layer-split-objective decode|prompt) is still waiting on a maintainer's view of the scope.

<!-- gh-comment-id:6688871832 --> @Norhiro commented on GitHub (Nov 6, 2026): @udqe thank you for collecting these. I measured the same short-prompt case on this pair before answering, because it tests which decision the per-request cost would change. **The standard benchmark, `standard-v1`, on this rig.** Engine 0.1.57, NVFP4-GPTQ experts, one run each. The run is nonconforming only because I skipped model hashing. | | short TTFT | 4K TTFT | 16K TTFT | decode (short) | sanity | |---|---|---|---|---|---| | pair, K=18 (3060 x16 first, 5060 Ti x8) | 2.61 s | 8.30 s | 20.75 s | 45.2 tok/s | 12/12 | | 5060 Ti alone (x8) | 1.51 s | 10.25 s | 21.87 s | 33.6 tok/s | 11/12 | | 3060 alone (x16) | 1.42 s | 9.75 s | 36.63 s | 26.5 tok/s | 12/12 | The 11/12 is one miss on I2 at temperature 1.0. So the #5376 shape shows up here too: the pair loses on the short prompt and wins from 4K on. On this rig the short-prompt cost is about 1.1 s, not 0.36 s. **On an unequal pair that cost depends on K.** I timed only the read of an ~80-token prompt (engine `prompt_ms`, 10 prompts with distinct first tokens, so there was no prefix reuse): | K (layers on the x16 card) | 12 | 18 | 24 | 30 | 5060 Ti alone | |---|---|---|---|---|---| | prompt_ms, median | 2,677 | 2,456 | 2,230 | 1,994 | 1,353 | The read gets about 38 ms faster per layer moved to the x16 card. Each layer costs about 27 ms on the 3060 stage and 65 ms on the 5060 Ti stage. The 2.4x gap is wider than the 1.8x link ratio, so it is not only bytes over the link. Extending the line to K=48 gives about 1.3 s, close to the 3060 alone (1.12–1.39 s). That leaves little room for a fixed split cost on this rig, but it is an extension of a line, not a measurement. Four points on one line cannot separate a constant from the per-layer slope. **What I take from it.** - **On equal links you are right that a fixed per-request cost is what is left.** But a cost that is the same for every two-stage placement shifts all the scores by the same amount, so it cannot change which K wins. It only matters for one card versus two, which the search does not price today: it goes to one card only when a card is dropped. - **On unequal links most of the short-prompt cost belongs in the per-stage terms.** It already moves with K. It also points the other way from long prompts: short reads prefer more layers on the fast link (K=30), while my 31K reads with NVFP4 were fastest at K=18. So "which K" now depends on prompt length as well as the decode window. - **Both points come back to a workload assumption.** That is #5187's ~730-token crossover in a different decision. I would rather not have the search guess it from one boot. **So my proposal is to keep #5265 to choosing K within a fixed stage count, with the prompt length as an input.** The `prompt` objective would score at a given prompt length, the auto chunk by default. The log line would print the predicted short-prompt cost next to the long one, so the trade is visible. One card versus two, with the fixed cost you describe, could be its own issue that prints the crossover length rather than choosing. I can write that up if you think it is worth filing. (A side note on #5376: the "short" totals, 6.4 → 8.0 s, include output length under `reasoning_effort xhigh`. So I would quote the TTFT there, as you did, rather than the totals.) **#4534 and #4549.** Both should fit without changing the byte term. - #4534 changes the decode price under `--pipeline-windows 2`, the slower stage instead of the sum. In the `prompt` objective the decode prediction only breaks ties, so it would change the tie-breaker and nothing else. - #4549 changes the last stage's cache room. That moves the slot count and the auto chunk, which the objective reads from the VRAM plan rather than modelling, so it would show up as a different chunk size in the log line. I have not run either PR on this rig. The flag version (`--layer-split-objective decode|prompt`) is still waiting on a maintainer's view of the scope.
Author
Owner

@udqe commented on GitHub (Nov 6, 2026):

Conceding your first point outright, then taking the second offer.

You are right about the constant: a term that is common to every placement shifts all scores by the same amount and cancels in the comparison. My "makes the search honest on symmetric pairs" line was written for the wrong question - inside a fixed two-card search it changes no K, and the decision it would actually change (one card versus two) is one the auto search does not currently make at all. So: agreed, the fixed-cost idea does not belong in this formula, and my row 1 (#5376's short case, TTFT 0.60 s -> 0.96 s on an equal-link pair) is a one-versus-two datum, not a K datum. Thanks for pinning that down.

Your K-vs-length table makes the scoping sharper than either of us had it. On your pair an ~80-token read goes 2,677 -> 1,994 ms going K=12 -> 30 (your fastest short-read placement puts most layers on the fast-link side and leaves the narrow stage the least to fill - short reads are dominated by what the slowest stage has to chew through once, not by the steady-state stream), while your 31.1K read is fastest at K=18. So the ranking the objective should produce flips inside two-card placements as a function of prompt length - which is exactly your proposal: keep #5265 about choosing K with prompt length as an input and predict the short-prompt cost alongside the long one. No byte-term change needed, as you said, and the prototype's shape survives.

The one-versus-two question is the one my fixed-cost framing was really groping at, and I think it is worth its own issue. Yes to opening it, and yes, please write it up - you have the unequal-pair half of the evidence set. What I can contribute from this box (2x RTX 4090, Windows, links probed 26.4/26.4 GB/s, main engine, fixed split 22):

  • a fresh length-vs-TTFT curve, single versus dual, on a common protocol: fresh (never-reused) prompts at roughly 80 / 256 / 1K / 2K / 4K / 8K / 16K tokens, n=5 per point, T=0, engine 0.1.57, TTFT read as client-clock first-non-empty-delta per your own note on #5376 - medians with min-max. That puts the crossover location on a symmetric-link pair with the same care your rig got on the unequal side, and if you open the issue I will run it and post it there.
  • two crossover points already measured by others, for the issue's framing: your #5187 reporter's split-engine box crosses at about 730 generated tokens per request against stock layer split (that number is now in docs/SPLIT_ENGINE.md itself, their one-run caveat stated), and #5376's 9070 pair crosses somewhere between 80 tokens (dual loses, TTFT +60%) and 4K (dual wins, TTFT -7.7%, totals at cap). Two equal-link boxes, two different crossover neighborhoods - which is the argument that the crossover needs measuring per box, the same conclusion this thread already reached for K.

One taxonomy suggestion for the write-up: there are two crossovers living under what looked like one. The axis I keep hitting (short prompt, dual worse than single, symmetric links, both quantizations) is cards-into-the-request: fixed per-request cost versus streaming gain, decided before any K matters. The axis your table exposes is layers-onto-which-card: min-max fill versus steady-state balance, decided inside a fixed card count. An issue that prices the first and leaves the second to this thread should not need to mention the byte term at all, which keeps it reviewable independently of this formula.

Numbers quoted: your K table and short-read rows as you posted them; #5376 medians (n=3, complete runs); #5187's documented crossover, one run, as stated by its author. Our curve, when posted, will carry its own repetition table.

(ai-assisted; all quoted lines pinned in our notes; happy to rerun any arm)

<!-- gh-comment-id:6692686529 --> @udqe commented on GitHub (Nov 6, 2026): **Conceding your first point outright, then taking the second offer.** You are right about the constant: a term that is common to every placement shifts all scores by the same amount and cancels in the comparison. My "makes the search honest on symmetric pairs" line was written for the wrong question - inside a fixed two-card search it changes no K, and the decision it would actually change (one card versus two) is one the auto search does not currently make at all. So: agreed, the fixed-cost idea does not belong in this formula, and my row 1 (#5376's short case, TTFT 0.60 s -> 0.96 s on an equal-link pair) is a one-versus-two datum, not a K datum. Thanks for pinning that down. Your K-vs-length table makes the scoping sharper than either of us had it. On your pair an ~80-token read goes 2,677 -> 1,994 ms going K=12 -> 30 (your fastest short-read placement puts most layers on the fast-link side and leaves the narrow stage the least to fill - short reads are dominated by what the slowest stage has to chew through once, not by the steady-state stream), while your 31.1K read is fastest at K=18. So the ranking the objective should produce flips *inside* two-card placements as a function of prompt length - which is exactly your proposal: keep #5265 about choosing K with prompt length as an input and predict the short-prompt cost alongside the long one. No byte-term change needed, as you said, and the prototype's shape survives. The one-versus-two question is the one my fixed-cost framing was really groping at, and I think it is worth its own issue. Yes to opening it, and yes, please write it up - you have the unequal-pair half of the evidence set. What I can contribute from this box (2x RTX 4090, Windows, links probed 26.4/26.4 GB/s, main engine, fixed split 22): - a fresh length-vs-TTFT curve, single versus dual, on a common protocol: fresh (never-reused) prompts at roughly 80 / 256 / 1K / 2K / 4K / 8K / 16K tokens, n=5 per point, T=0, engine 0.1.57, TTFT read as client-clock first-non-empty-delta per your own note on #5376 - medians with min-max. That puts the crossover location on a symmetric-link pair with the same care your rig got on the unequal side, and if you open the issue I will run it and post it there. - two crossover points already measured by others, for the issue's framing: your #5187 reporter's split-engine box crosses at about 730 generated tokens per request against stock layer split (that number is now in `docs/SPLIT_ENGINE.md` itself, their one-run caveat stated), and #5376's 9070 pair crosses somewhere between 80 tokens (dual loses, TTFT +60%) and 4K (dual wins, TTFT -7.7%, totals at cap). Two equal-link boxes, two different crossover neighborhoods - which is the argument that the crossover needs measuring per box, the same conclusion this thread already reached for K. One taxonomy suggestion for the write-up: there are two crossovers living under what looked like one. The axis I keep hitting (short prompt, dual worse than single, symmetric links, both quantizations) is cards-into-the-request: fixed per-request cost versus streaming gain, decided before any K matters. The axis your table exposes is layers-onto-which-card: min-max fill versus steady-state balance, decided inside a fixed card count. An issue that prices the first and leaves the second to this thread should not need to mention the byte term at all, which keeps it reviewable independently of this formula. Numbers quoted: your K table and short-read rows as you posted them; #5376 medians (n=3, complete runs); #5187's documented crossover, one run, as stated by its author. Our curve, when posted, will carry its own repetition table. (ai-assisted; all quoted lines pinned in our notes; happy to rerun any arm)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3134
No description provided.