[PR #5117] [Other] Drafting: Swift 1.5 runs DFlash2 when it is named; Auto stays with the MTP #5312

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

📋 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 dflash2 on 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, DFlash2 Drafts accepted Decode, all prompts
Original IQ3_S 14,500 of 23,736 = 61.1% 47.9 tok/s
Swift 1.5 IQ3_S 14,519 of 23,632 = 61.4% 48.3 tok/s

This 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 pattern swift-..., matching what setup writes (swift-1.5-iq3_s). can_run_dflash2(..., named=True) accepts them, and choice_of passes named only for dflash2. apply lets 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_FAMILIES is 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.10 plus 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 from strata drafting fetch. Two fresh-engine runs per configuration, in one order and then reversed:

Swift 1.5 IQ3_S Decode, all prompts Drafts accepted Read 32K Follow-ups reused
MTP (--spec 4) 52.6 tok/s 72.3% 1,082 tok/s 99.84%
DFlash2 (--spec 6, the release's) 48.3 tok/s 61.4% 1,104 tok/s 99.84%

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.

Prompt Original, tok/s Swift 1.5, tok/s Original, accepted Swift 1.5, accepted
Code 50.7 (49.5-52.0) 52.3 (51.1-53.0) 69.6% 71.1%
Prose 38.0 (36.3-40.0) 39.4 (37.4-40.6) 42.6% 44.3%
JSON 56.1 (54.5-56.9) 55.1 (53.3-55.8) 78.3% 76.4%
Code edits 47.6 (46.3-48.1) 48.0 (46.5-48.7) 66.6% 66.5%
Chat 37.0 (36.2-38.6) 36.1 (34.3-37.1) 46.0% 42.9%
Forced tool call 54.5 (53.8-56.7) 56.4 (51.2-58.1) 73.8% 75.6%
Thinking, sampled 44.1 (41.7-49.0) 45.0 (43.7-50.0) 56.6% 59.7%
All prompts 47.9 48.3 61.1% (14,500 of 23,736) 61.4% (14,519 of 23,632)
Original Swift 1.5
Read 4K, tok/s 378 380
Read 32K, tok/s 1,103 1,104
Read 128K, tok/s 1,503 1,506
Follow-ups: tokens reused 99.78% 99.84%
Follow-ups: first token, median 0.52 s 0.51 s
Three short requests on two slots, wall 11.38 s 11.34 s
Two long requests at once, wall 5.35 s 6.12 s

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:

  • Four Swift runs: every request completed, and the engine logged no errors and no non-finite values. Both DFlash2 runs logged DFlash2 drafter on.
  • strata launch --plan --family swift --model IQ3_S --drafting dflash2 plans the drafter's download and DFlash2; without --drafting it plans the MTP.
  • python -m pytest tests/terminal/test_drafting*.py (with textual installed): 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). On v0.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 on v0.2.10. The five that passed here but failed on v0.2.10 are timing and file-lock tests in test_cfg_paths.py, test_runtime.py and test_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 8192 appears, and it fails the same way on v0.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.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/5117 **Author:** [@Joe11221](https://github.com/Joe11221) **Created:** 11/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `dflash2-swift` --- ### 📝 Commits (1) - [`57735b4`](https://github.com/Niko1221/Strata/commit/57735b48ef3fefee51ebb7673fb8b493a017f678) [Other] Drafting: Swift 1.5 runs DFlash2 when it is named; Auto stays with the MTP ### 📊 Changes **6 files changed** (+63 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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 dflash2` on 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`, DFlash2 | Drafts accepted | Decode, all prompts | |---|---:|---:| | Original IQ3_S | 14,500 of 23,736 = 61.1% | 47.9 tok/s | | Swift 1.5 IQ3_S | 14,519 of 23,632 = 61.4% | 48.3 tok/s | This 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 pattern `swift-...`, matching what setup writes (`swift-1.5-iq3_s`). `can_run_dflash2(..., named=True)` accepts them, and `choice_of` passes `named` only for `dflash2`. `apply` lets 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_FAMILIES` is 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.10` plus 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 from `strata drafting fetch`. Two fresh-engine runs per configuration, in one order and then reversed: | Swift 1.5 IQ3_S | Decode, all prompts | Drafts accepted | Read 32K | Follow-ups reused | |---|---:|---:|---:|---:| | MTP (`--spec 4`) | 52.6 tok/s | 72.3% | 1,082 tok/s | 99.84% | | DFlash2 (`--spec 6`, the release's) | 48.3 tok/s | 61.4% | 1,104 tok/s | 99.84% | ### 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. | Prompt | Original, tok/s | Swift 1.5, tok/s | Original, accepted | Swift 1.5, accepted | |---|---:|---:|---:|---:| | Code | 50.7 (49.5-52.0) | 52.3 (51.1-53.0) | 69.6% | 71.1% | | Prose | 38.0 (36.3-40.0) | 39.4 (37.4-40.6) | 42.6% | 44.3% | | JSON | 56.1 (54.5-56.9) | 55.1 (53.3-55.8) | 78.3% | 76.4% | | Code edits | 47.6 (46.3-48.1) | 48.0 (46.5-48.7) | 66.6% | 66.5% | | Chat | 37.0 (36.2-38.6) | 36.1 (34.3-37.1) | 46.0% | 42.9% | | Forced tool call | 54.5 (53.8-56.7) | 56.4 (51.2-58.1) | 73.8% | 75.6% | | Thinking, sampled | 44.1 (41.7-49.0) | 45.0 (43.7-50.0) | 56.6% | 59.7% | | **All prompts** | **47.9** | **48.3** | **61.1%** (14,500 of 23,736) | **61.4%** (14,519 of 23,632) | | | Original | Swift 1.5 | |---|---:|---:| | Read 4K, tok/s | 378 | 380 | | Read 32K, tok/s | 1,103 | 1,104 | | Read 128K, tok/s | 1,503 | 1,506 | | Follow-ups: tokens reused | 99.78% | 99.84% | | Follow-ups: first token, median | 0.52 s | 0.51 s | | Three short requests on two slots, wall | 11.38 s | 11.34 s | | Two long requests at once, wall | 5.35 s | 6.12 s | 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: - Four Swift runs: every request completed, and the engine logged no errors and no non-finite values. Both DFlash2 runs logged `DFlash2 drafter on`. - `strata launch --plan --family swift --model IQ3_S --drafting dflash2` plans the drafter's download and DFlash2; without `--drafting` it plans the MTP. - `python -m pytest tests/terminal/test_drafting*.py` (with `textual` installed): 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). On `v0.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 on `v0.2.10`. The five that passed here but failed on `v0.2.10` are timing and file-lock tests in `test_cfg_paths.py`, `test_runtime.py` and `test_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 8192` appears, and it fails the same way on `v0.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. --- <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#5312
No description provided.