test(benchmark): add chunk reuse accuracy baseline and repair analysis#75
Open
7774596 wants to merge 1 commit into
Open
test(benchmark): add chunk reuse accuracy baseline and repair analysis#757774596 wants to merge 1 commit into
7774596 wants to merge 1 commit into
Conversation
Measure chunk-mode KV reuse vs full prefill on LongBench QA through the production HTTP service, scoring raw F1, extracted-answer F1, and gold recall over samples with a verified chunk-KV load. Document the error decomposition, hard constraints, ranked repair directions, and corrected baseline results including the generation-cap truncation pitfall.
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
benchmarks/bench_accuracy_baseline.py: measures chunk-mode KV reuse vs full prefill accuracy on LongBench QA (hotpotqa, 2wikimqa, musique) through the production HTTP service (/documents+/infer), with identical greedy decoding in both modes.docs/optimizations/5_chunk_cross_attention_repair.md: error decomposition (fake attention sinks, missing cross-chunk attention, pad noise, RoPE numerics), hard constraints from the connector interface, ranked repair directions (shared-prefix prefill, composed-prefix partial hits, seam patches, per-chunk correction), and the measured baseline results.Results (Qwen3-8B, RTX 4090, greedy, max_new_tokens=256)
Test plan
ruff check/ruff format --checkpass on the benchmark scriptLoadedcolumn detects and excludes silent full-prefill fallbacks