mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4375] [Engine] DeepSeek Prompt Skip: single-GPU activation diagnostics and reproducible A/B #1937
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#1937
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 @tjm8874 on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4375
Request: start with a reproducible single-GPU experiment
Could we evaluate the existing DeepSeek Prompt Skip path and isolate the useful attention/cache optimizations on one GPU first, with explicit effective-mode logging and a small reproducible A/B harness?
A local experimental build reached 1,547.6 tok/s prefill with all 6 routed experts, and 1,715.9 tok/s with 4 experts, on an RTX PRO 4500 + RTX 5070 Ti. An isolated audit reproduced the measurements and checked small tasks against the official release. Those are two-GPU observations, not measured single-GPU gains. The final single-GPU variant has not been measured.
The request is a focused, opt-in investigation. The full experimental patch is not ready to merge, and removing the single-device guard is not a safe general solution.
Related: #4353 covers near-1M workspace/decoded-cache lifecycle and #4351 covers GPU expert misses. This report adds a narrower 16K existing-Prompt-Skip activation/ablation case and audited observations; it is not a competing workspace or expert-miss implementation proposal.
Why start with one GPU?
Current
src/dsv41/ds4_model.cualready implements Prompt Skip for an eligible single-device layout. In the source inspected on 2026-10-27 (blob91d29a266e8cba1dbb576d6911ee744eecddac20),yoco_mode()defaults to 1;DS4_YOCOoverridesSTRATA_DS4_PROMPT_SKIP, andyoco_layer()rejects mixed-device layouts:A one-card experiment can compare skip off/on without relaxing this guard or using a Main/Helper split. It can then isolate the candidate attention, dense-cache and transfer changes separately. The existing default being enabled is different from proving that a particular request was eligible and actually skipped work.
Please retain architecture checks, the all-row-logits restriction and the current safe topology guard during this first experiment. Useful diagnostics would report effective mode, eligibility/rejection reason, retained tail, chunk/row cut and actual device layout.
Environment and identity
562a0c2ed.88c9c54ecc3ffce6f2ddbef281a7066146694be85e4ace99d31e5cdd691f0603, matched to the v0.2.6 release.f1b106d43cae444a86b7cdd4c8b0fa943d289752a8507adf690f96f9214f8ac2.4b9e05a2a806a3fe24f7b2560d98626c37dade35+ local patch. Performance executable SHA256:3a49d4d663a7ed14c869420c3e0aba0ecd42a53f2bcab57fb8bc7de1f0d915e7.--dspark none.--ssd-cacheis the engine setting, not a measurement of resident RAM.cca11bb686b5701e01f846536e00e98bfacbab4378a788b31f99aa098b2dbe90. Profiles/cache could adapt during requests; prompt prefix reuse was disabled.All six referenced GGUF files were hashed during the audit. These current hashes do not retroactively establish the identities of historical runs whose model hashes were not recorded.
Primary reproduction protocol: one physical GPU, 6 experts
Proposed validation, not already-run evidence. Use the exact 16,384-token inventory prompt and portable runner in the attached evidence ZIP, one selected GPU only. Freeze a copy of your installed pack profile (for example,
cp /path/to/pack/expert-profile.bin frozen-profile.bin) and use the same starting bytes for both arms. That is a new experiment with its own recorded seed hash; it does not reproduce the audited absolute rates unless the original pack/profile/build also match. For example, CUDA-visible device 0 is the PRO 4500 in this machine:The runner clears inherited
DS4_,STRATA_DS4_andMAYA_DS4_settings, disables conversation reuse/slot reuse/auto-pin, setsCUDA_VISIBLE_DEVICESto exactly one physical GPU and passes--gpus 0after visibility remapping. It never setsDS4_SPLITorDS4_YOCO_MULTI. It does not stop or restart services.Equivalent native-engine launch for either arm:
Each process receives one warm-up and 3 measured requests, each
GEN 256 temperature=0 top_p=1 top_k=0 min_p=0 seed=42 spec=0 <CSV IDs>, followed by normalQUIT. CheckDONEprompt=16,384, output=256, token-line count=256, reuse=0 and exit=0. Record every failure separately. A request ending early must not silently count as the same workload.Compute prefill and decode from their separate
DONEdurations; measure TTFT from GEN send to the firstTline. Model load is outside these timings. Use ordinary median/min/max, not the larger of two measurements labeled as a median. Swap arm order in a follow-up before interpreting small differences.Prompt identity: SHA256 of comma-separated IDs (ASCII, no final newline) is
73be3223a935b3eeef64f6e73263fa7128bbe88f8fdab13d522cf9b559ef2cf9. Profile starting hash and executable SHA must accompany each arm. The harness has been syntax/dry-run checked in this publication review; GPU execution of this new portable runner is not claimed.Then compare each candidate change on the same single-GPU binary/configuration:
DS4_ATT_ONE=16,DS4_ATT_A=8192) separately.The candidate flags came from the local patch. Setting an unknown flag on a stock binary is not proof that the corresponding feature ran. Keep 6 experts for this primary study; 4 experts is a separately labeled routing tradeoff. Do not port the unsafe store-pin path merely to reproduce a headline number.
Audited two-GPU results: reference evidence, not a single-GPU promise
Fixed input 16,384 / output 256, warm-up 1 + measured 2 per configuration, reuse=0. All experimental rows use the same executable SHA above and the same private-profile starting bytes. They differ only in the named expert count, split and YOCO mode; all other experimental settings are fixed. Values below are ordinary medians [min–max].
At 6 experts and fixed 19+21 split, enabling skip improves median prefill 25.9%. Rebalancing to 10+30 yields 54.0% over experimental 19+21/skip-off. The official-to-fastest-6-expert comparison is +114.8% prefill, −53.4% TTFT, −35.5% total time, but −7.8% decode. That comparison changes both binary and settings; it is not a YOCO-only speedup and does not improve every metric.
Experimental settings used in the audited rows:
The official reference omits the experimental tuning variables and uses the official package libraries (their CUDA library SHA256 values matched the experimental system libraries). This benchmark is a custom workload with two samples per measured arm, not a standard-protocol result or confidence interval.
Active-cut log from the experimental two-GPU path:
Quality checks and remaining failures
Passed within a limited scope: four 16K tasks (arithmetic, strict JSON, Japanese two-item response, complete Python function). The official 6-expert references at 19+21 and 10+30 and a matched official 4-expert control all passed. The fastest candidate-on conditions showed no regressions in 12 reference/candidate comparisons. This is four task families across three comparisons, not twelve independent benchmarks. Python was executed for 0,1,2,10,100 and negative-input ValueError. Stop/new-GEN/normal-QUIT tests completed on the measured safe layouts.
Numerical equivalence is not established: at the first 16K prefix, full experimental off/off snapshots matched, while off/on tail logits differed (relative L2 about 5–10% across the full settings). Minimal YOCO-only builds also showed differences. On one fixed 31-position continuation at 6 experts / 10+30, top-1 matched at all positions, but max log-probability delta was 0.06789 nats versus 0.010497 for off/off. Neither observation justifies a general “lossless” claim. TS-Bench and broad quality testing were not run. A separate post-Stop 4-expert experimental-off arithmetic error (3974 instead of 4014) remains recorded; request/cache history differed and attribution is unresolved.
Reproduced failures in the local experimental patch, not asserted as stock-engine defects:
DS4_YOCO_MULTIuses presence rather than value:=0still relaxes the guard. This flag is absent from the inspected stock source.These findings support starting with single-GPU ablations and separating the patches rather than lifting the topology guard globally.
Historical context
The same PC's earlier official engine 0.1.49, original model / 6 experts / 84 GB RAM cache, 16K input / 2K output, yielded 547.8 tok/s on the PRO 4500 alone and 704.4 on Main+Helper (1 warm-up + 3 measured runs). Later 4-expert / Huihui / modified-0.1.51 / 92 GB-cache experiments yielded 1141.8 → 1408.3 → 1727.6 (1 warm-up + 2 measured runs, 2K output).
This history changes model, engine, expert count and settings. The three historical experimental binary hashes also differ. It is not a controlled 547.8→1727.6 patch speedup, and the 2K-output decode results should not be mixed with the new 256-output cohort.
Would a focused first step—effective skip diagnostics plus a frozen-input/profile single-GPU ablation—be a useful basis for reviewing the attention/cache changes separately?
All 18 new measured requests (warm-ups excluded)
Model-file SHA256 values captured during this audit
These identify this custom pack. They are not historic hashes for Oct 24, and rebuilding a Huihui-patched shard may change GGUF bytes. The primary single-GPU comparison must hold its own model bytes fixed.
Attached reproduction package
The evidence ZIP contains the portable single-GPU runner, exact input token IDs, frozen profile seed, model hashes, individual measured requests and sanitized logs. It also preserves the original experimental patches with known defects for identification/reconstruction; they are not a corrected or recommended production patch. The provided audit did not implement fixes. See the ZIP README and the limitations above.
strata-prefill-repro-evidence.zip
Visual overview
The figures distinguish the historical development sequence from the new audit. All final experimental throughput shown is from two GPUs; the proposed single-GPU validation remains unmeasured.
@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.