mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #638] DeepSeek ds4: requests end early with finish=length under --parallel (and rarely solo) - no error, engine-side #264
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#264
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 @handmade0octopus on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/638
DeepSeek ds4: requests under
--parallel(and rarely solo) end early withfinish=length— no error, engine-sideSummary
On Windows (CUDA, RTX 4090 D, sm_89), a maya-ds4 request's token stream sometimes just ends early:
the engine emits
DONEwithproduced < max_newandfinish=length, no error line, no NaN, noillegal-memory-access, no restart, no WER event. The server side sees a normal end-of-stream and
reports the answer as complete. Reproduced on v1.1.34 (with local patches) and on a clean v1.1.36
(
f031a23) build. Under--parallel 2in the first-request-after-boot regime it reproduces on mostattempts; the worst case truncated both concurrent requests.
Cleanest reproduction (v1.1.36,
f031a23, quiet box)--pack ... --max-context 262144 --mmap-experts off --cpu-threads 12 --dspark on --parallel 2max_new=2048,driven over the server (raw-ID SSE), two conversations concurrently, immediately after boot.
DS4_STREAM_ZC=1 DS4_STREAM_ZC_ALL=1 DS4_STREAM_ZC_NOWAIT=1 DS4_STREAM_WIN=1 DS4_LAND=1 MAYA_DS4_PIN_BY_NEED=1 MAYA_DS4_PIN_GB=0 MAYA_DS4_Q8_BATCH=1 DS4_FAT_ROWS=0 MAYA_DS4_HC_FUSE=2 MAYA_DS4_DECODE_TRIM=7 DS4_ENGRAM_CACHE_MB=8192 DS4_ENGRAM_PREFETCH=1 DS4_ENGRAM_PREFETCH_CHUNKS=-1.Attempt A —
--dspark on: both requests truncatedBoth conversations stop at the same wall-clock instant (~1-2 verify windows into the shared step).
Note request 1's own summary: 17 tokens took 33.4 s (0.51 tok/s) — the shared step appears to stall
~30 s before the requests are ended. No
ERR, no engine restart, no CUDA error in the log.Attempt B —
--dspark off(same everything else): one of two truncatedThe truncated request had no drafts at all (
drafts 0 of 0 kept) — so the new #611 paralleldrafter path is not required; prompt-lookup-only and no-drafting requests truncate too. (The clean
one had lookup drafts.) Same boot regime, same everything else.
Attempt C — identical to A (fresh boot, fresh prompts): clean
2048/2048 both conversations (drafts kept 69–75%, decode aggregate 40.6 t/s). Same regime as A, so
within
--dspark on--parallel 2first-boot runs it is intermittent: A truncated 2/2 requests,C truncated 0/2.
Earlier statistics (v1.1.34 + local commits, same box/pack)
1638, 1696, 1713, 1991 of 2048 tokens — in
--parallel 1/2/4cells alike, almost always in thefirst requests after a fresh engine boot.
produced/limit/max_new/pos/ max_ctx/finish) ran 8 clean solo first-request attempts: 0/8 reproductions, and on every cleanrun
limitwas honored exactly (produced=2048 limit=2048 ... finish=length),possane.So the truncation is an intermittent extra exit from the generation loop that leaves the
finish="length"default in place — not an off-by-one in the limit.What it is not
DONE ... length._Exit(3)s (engine restart), which never happened in these runs.Observation
The exit leaves
finishat its"length"default, so it is a third loop exit besidesproduced >= limit(honest length) and EOS (stop)/cancel. The 33 s stall inside request 1'sshared step in attempt A, and both requests ending together, point at the parallel shared-step /
CPU-response machinery giving up and ending the affected requests. The bug also exists on
v1.1.34 (pre-#611), so #611's rewrite is not the sole cause — but attempt A shows the shared step
can stall before the truncation.
Happy to run instrumented builds or specific env matrices — this box reproduces it under
--parallel 2readily (dspark on: 2 of 4 requests truncated across two fresh-boot attempts today).@handmade0octopus commented on GitHub (Oct 29, 2026):
Full-matrix data point on v1.1.36 + our ws-trim/MSVC cherry-picks (exe
C907980E), IQ1_M,--dspark on, full production env (ZC_ALL/ZC_NOWAIT etc.): 12-cell matrix (par 1/2/4 × 32k/64k/128k/256k prompts + 2,048 decode, fresh boot + fresh unique prompts per cell,--parallel N), with automatic retry — up to 3 fresh-boot attempts per cell until every conversation is 2048/2048.Incidence: 10 of 54 requests truncated across 20 attempts (12 first-boot cells + 8 retries).
finish=length(the token stream just ends), no error lines, no NaN/non-finite linescudaHostAllocfailures — the par-4 big-context IMA from the earlier report did not recur on this buildSame intermittent first-boot-heavy pattern as the original report; adding this as a quantitative follow-up since the matrix gives a much larger N than the initial six-request tally. Raw per-attempt results (
result-aK.jsonwith per-conversation token counts) + engine logs:D:\ai\tests\maya\par-sweep-2026-10-28\v136w-p*(summary inPAR-SWEEP-RESULTS.md§7.4).