Repository navigation
speculative: merge a draft tree's duplicate sibling candidates (tree verify 500s on every C1 request) - #368
Merged
Merged
Conversation
The DFlash2 selector can list one token twice for a draft position; best_first pushed one heap candidate per entry, so two sibling rows could carry the same token and DraftTree::validate rejected the tree. Every C1 request under ATLAS_DFLASH_TREE then failed on its first verify step (HTTP 500, "draft tree: rows 1 and 2 are siblings with one token", no ERROR line). Duplicates now merge into one child carrying their summed mass. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2 tasks done
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.
Summary
On main, every C1 request with
ATLAS_DFLASH_TREE=<rows>(#333's exact tree verify) fails on its first verify step. The client gets HTTP 500engine error: decode_verify_dflash_tree: draft tree: rows 1 and 2 are siblings with one token. The serve log only saysDone: 1 tokens (error), with no ERROR line.Cause: the DFlash2 selector can list one token twice for a draft position.
best_firstpushes one heap candidate per entry, so two sibling rows can carry the same token, andDraftTree::validatethen rejects the tree. Duplicates now merge into one child carrying their summed mass. Ordering is unchanged otherwise.Results (one GB10, Qwen3.8-27B NVFP4, the #333 exact profile at 8 seqs +
ATLAS_DFLASH_TREE=16)eca124b5ATLAS_ATTN_SHARED_SCAN=1, vs the switch-on serialOpen, not fixed here: with the error gone, tree-verify requests accept no drafts on this setup:
p1=0.000 mean_na=0.000 tok_step=1.000, 10.7 tok/s, the serial rate. The chain verify on the same serve accepts ~3 per step. #333 measured tree verify at +4%. It's exact but not yet faster here, so it stays off in the recipe. Receipts:nq-137-tree-fixandnq-136on sparky.Separately:
ATLAS_DFLASH_TREE=16at--max-num-seqs 64(the recipe's width) is killed at load withNV_ERR_NO_MEMORY. It sizes 15 SSM verify snapshots for all 65 slots, although tree verify runs only at C1.Test plan
duplicate_candidates_merge_into_one_childfails on main and passes here;draft_tree9/9; fmt; clippyATLAS_DFLASH_TREE: exact tree verify at C1, up to 16 rows)Generated with Devin