mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4110] [Engine] Fused prompt experts on a 12.0 card with 70 SMs (RTX 5070 Ti, IQ3_XXS pack, Windows): prompts +11% / +5.6% / +6.7% at 4K / 20K / 98K, 18/18 pairs #1799
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#1799
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 @johnmark13 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4110
Problem: on compute capability 12.0 the native packs' prompt experts run on the fused int8 kernels by default only on cards with 80 or more SMs, and only for the IQ2_S / IQ3_XXS / IQ3_S / IQ4_XS gate/up formats (
src/prefill/moe_fused_iq.cu,sm120_series.hpp). DETAILS.md lists the smaller 12.0 cards, Windows, partly resident caches and the IQ3_XXS / IQ2_XS packs as not measured. The RTX 5070 Ti has 70 SMs, so it keeps MMQ.Environment: Strata 0.2.4.1 release package, engine 0.1.48 (prebuilt, CUDA 13.0, commit
6f8800aefe), Windows 11 Pro 26200, NVIDIA driver 32.0.16.1088, RTX 5070 Ti 16 GB (PCIe 5.0 x16, 300 W), Ryzen 9 9900X (12 cores, 11 pool workers), 96 GB DDR5-5600. Model: ISTA-DASLab Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS (two shards), native packiq3_xxs, MTP on. Config:--expert-cache auto --prefill auto --spec 4 --max-context 131072 --kv int8 --kv-resident 32768 --vision --vram-reserve-mib 1536 --pcie-frac 0.55 --spec-min-p 0.70 --adapt-every 1 --adapt-swaps 160 --adapt-decay 0.97(setup's--calibrateoutput). Experts partly in RAM (about 4000 of 24576 resident).Method:
tools/ab_engine.py(a copy with one added option,--long-file, so the long prompt is a text file instead of random words), armsbaseandfused:STRATA_PF_FUSED=1,--rounds 3, run twice per prompt size with the arm order reversed: 6 interleaved pairs per size, a fresh engine per arm per round, greedy, thinking off, 256-token cap, plus the harness's three fixed short chats. Prompts are built from the Strata tree itself (sortedsrc/core/*.cpp,src/prefill/*.cu,src/kernels/cpu/*.cpp,serve/*.py,docs/*.md, one header per file, cut at a character budget, then "explain the last file and propose one improvement as a unified diff"), tokenized withstrata_tokenizer: 4,251 / 20,053 (random-word filler, the harness default) / 98,267 tokens. Numbers are the server's owntimings.Result, fresh prompts, medians over 6 pairs (base -> fused):
Per pair, 98K: prefill 3127 -> 3338, 3128 -> 3338, 3126 -> 3338, 3126 -> 3337, 3127 -> 3337, 3306 -> 3469 (ratios 1.068, 1.067, 1.068, 1.068, 1.067, 1.049). 4K: 1.112, 1.112, 1.113, 1.115, 1.102, 1.111. 20K: 1.047, 1.049, 1.065, 1.063, 1.020, 1.065. Prefill is faster in all 18 pairs; decode after the prompt is unchanged (median ratios 1.01, 12/18 pairs). The three fixed short chats (27-34 tokens) are inside this box's round-to-round spread (the base arm alone ranged 109-135 tok/s on one of them). The gain is largest at 4K and flat from 20K to 98K, the same shape as the RTX PRO 5000 numbers in DETAILS.md (+7.0% / +5.2% / +3.4%), a little larger here because the experts are partly in RAM and the prompt path is a bigger share.
Answers: greedy texts after the prompt had the same first 80 characters in 13 of 18 pairs (6/6 at 20K, 3/6 at 4K, 4/6 at 98K); where they differ the fused kernels' rounding picked another near-tied token early. I did not run the teacher-forced KL check the RTX PRO 5000 measurement used; if you want it on this card, tell me which tool and I will run it.
Proposal: lower the default's SM floor from 80 to 70 and include the IQ2_XXS / IQ2_XS gate/up formats (the IQ3_XXS and IQ2_XS packs) in the 12.0 default. Patch attached (7 lines in
moe_fused_iq.cu);STRATA_PF_FUSED=0keeps MMQ as before. I have not built the engine (release package), so I am not opening a PR unless you want one; happy to push the branch.Also measured, same card and config: the 12.0 default switch set, one switch off at a time. Decode after a 51K-token prompt (built from this repository's files), fresh engine per arm, 3-7 paired rounds per switch, the default set's own spread across chunks 4.2%: whole set off (
STRATA_SM120_PERF=0) 0.951 (slower in 3/3);STRATA_SIDE_MIXER=00.956 (7/7);STRATA_ATTN_DAILY=00.984 (3/3);GR_UP75,GR_DOWN_TG,GU_SWIGLU,MMVQ_IL_WIDE,MMVQ_IL_120off: 0.99-1.02, inside the noise. Every arm gave the same 512 tokens. So on a 16 GB 12.0 card with a third of the expert reads missing VRAM the set is worth about 5%, nearly all of it the side mixer, and nothing in it hurts; no change proposed, just the data for the "not measured" list in DETAILS.md. Full table attached (dropone-sm120-5070ti-results.md).Reproduction status: reproduced locally (speed). Quality: text agreement only, no KL. Everything attached in one zip: logs, patch, drop-one table, prompts, harness copy and config.
strata-5070ti-evidence.zip
Today I set
STRATA_PF_FUSED=1in the config'senvblock, which is the workaround this proposes to make the default.@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.