mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5117] [Other] Drafting: Swift 1.5 runs DFlash2 when it is named; Auto stays with the MTP #5312
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#5312
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/5117
Author: @Joe11221
Created: 11/3/2026
Status: 🔄 Open
Base:
main← Head:dflash2-swift📝 Commits (1)
57735b4[Other] Drafting: Swift 1.5 runs DFlash2 when it is named; Auto stays with the MTP📊 Changes
6 files changed (+63 additions, -19 deletions)
View changed files
📝
docs/TERMINAL_LAUNCH.md(+1 -1)📝
strata_cli/launch/screens.py(+4 -3)📝
strata_control/drafting.py(+28 -10)📝
tests/terminal/test_drafting.py(+21 -3)📝
tests/terminal/test_drafting_hardware.py(+2 -1)📝
tests/terminal/test_drafting_single.py(+7 -1)📄 Description
Problem and result
Swift 1.5 is UkisAI's fine-tune of Qwen3.8-Flash-Next, with the same layers and tokenizer. It cannot run DFlash2:
--drafting dflash2on it starts the MTP with "DFlash2 is for Qwen3.8-Flash-Next only", and the Terminal shows no Drafting step for it. The code says why: there were no acceptance numbers for Swift.Here are some. On six mixed cards with engine 0.1.56, the DFlash2 drafter's drafts were accepted as often on Swift as on the original weights, and Swift decoded at the same speed:
"parallel": 2, DFlash2This PR lets Swift run DFlash2 when the person names it: the run config's
"drafting": "dflash2",strata launch --drafting dflash2, or the Terminal's Drafting step. Auto stays with the MTP on Swift, so a Swift start without a named choice has the same engine arguments as before. On these cards the MTP was faster on Swift (52.6 tok/s), so I'm not proposing a default.Approach
strata_control/drafting.py:CHOSEN_ONLY_FAMILIES = ("swift",)and a model-name patternswift-..., matching what setup writes (swift-1.5-iq3_s).can_run_dflash2(..., named=True)accepts them, andchoice_ofpassesnamedonly fordflash2.applylets a named choice on Swift take the same path as Qwen3.8-Flash-Next, and every other choice on Swift returns early as before.SUPPORTED_FAMILIESis unchanged, so the app's copy of the list still matches.strata_cli/launch/screens.py: Swift gets the Drafting step.docs/TERMINAL_LAUNCH.md: one sentence.The app doesn't offer the choice for Swift. That would need its own copy of the rule (
native-settings.mjs,drafting.ts), and I kept it out of this PR.Validation
Measured on: RTX 2080 Ti, RTX 3060, 3x Tesla P100, RTX 3060 in split order, Xeon W-2150B, CUDA 12.9.1,
v0.2.10plus the P100 fix of #4274, with this branch's Python mounted into the image,"parallel": 2. The Q4_0 DFlash2 pack with the Q4_0 selector came fromstrata drafting fetch. Two fresh-engine runs per configuration, in one order and then reversed:--spec 4)--spec 6, the release's)DFlash2 on Swift against DFlash2 on the original
Same machine, image, flags, drafter pack and
"parallel": 2, two fresh-engine runs each, in one order and then reversed. Decode is the median tok/s of three 512-token decodes per run (min-max in brackets). Accepted is accepted over offered drafts in both runs together.I see no degradation on Swift. Over all prompts, acceptance differs by 0.3 points and decode by 0.8%. Per prompt, Swift ranged from 3.1 points lower (chat) to 3.1 points higher (thinking), and for every prompt its decode range overlaps the original's. The one row where Swift was clearly behind is two long requests at once. There, Swift wrote more tokens than the original (1,289 against 1,217), and those requests run in the batch slots without drafts, so the drafter doesn't affect that row. For scale, the MTP itself ran 3% faster on Swift than on the original (52.6 against 51.0 tok/s).
Passed:
DFlash2 drafter on.strata launch --plan --family swift --model IQ3_S --drafting dflash2plans the drafter's download and DFlash2; without--draftingit plans the MTP.python -m pytest tests/terminal/test_drafting*.py(withtextualinstalled): 142 of 143. The updated tests cover: Swift named, Swift with Auto and MTP left unchanged, Coder and NVFP4 still on the MTP, and the Drafting step for Swift.python -m pytest tests/terminal(Windows, Python 3.14). Onv0.2.10: 47 failed, 2,424 passed, 80 skipped, 28 errors. On this branch: 42 failed, 2,431 passed, 80 skipped, 26 errors. No test fails here that passes onv0.2.10. The five that passed here but failed onv0.2.10are timing and file-lock tests intest_cfg_paths.py,test_runtime.pyandtest_bench_standard.py, which vary between runs on both.python tools/test_setup_choices.py: OK on both.Failed:
test_the_server_applies_it_at_every_start(Windows): an extra--kv-resident 8192appears, and it fails the same way onv0.2.10.Not run: Swift at other sizes (IQ2_XS, Q2_0), one card, answer quality, the app.
Limits
One machine, and two runs per configuration. Acceptance on Swift matched the original here; the drafter was trained on the original weights, which is why Auto stays with the MTP.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.