mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3965] [Benchmark] DFlash2 vs MTP on RTX 4060 Ti 16 GB: 3.3% slower overall #1700
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#1700
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?
Originally created by @leebiden6-stack on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3965
Measured on 2026-10-24 by the reporter on a Windows 10 PC. This is a targeted A/B, not a run of the standard
strata bench runprotocol. Two tests (1k and 16k output), one local source build.Result
On an RTX 4060 Ti 16 GB (Ada, sm_89), DFlash2 was not faster than the MTP on the same prompt and settings:
Both runs generated exactly 1024 tokens (the output cap), so this is a speed comparison only; the answers were not compared for quality. DFlash2 ran second, so a warm OS cache would favor it; it still came out slower. Reproduction status: reproduced locally with one pair; not repeated, and the serve limitation below is source-confirmed rather than exercised under
--serve.Follow-up: 16k prompt + 16k output
Same card, same local build (
strata 0.1.49.1), same settings. The prompt was 16,384 tokens from the publicdocs/DETAILS.mdwith a synthetic needle (ORANGE-7319; no private user prompt). Both arms used--max-new 16384and both generated exactly 16,384 tokens, so both answers were truncated at the cap by design. Both recalled the needle.DFlash2 does not catch up on long outputs: it is 10.1% slower overall, 11.2% in the first half, 9.0% in the second half, and 10.8% lower in the median. MTP keeps a higher acceptance rate (87.8% vs 81.1%) and needs fewer rounds (5,091 vs 5,552). DFlash2 drafts faster per round (4.98 vs 6.10 ms), but that does not compensate for the extra rounds, the higher CPU expert-pool time, and the 567 fewer expert-cache slots. Prefill is equal at this length (~1,290 tok/s); the 10.5% prefill difference in the 1k test was likely run variance.
Why this matters: the suggestion table in
strata_control/drafting.pyhas noadarow (sm_89falls underother, "not measured"). Both tests say Auto should stay on MTP for this card class; the gap grows with output length (3.3% at 1k, 10.1% at 16k), so longer outputs do not rescue DFlash2. It also matches an earlier A/B on the same PC (2026-10-23): DFlash2 was 2–12% slower than MTP on four 300–400-token prompts (code_py three-run mean −2.4%, window 8 −4.8%). No code change is requested here; this is measurement evidence for the table.Related threads (none of them is an RTX 4060 Ti performance report): #3882, #3869, #3183, #3322.
Hardware and software
c33fa7ba6d0d5b104983736b50c4e1d61f207b1b; enginestrata 0.1.49.1; local Release source build (CMAKE_CUDA_ARCHITECTURES=89, CUDA 13.4.92, MSVC 14.44.35207). No tracked source modifications at the time of the run (only untracked benchmark artifacts). Note:build/BUILD.jsonis stale and says 0.1.44.1;strata.exe --versionreports 0.1.49.1.strata.exerunning; 16,109 MiB of VRAM free before the first run. No per-run power/clock telemetry was captured.Model and configuration
Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf(54,817,524,224 bytes) andQwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf(28,800,138,432 bytes). The exact upstream repository/revision was not recorded by the local setup; the filenames and sizes above are the local files.tools/iq_pack.pyoutput at<DATA>/packs/iq3_s;conversions.jsonnames both source shards. PLE table from shard 2; expert profiledata/expert-profile.bin(24,576 ranked pairs).<DATA>/mtp/rt; loaded 835 MiB, 1049 MiB total in the run summary.<DATA>/dflash2/qwen3.8-flash-next-dflash2.q8.pack, 760,353,792 bytes; sourceincoai/Qwen3.8-Flash-Next-DFlash2, revisiona22a1744e85c17364dcc54a6a420af7135d4c7f6(the pin instrata_control/drafting.py). Loaded 1026 MiB of VRAM.tokenizer/folder from the pack, includingchat_template.jinja. The prompt was rendered by that template and tokenized with the pack's tokenizer.--expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --max-context 262144 --kv int8 --kv-resident 32768 --adapt-every 1 --adapt-swaps 80 --adapt-decay 0.97 --vram-reserve-mib 1900; greedy sampling; the 1k test used--max-new 1024, the 16k follow-up used--max-new 16384; both--stop-eos.--visionwas removed for this text-only CLI run. KV streaming kept 32768 of 262144 cells per QSA layer in VRAM and put 3.09 GiB of K/V in pinned RAM (engine log). The model was loaded fresh for each arm; no prompt cache or expert-cache state was carried between runs.Workload
The prompt is a 253-character (171-token after the chat template) Chinese technical question about adding a column at a specific position in a Databricks Unity Catalog table without rebuilding the table. It contains no table names, company names or credentials. The exact wording is not included here to keep the reporter's work context private; it is available to the maintainers on request.
Both arms used the same prompt file, chat template, tokenizer and 1024-token output cap. The model was greedily decoded; thinking was left on. The answer was truncated at the cap in both arms, so only speed is compared.
The 16k follow-up used a different, public prompt: 16,384 tokens from
docs/DETAILS.mdwith a synthetic needle (ORANGE-7319), containing no private user content. Both arms used the same prompt file, chat template, tokenizer and 16,384-token output cap, and both generated exactly 16,384 tokens, so both answers were truncated at the cap by design.Method
decodeandprefilllines.STRATA_SPEC_TRACE: one line per timed round with the verify-window size, accepted drafts, suffix flag and round duration. Per-round tokens are accepted drafts + 1.decodeline.--max-new 16384; both arms hit the cap. The per-round trace and first/second-half split use the same method; the trace totals differ from the engine's 16,384 by at most one token, and the final untraced round is excluded.Evidence (engine lines)
MTP:
DFlash2:
16k output
MTP:
DFlash2:
Raw logs and per-round traces for both tests are available on request; local home paths will be replaced with placeholders before attaching.
Analysis
Validation status
DFlash2 drafter on; the per-round trace parsed for both arms and both tests.strata bench runprotocol, answer-quality comparison, and the HTTP serve path. The 16k follow-up uses a publicdocs/DETAILS.mdprompt with a synthetic needle, not the private Databricks prompt. DFlash2 is CLI-only in this build:serve/server.pystarts the engine with--serve, andsrc/program/generate.cpprefuses--draft dflash2with--serve;strata launch --drafting dflash2therefore falls back to MTP (source-confirmed; not exercised with DFlash2 under--servein this benchmark). That is why this report uses the non-serve CLI.Limits
ORANGE-7319) passed in both arms.@Hazelhof commented on GitHub (Oct 25, 2026):
A second hardware class for this comparison, with one methodological point that I think matters more than the numbers: on this box the same MTP arm moved 18 % between sessions, which is bigger than the effect being measured, so single-rep cross-session pairs cannot rank the two drafters.
Box: 4× RTX 5080 16 GB (only one used here), Core Ultra 7 270K (AVX2 only), 125 GiB RAM, driver 580.x, CUDA 13.3, Strata v0.2.4, engine 0.1.49, built from the tag with
-DSTRATA_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=120(-arch sm_120verified in the ELF). Pack: NVFP4. CLI (strata generateflags on the engine binary directly — it takes no subcommand), one card,--spec 4,--kv int8,--max-context 32768, greedy, 1,024-token prompt fromdocs/DETAILS.md, 8,192 output tokens. Drafter:incoai/Qwen3.8-Flash-Next-DFlash2ata22a1744, weight sha256 verified, packed bytools/dflash2_pack.py(760 MB).The cap ladder (
--draft-cap, all five runs inside ten minutes, same session):So on this card DFlash2 at its cap-5 peak is ~6 % ahead of MTP in-session, and narrower is not better — cap 3 is the worst arm, which I had guessed would be the fix.
The methodology point. The identical MTP invocation read 100.79 tok/s twenty minutes earlier and 82.16 in this session, with acceptance moving 73.7 % → 62.1 % and tokens/round 3.22 → 2.92. Same prompt ids, greedy, same flags. That is the adaptive tier changing expert placement, which changes a near-tie token, which changes the whole continuation and with it the CPU expert traffic — so the content differs between sessions and the rate follows it. Within this session the MTP bracket is repeatable to 0.02 % (82.16 / 82.18), so the ladder is sound; the cross-session pair is not. My first pass compared across sessions and read −9.7 % for DFlash2, which I now think was that drift, not the drafter.
Two things that might be worth a line in the docs if they are not already: that a drafter A/B has to bracket the incumbent inside one session (or be teacher-forced via
--spec-follow), and that--draft-caponly bounds the widest window — so sweeping it upward from the default can do nothing.Also +1 to the earlier report's finding that
--draft dflash2is off under--serve/--batch/layer split; on a 16 GB card that is the configuration that would actually use it.@Niko1221 commented on GitHub (Oct 29, 2026):
Thank you for measuring this and writing it up. We are building a Strata website with a page for community benchmarks, and results like these will be added there when it launches, so we are closing this here. If your numbers change with a new version, you are welcome to post them again.