mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5118] [Other] Drafting: DFlash2 named on a layer split runs beside several requests (opt-in) #5314
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#5314
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/5118
Author: @Joe11221
Created: 11/3/2026
Status: 🔄 Open
Base:
main← Head:dflash2-parallel-split📝 Commits (3)
37f0806[Other] Drafting: DFlash2 named on a layer split runs beside several requests (opt-in)2b50ac1[Docs] Batching: DFlash2 with several requests on a layer split, measured on six mixed cardsf1e45f4[Other] Drafting: the split test follows the named DFlash2 beside several requests📊 Changes
7 files changed (+66 additions, -16 deletions)
View changed files
📝
docs/BATCHING.md(+23 -0)📝
serve/server.py(+2 -2)📝
strata_cli/drafting_cmd.py(+2 -1)📝
strata_cli/launch/runner.py(+2 -1)📝
strata_control/drafting.py(+14 -7)📝
tests/terminal/test_drafting.py(+14 -0)📝
tests/terminal/test_drafting_single.py(+9 -5)📄 Description
Problem and result
On a layer split, a run config with
"drafting": "dflash2"and"parallel": 2starts the MTP instead, with the note "DFlash2 isn't available in this mode". The 0.1.56 engine runs--draft dflash2beside--batch: a request running alone drafts with DFlash2, and the batch slots follow the engine's own slot-draft rule. Only the Terminal's plan (drafting.blocked_by) stops it.With this change, DFlash2 that the person names runs beside several requests on a layer split. Auto keeps the MTP there, one card keeps the MTP, and
--pipeline-windowsstill blocks DFlash2. Without a nameddflash2on a split with several requests, the engine arguments are the same as before.Measured on six mixed cards (below), two slots cost both drafters the same share of a lone request's speed, and two slots answered three short requests about 13% sooner than one at a time with either drafter:
"parallel": 2DFlash2 itself ran 6 to 7% slower than the MTP on these cards. That is a measurement of this machine, where the drafter runs on an RTX 3060 and the engine already warns about that. This PR makes no default change.
Approach
strata_control/drafting.py:blocked_bytakeschosen(DFlash2 named). Several requests don't block it whenchosenand the start is a layer split (split, or a--layer-splitargument).applypasseschosenfrom the config's choice.serve/server.py: passessplit=layer_split_of(...)todrafting.apply. Before this, the server never told it about a split.strata_cli/launch/runner.pyandstrata_cli/drafting_cmd.py: passchosen;drafting planalso works out the split from the run config'sgpulist.docs/BATCHING.md: what runs where, and the numbers.Auto stays as it is because changing it would change a default, and I measured DFlash2 slower than the MTP here. The app keeps its own rule from
ffa80d73(one request for DFlash2 on a split), and this PR doesn't touch the app.Validation
Measured: RTX 2080 Ti, RTX 3060, 3x Tesla P100, RTX 3060 in split order, Xeon W-2150B, 188 GiB, CUDA 12.9.1.
v0.2.10built with the rootDockerfile(CUDA_ARCHITECTURES=60;75;86) plus the P100 fix of #4274, which these cards need, and this branch's Python files mounted over the image's. Original and Swift 1.5 IQ3_S, context 178,176,--kv int8, the Q4_0 DFlash2 pack with the Q4_0 selector thatstrata drafting fetchmakes. The MTP ran with--spec 4(my run config), DFlash2 with the release's--spec 6and--draft-conf. Each run was a fresh engine, nothing retried. Two runs per configuration with"parallel": 2, in one order and then reversed. One request at a time: two MTP runs and three DFlash2 runs. Each run read prompts of 4K, 32K and 128K, decoded seven prompts of 512 tokens three times, and ran a session with six follow-ups, a side request, a second conversation, parallel rounds and a cancel.Passed:
"parallel": 2DFlash2 run the engine loggedDFlash2 drafter onand--batch-groups auto: 2 groups of 1 slot, and lone requests drafted (14,500 of 23,736 drafts accepted on the original weights)."parallel": 2: DFlash2 1,103 tok/s at 32K and 1,503 at 128K, MTP 1,081 and 1,496.python -m pytest tests/terminal/test_drafting.py: the new tests pass. They cover: named on a split with two requests, the server's arguments for that case, Auto keeping the MTP, one card keeping the MTP, and--pipeline-windows.python -m pytest tests/terminal(Windows, Python 3.14). Onv0.2.10: 47 failed, 2,424 passed, 80 skipped, 28 errors. On this branch before its last commit: 49 failed, 2,423 passed, 80 skipped, 28 errors. One new failure wastest_a_layer_split_with_several_requests_is_the_mtp_alone, which pinned the old rule. The last commit splits it into Auto (the MTP) and named DFlash2 (DFlash2 alone with--batch), and both pass. The other differences are intest_cfg_paths.py, which gave 4 failed and 0 or 1 error in two runs on each revision.python tools/test_setup_choices.py: OK on both.Failed:
test_the_server_applies_it_at_every_startfails at its last check on this Windows machine. An extra--kv-resident 8192appears, and it fails the same way onv0.2.10. The new checks in that test run before that line and pass.Not run: one card (still blocked), more than two slots, a split where the slots run as one group (where the engine also gives each slot its own drafter), other cards, Metal and the app.
Limits
One machine. Lone requests at
"parallel": 2are slower than at one request at a time with either drafter here, because the slot sessions take expert cache on the first card (2,016 -> 1,476 slots).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.