mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4355] [Engine] Save a DeepSeek shared-prefix checkpoint when a suffix starts exactly at pin_at #1924
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#1924
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/4355
Area
[Engine] (speed, kernels, models, the server and API)
What do you want to do?
Would you accept a focused fix and regression for the case where a DeepSeek continuation starts exactly at the requested shared-prefix boundary? This is relevant when many questions share a long document, including near-1M inputs. The concern below is source-confirmed control flow; an isolated official-runtime failure has not been reproduced.
Runtime-effect status: unconfirmed static analysis, with combined custom-candidate validation below.
At current main
5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d(v0.2.7),ds4_main.cppcalculatespin_atand checkpoints slot 3 when prompt feeding reaches it (done == pin_at). If an already-held/restored seed ends exactly at that boundary, feeding starts withfrom == pin_at; a nonempty suffix movesdonepast it, so that post-feed condition does not save the already-present prefix. Suffix feeding also replaces the ordinary end checkpoints. I am asking whether the dedicated prefix should be saved before that happens.What do you do today instead?
My custom recipe inserts this one guarded statement immediately after the existing
pin_atcalculation, before suffix feeding:The original validity rules (
r.pin >= 256and a boundary before the prompt's last token) remain unchanged. The public implementation is four added lines including comments. An upstream patch would contain only this checkpoint concern, separate from Q6 compatibility, GPU expert misses and broader 1M prefill optimizations.Actual validation and missing regression
A fresh minimal v0.2.7 build containing this statement and two Q6 compatibility additions, without V6b performance features, produced executable
6b78b6ce264dbf790e01c14714f3e0df92668ea6e2fa3b2a793d43c8e1ac7c00(BUILD receiptcbbbebc0153ab4106b2441da7b619f766a595000a8fae69ab96a0c447e70786e). It passed 1,248 numeric cases in eight fresh owned runs and three short coding smoke requests on Windows/CUDA/SM120a, at 1,048,576-token capacity, with natural EOS/native-zero cleanup. Smoke report SHA:e10cde9562d2c7e3aaf85ed154b3de4f28a6893d77ef8a8be37c16021031ff09.These combined-candidate results do not isolate the checkpoint fix or establish a full-1M speed gain. The official binary was not model-loaded; no standalone failing-before/passing-after prefix test or HIP build/run has been performed. Recipe provenance is available.
Proposed regression, not yet run: seed a prefix of at least 256 tokens, continue with
pin=N, then send a different suffix and check that the exact N-token prefix remains restorable after the ordinary end checkpoints change. Cover zero/invalid pins and boundaries reached during feeding as controls. Would you prefer that isolated test before a small draft PR, and is checkpoint slot 3 the intended owner for this boundary case?Related: #4206 discusses Qwen's
generate.cppcheckpoint density and semantic body-end cuts. This proposal concerns a different DeepSeekds4_main.cppequality boundary; I am not claiming the same cause or that the Qwen report validates this change.@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.