mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4768] [Benchmark] RTX 4090 48 GB + Qwen3.8-Flash-Next IQ3_S: long-output decode 158-263 tok/s, driven by MTP acceptance #2183
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#2183
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 @wangminle on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4768
Problem
tools/strata_bench.pynever exercises long generation. The caps are 100 new tokens for short chat, 24 for the 4K/16K/32K prompt tests and 64 per agent turn;--longonly makes the prompt longer (32K). Most of the work people do with this model — writing a module, emitting a large JSON document, reasoning for thousands of tokens — happens above those caps, and the decode speed there is not the same as in short chat.I added a small long-output bench (four cases, 1.9K–7K generated tokens, with a check where the answer is verifiable) and ran it 3× per case against two launch configurations on one RTX 4090 48 GB. The result is that long-output decode ranges from 158 to 263 tok/s and follows MTP draft acceptance almost exactly, while the same server reports 165–168 tok/s for 100-token chat.
Hardware and software
kv-resident 32768, temperature 0 throughoutConfigurations
Both were launched from the release Terminal against the same downloaded model, on the same machine, within the same hour. Paths replaced with
<data-dir>/<feed-dir>.A — stock launch (what
strata launch --family qwen --model iq3_spicked by itself):Engine reported:
parallel_slots=4,spec=6,mtp_max=4,spec_min_p=0.50,pcie_frac=0.55,prefill_cap=8192, expert cache 18,615 slots / 36,305 MiB (35.45 GiB), 435 MiB VRAM free.B — tuned launch (text only):
Engine reported:
parallel_slots=1,spec=8,mtp_max=6,spec_min_p=0.70,pcie_frac=0.35,prefill_cap=32768, expert cache 20,936 slots / 40,853 MiB (39.90 GiB), 746 MiB VRAM free.Why these settings, following the 48 GB reports in this repo: turning vision off frees the vision reader's VRAM for the expert cache (I did not measure the split); one parallel slot avoids the batch slots the stock launch reserved (4 slots, ~2.9 GiB) and keeps VRAM headroom above the low-VRAM warning; a higher reserve (1024 MiB) leaves room for the ring buffer; a 32K prefill cap removes the 8K chunking seen at the start of long prompts; the deeper draft (
spec=6, engine reportsmtp_max=6) and a stricterspec-min-pwere chosen to push draft acceptance.STRATA_HC_Q8=1was enabled as an opt-in; I did not isolate its effect. B has no image input. For vision, use A.Standard suite (
python tools/strata_bench.py --long, 3 runs, medians with ranges)Chat +2.1 %, agent −1.0 %, 4K prompt −3.2 %, 16K −3.9 %, 32K −1.6 %. On the standard suite the tuned launch is roughly neutral for decode and slightly slower for prompt processing.
Long-output bench
Method: streaming
/v1/chat/completions,temperature=0,reasoning_effort=noneexcept the thinking case; each case 3 runs. Speeds are the engine'stimings.predicted_per_second; TTFT is measured by the client. Draft acceptance is accepted/offered fromtimings, reported per request then medianed.Notes:
TTLCachewith O(1) operations, TTL,purge(), 8+ unittest methods; the check extracts the code block, runs it and its own unittest suite, and requires exit 0 and ≥8 tests. (2) math — count 6-digit integers with distinct nonzero digits divisible by 7, answer on aFINAL:line; expected 8544, computed by brute force over the 60,480 candidates. (3) same with thinking on. (4) JSON — 400 deterministic synthetic log lines containing exactly 40ERROR ... incident=INC-xxxxlines; the check parses the JSON, requires all 40 IDs and a summary over 20 words.What the numbers say
Failed checks (kept separate from the speed results)
FINAL:— the problem needs more room than the prompt's "under 2,500 tokens" asks for. With thinking on, the model always finishes but gives 8640 (all three B runs, two A runs) or 8537 (one A run) instead of 8544. The failure is consistent, not noise.test_negative_ttl_does_not_store(exit 1 on both the direct run and unittest); the other five code runs pass.finish_reasonstoporlengthwith engine timings.Not tested / limits
parallel=4; I did not run A withparallel=1alone, so the prompt-throughput difference mixes several changes.spec=6is the launch flag; the engine reportsspec=8, mtp_max=6for B andspec=6, mtp_max=4for A, so the flag and the reported field do not use the same scale.Proposal
Add an opt-in long-output mode to
tools/strata_bench.py— four cases like the above, 3K–8K caps, engine timings, draft acceptance, and the code/JSON/math checks — so this workload is measured the same way on every GPU report. The script and bothresults.jsonsets are ready; I can open a PR that addsbench/long_output_bench.pyunchanged (no default path touched) if that fits the project. Happy to re-run on the final engine build or with any configuration you want compared.Related: #3265 (expert lookahead on RTX 5070) is the other recent 48 GB-class decode experiment; this report is about long generation and launch flags, not expert lookahead.
@udqe commented on GitHub (Oct 31, 2026):
A second box for the acceptance story: Windows, 2x RTX 4090 24 GB, CUDA, engine 0.1.54, our production config (the one in #4573),
UD-Q4_K_XLnative pack, T=0, 21 requests this morning in two blocks. Source for every number: the engine's own/metricsper-request fields - which carry your acceptance metric on CUDA too:drafts_offered,drafts_accepted,decode_tok_s,hit_rate,first_engine_token_s.Four things this adds rather than repeats:
The monotone holds across content types within one session. Between our own chat traffic (751 tok, 82.6 % acceptance, 179.8 tok/s) and these cases, decode tracks acceptance with no visible second factor - the two-card version of your point 1, where expert-cache misses ride on top.
The math failure is quantization-independent and bigger than 0/3. You saw 8640/8537 (IQ3_S). We raised to 13 runs (UD-Q4_K_XL): 0 correct, nine distinct wrong answers - 8640 x3, 7200 x2, then one each of 8537, 8532, 8376, 8748, 7560, 8628, 7776 - plus one length-cap miss. The expected value was brute-forced independently here: 8544, as you said. Two quantizations, two machines, one consistent arithmetic weakness at ~3K-token outputs, not a quant artifact. Worth detaching from this thread's speed conclusion.
A short-output failure your suite would only catch by luck. Second block, same session, same prompt as the first block's three good short runs:
message.contentcame back EMPTY 3/3 (finishlength, 100-200 tokens all consumed byreasoning_content- one debug run captured 801 chars of reasoning and zero answer). The 100-token budget fits either the reasoning or the answer, not both. You setreasoning_effort=nonein your suite; we did not, and that is exactly the difference - so pin it in the proposed long-output mode, because a 100-token short run on this default silently returns nothing at all.Your flag-vs-report scale note reproduces on CUDA/Windows. Our launch passes
--spec 4;/metricsreports"spec":6, "mtp_max":4. Different scales on your Linux launch and our CUDA one - whatever the long-output mode prints, name the scale.One axis caution: same box, same hour, your JSON-style case reads ~210 tok/s while our standing cold-prompt bench (150K tokens,
0 reused, arena deliberately cold) reads 95-110. Acceptance and cache-state both move this number; pin the reuse state the way the issue already pins acceptance.Limits kept honest: one session, one day, one box; prompts reworded, ours not yours; the code-execution case skipped by policy (we do not run model-generated code here); non-streaming client (TTFT = the engine's own field only); math answers counted from the
FINAL:line where present. This box carries the +-10 % day-to-day decode spread we documented in #4610 - deltas under ~10 % are noise; the acceptance-decode gap (91 % vs 78 %, ~1.5x) is far above it.Happy to re-run any configuration. +1 for
bench/long_output_bench.pylanding as-is, with the fields wired to/metricsinstead of the response body - fewer build-dependent JSON paths.(AI-assisted again on our side - the model served by this repo's engine ran the suite and read its own metrics; all figures local.)
@wangminle commented on GitHub (Oct 31, 2026):
Follow-up: pass-only rerun (8 runs per case)
I re-ran the two cases whose checks can pass, 8 runs each on both launch configurations, and summarised only the requests whose check passed. The table in the report above includes every request that returned, including code runs whose own tests failed; this one separates the two.
Same machine, same day, same commands as the report; the server was restarted between the stock and tuned sets. Medians with ranges over passing requests.
Pass rate differs on the code case
The checks are the same as in the report: extract the Python block, run it, run its unittest suite, require exit 0 and at least 8 test methods.
unittest.TestCase/unittest.main()but omitimport unittest(NameErroron both the direct run andpython -m unittest); 1 hastest_default_ttlandtest_ttl_expiryfailing withAssertionError: 1 is not None(the default TTL / expiry behaviour is wrong).STRATA_HC_Q8, and I did not isolate which of them, if any, is responsible. A larger paired run would be needed to call it a property of the configuration.What this changes in the report
Raw
results.jsonfor both sets is available if useful.bench/long_output_bench.pynow records both all-run and*_passingstatistics and accepts--casesfor a focused rerun.@wangminle commented on GitHub (Oct 31, 2026):
Same rig, same tuned launch as this report, another workload: I kept the engine timings of a prefill-heavy real task (static review of a 330-file repository) and posted the record in #4813.
Not the standard protocol (no fixed prompts, no repeats, one run per pass); the limits are in #4813.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thank you for the benchmark. We have collected these results for the benchmarks page on the Strata website, so we are closing this here. If you measure again, for example on 0.2.11, you are welcome to open a new report.
The Strata project