[hermes-dflash-phone-cli][2/n] Preserve compute failures during cancellation#9
Merged
Merged
Conversation
dflash speculative decoding emits EOS as the very first token on certain agentic "decision" turns, returning an empty completion (0 tokens, finish=stop, no tool_call). The agent loop then stalls with nothing to run -- the user-visible "dflash stops the moment it needs to do something." At temperature 0 spec-decode must equal AR greedy, so this is a spec-decode correctness bug (the batched target verify diverges from AR on the first emitted position for these contexts). Root cause isolated with a reproducible eval (stateless dflash-nocache lane, two full passes byte-identical, jaccard 1.0): 9 of 55 real captured agentic turns produce empty output under spec-decode, deterministically. The SAME turns produce correct non-empty output on the AR path (no draft/ddtree) and on stock llama.cpp Q6 -- so it is specific to the dflash spec-decode path, not the prompt or the model weights. Fix: at the two do_spec_decode call sites, if it returns success but emitted zero tokens, fall back to do_ar_decode. The trigger is strictly "0 tokens emitted", so healthy turns (which emit >=1 token) never reach the fallback -- blast radius is exactly the currently-100%-failing turns. do_ar_decode is the existing autoregressive path, verified correct here. Validated (all turns replayed in isolation on the reproducible lane): - 9/9 empty turns now produce non-empty output - those 9 outputs are BYTE-IDENTICAL to the AR lane (fallback resumes from correct state) - full 55-turn sweep: empty count 9 -> 0, zero regressions to empty, tool-call set unchanged - prefix-cache oracle still 6/6 bit-identical - 12-turn consecutive sequence on the stateful cache-on lane: 0 empties (no cross-turn state poisoning) Spec-decode speed is retained for every non-degenerate turn; the slower AR path runs only on the rare empty case (which was already failing). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fixes Luce-Org#102 Adds --target-gpu / --draft-gpu CLI flags and DFLASH_TARGET_GPU / DFLASH_DRAFT_GPU environment variables to the README server configuration table. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
This is the replacement fork mirror for the current head of Luce-Org#324. Why this exists:
Verification:
|
Owner
Author
Post-merge reviewer dispatch (hermes-local-longctx-ko-mac)Verdict: APPROVE (with non-blocking suggestions below) Reviewed the full diff across 17 files (~757 additions). This is a substantial and well-structured change. Summary of findings: What works well
Non-blocking suggestions
Minor nit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror follow-up for Luce-Org#324 after #8 had already merged.\n\nThis covers the review-fix commit 47fd712 only: preserve completed ggml graph_compute failures ahead of cancellation checks so disconnect handling cannot mask a backend compute failure.\n\nVerification:\n- taro clean clone: cmake configure/build test_server_unit\n- taro clean clone: server/build/test_server_unit => 1647 assertions, 0 failures\n\nUpstream review context: cubic identified the masking issue on Luce-Org#324.