mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4351] [Engine] Opt-in GPU expert-miss execution and cancellation recovery for DeepSeek #1921
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#1921
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 @moniljo on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4351
Area
[Engine] (speed, kernels, models, the server and API)
What do you want to do?
Would you welcome a focused, opt-in CUDA path that stages eligible nonresident DeepSeek experts from copied host RAM to the GPU for computation, together with the cancellation/recovery lifecycle needed to keep that path correct and fast? I am asking for scope agreement before preparing upstream patches, following CONTRIBUTING.md. No default change is proposed.
The use case is single-GPU, long-context coding on a 96 GB Blackwell PC with enough physical RAM for the exact model's remaining experts. Cancellation during prompt ingestion should leave the next request able to recover a healthy expert-pool layout and direct transfers, with recovery cost reported rather than hidden.
What do you do today instead?
I run a custom Strata build. The source-only recipe and README, setup commands, source/build identities, and experiment history are pinned to that commit. They include source overlays, fixtures, benchmark inputs/controllers, compact outcomes and raw receipt hashes. No weights, binaries, credentials or private conversations are uploaded.
The current prototype ports the custom work onto Strata v0.2.7 / engine 0.1.52, tag
5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d; tested executable SHA-256 is4b3a7f1a29b1d860eb79363544acbe19d9b758345f4ec04dbad1a9db0609dd8b. It was built freshly from source, including the modified GGML dependency. The portable recipe reconstructs the tested source bytes and equivalent build options; it did not produce that private reference image, and identical binaries across different build paths are not claimed. This work was developed with Codex assistance; the measurements below come from retained completed runs.Proposed first scope
DS4_PREFILL_REGISTER_RAM_MB=196608is a 192 GiB host-registration cap, not VRAM or duplicated weights. Registration failure must remain a safe refusal/fallback.Cancellation recovery here belongs to this new custom path; I have not independently established the same bug in stock upstream. The prototype currently disables
DS4_WARMandDS4_COPY_PINto avoid competing producer/registration ownership. Integrating with upstream's existing store lifecycle needs review. I would keep the larger prefill/kernel/GGML changes, compatibility fixes, setup/UI and machine-specific launch/tunnel work outside this initial patch.Environment and benchmark contract
Windows x64; one RTX PRO 6000 Blackwell Max-Q 96 GB / 300 W; Ryzen 9 7950X3D; nominal 256 GiB RAM (255.2 GiB reported); NVMe; CUDA 13.2; MSVC 14.44/compiler 19.44; SM120a. Exact OrcaRouter DeepSeek-V4.1-Flash-1017 abliterated Mix-256G originals plus lossless compatibility sidecars; all six trunk experts; total context 1,048,576; CPU 16; DSpark on/block 3/confidence 0.65; mmap off; SSD cache 0; prefill chunk 65,280. No smaller quantization or expert-count reduction was used.
The native workload has two fresh 999,764-token, zero-reuse seeds, thirteen followups per wave and an unrelated interlude in one owned process (29 GENs). Each followup reuses that full prefix and ends naturally. Decode is
sum(emitted IDs - 1) / sum(last-ID time - first-ID time)over the original twelve tasks, including reasoning/control/EOS IDs; HTTP frames are not counted as tokens. TTFT is separate. Output lengths differ; these are not identical-output latency comparisons or standard-protocol/approved Strata benchmark results.Measured results: two separate paired experiments
The historical paired result measured +9.29% / +10.86% decode, with wave 2 TTFT slightly worse. Its control includes required compatibility changes; it is not an untouched official executable. That result supports the tested configuration, not an isolated gain for every component.
The v0.2.7 comparison was 1.35% / 1.63% slower in decode, with 1.11% / 1.96% higher TTFT, against the previous custom build. It met the predeclared local update bounds (at least 95% decode, at most 105% TTFT). There is no custom-versus-stock v0.2.7 performance result. These pairs must not be combined into a version-causal or universal speedup claim.
Passed, failed and not run
Passed, within the recorded scope: the fresh CUDA build; 133 numeric GPU cases and 96 guards; 1,248 IQ cases across eight fresh owned runs; native direct/retire/rearm/source-protection and exit-zero cleanup gates. The five loaded Stop modes cover setup twice, decode, active prefill, early rearm and initial prefill: six actual cancellations, 34 FIRST grades and 39 uncancelled rows. Each FIRST recovery met its 95% decode bound with direct work and zero observed bounce/CPU fallback. Initial-prefill cancellation uses a declared separate-process control; recovery remains inside FIRST TTFT, so the ratios do not establish a universal post-cancel speedup. A separate fresh near-1M API qualification passed exact-answer, natural SSE termination, tool-protocol and disconnect-recovery checks.
Failures retained:
passed=false. A legacy account-balance response used attribute access that the unchanged dictionary-only worker rejected. The already-frozen explicit-dictionary version passed; the predeclared first-eleven-plus-v2 primary set passed 24/24. No raw grade, generated code or oracle was repaired.Not run / limits: HIP compilation or execution, Linux CUDA, other GPUs/models, multi-GPU, batching, low-RAM acceptance, broad perplexity/model-quality acceptance, and the upstream standard benchmark protocol on these patches. CPU/GPU output bit identity is not claimed. Large page-locked host allocations consume real physical memory and driver resources; a page file is not a replacement. The current source bundle contains coupled optimizations; a minimal current-main patch still needs its own before/after and default-off validation. Missing backend checks would be disclosed in draft PRs.
Existing work and requested guidance
I searched open and closed issues/PRs. Relevant work includes #4286 (huge-page backing for the existing registered RAM store), #4199 (DeepSeek batching), and #4219 (Windows RTX PRO 6000 prompt-performance reports). The proposed copied-RAM-to-device staging path needs to align with that ownership/store work; these different models, settings and workloads are not comparable benchmark arms or proof of the same bug.
Would you prefer the first contribution to be a bounded CUDA staging/registration primitive with fixtures, or the complete opt-in single-request path including recovery? Which upstream store/worker interface should own the registration ledger, and what additional backend/quality gates would you require before review? I can prepare smaller patches after agreement and keep further evidence in this thread.
@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.