[PR #4534] [Engine] split search: price a pipelined two-stage split by its slower stage (from Strata-DualGPU, #642) #5078

Open
opened 2026-11-07 16:32:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4534
Author: @cobra91
Created: 10/28/2026
Status: 🔄 Open

Base: main ← Head: pricing-standalone


📝 Commits (1)

  • 0682b2e Split search: price a pipelined two-stage split by its slower stage (from Strata-DualGPU)

📊 Changes

1 file changed (+16 additions, -0 deletions)

View changed files

📝 src/program/generate.cpp (+16 -0)

📄 Description

Problem and result

Asking for --pipeline-windows 2 on a two-card split makes the two stages overlap, but --layer-split auto still prices a placement as the sum of both stages' times. That price balances the cards' totals and starves the fast card's expert cache: on a 4060 Ti (chipset slot) + 5080 pair it picks K=23 of 48 layers (33.4 ms predicted per decode window). Priced by the slower stage - what an overlapped window actually costs, the last card also running the head and the draft chain (~12 of its layers) - the same search picks K=18 at 17.0 ms, and decode goes from ~34-39 to 48.1 tok/s sustained (same prompts, same rig). With #4522 also applied the two find K=18 together and reach 66.5 tok/s.

The price is Hardin22's, from the split search of his dual-GPU fork (the part of #642 that upstream has not taken); our measurements of that fork on this GPU class are in #4470. No maintainer agreement on scope yet - happy to discuss.

Approach

One block in the search's predict: when --pipeline-windows >= 2 and there are exactly two stages, return the slower stage's cost (its layers' time + 12 layers' worth on the last card for the head/draft chain + its own CPU-miss share) instead of the sum. Adapted from Strata-DualGPU to keep this tree's per-link miss scaling (link_scale); the serial price and every other stage count are unchanged, and nothing below the placement changes (the model's output does not depend on where the layers sit).

Validation

Engine built from main at 46c152a1 (MSVC 19.51 / Ninja / CUDA 13.4, arch 89;120). Host: serve/server.py with a config asking --pipeline-windows 2 and --layer-split auto; rates read from the engine log. Rig: RTX 5080 + RTX 4060 Ti 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Windows 11; Swift 1.5 IQ2_XS, 64K context, q4_0 KV, stock MTP draft, greedy, temperature 0.

Passed:

  • strata --help and a full model load: engine starts, layer split auto: K=18 - predicted 17.0 ms per decode window (stock main: K=23, 33.4 ms).
  • 1.9K-token greedy answer, fresh context: 48.1 tok/s sustained (stock main, same prompts: 34-39).
  • Same build with #4522 also applied: K=18, 66.5 tok/s sustained on a 3.3K-token answer; a real 23K-token chat answer averaged 78.4 tok/s.

Failed:

  • none observed.

Not run:

  • HIP, SYCL and Metal builds (no hardware); single-GPU and explicit-split paths are untouched by the hunk but were not re-benched; the desktop app's own host.

Limits

Measured on one rig and one model. With the split now filling the cards harder the later card can land low on free VRAM; the fork carries two follow-up changes for that (draft-head and second-verifier room kept out of the last card's cache) which I can bring separately. --vram-reserve-later-mib covers the margin meanwhile.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4534 **Author:** [@cobra91](https://github.com/cobra91) **Created:** 10/28/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pricing-standalone` --- ### 📝 Commits (1) - [`0682b2e`](https://github.com/Niko1221/Strata/commit/0682b2e0642c78031afde6134a6c59f7559708b8) Split search: price a pipelined two-stage split by its slower stage (from Strata-DualGPU) ### 📊 Changes **1 file changed** (+16 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/program/generate.cpp` (+16 -0) </details> ### 📄 Description ## Problem and result Asking for `--pipeline-windows 2` on a two-card split makes the two stages overlap, but `--layer-split auto` still prices a placement as the **sum** of both stages' times. That price balances the cards' totals and starves the fast card's expert cache: on a 4060 Ti (chipset slot) + 5080 pair it picks K=23 of 48 layers (33.4 ms predicted per decode window). Priced by the **slower** stage - what an overlapped window actually costs, the last card also running the head and the draft chain (~12 of its layers) - the same search picks K=18 at 17.0 ms, and decode goes from ~34-39 to **48.1 tok/s sustained** (same prompts, same rig). With #4522 also applied the two find K=18 together and reach 66.5 tok/s. ## Related discussion The price is Hardin22's, from the split search of his dual-GPU fork (the part of #642 that upstream has not taken); our measurements of that fork on this GPU class are in #4470. No maintainer agreement on scope yet - happy to discuss. ## Approach One block in the search's `predict`: when `--pipeline-windows >= 2` and there are exactly two stages, return the slower stage's cost (its layers' time + 12 layers' worth on the last card for the head/draft chain + its own CPU-miss share) instead of the sum. Adapted from Strata-DualGPU to keep this tree's per-link miss scaling (`link_scale`); the serial price and every other stage count are unchanged, and nothing below the placement changes (the model's output does not depend on where the layers sit). ## Validation Engine built from main at 46c152a1 (MSVC 19.51 / Ninja / CUDA 13.4, arch 89;120). Host: `serve/server.py` with a config asking `--pipeline-windows 2` and `--layer-split auto`; rates read from the engine log. Rig: RTX 5080 + RTX 4060 Ti 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Windows 11; Swift 1.5 IQ2_XS, 64K context, q4_0 KV, stock MTP draft, greedy, temperature 0. **Passed:** - `strata --help` and a full model load: engine starts, `layer split auto: K=18 - predicted 17.0 ms per decode window` (stock main: K=23, 33.4 ms). - 1.9K-token greedy answer, fresh context: 48.1 tok/s sustained (stock main, same prompts: 34-39). - Same build with #4522 also applied: K=18, 66.5 tok/s sustained on a 3.3K-token answer; a real 23K-token chat answer averaged 78.4 tok/s. **Failed:** - none observed. **Not run:** - HIP, SYCL and Metal builds (no hardware); single-GPU and explicit-split paths are untouched by the hunk but were not re-benched; the desktop app's own host. ## Limits Measured on one rig and one model. With the split now filling the cards harder the later card can land low on free VRAM; the fork carries two follow-up changes for that (draft-head and second-verifier room kept out of the last card's cache) which I can bring separately. `--vram-reserve-later-mib` covers the margin meanwhile. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5078
No description provided.