Repository navigation
Add EchoPress - #300
Open
ljwljwljwljw wants to merge 1 commit into
Open
Add EchoPress#300ljwljwljwljw wants to merge 1 commit into
ljwljwljwljw wants to merge 1 commit into
Conversation
Approximate KVzip scores through virtual context reconstruction during prefill. Reconstruct the first chunk exactly and calibrate later virtual scores per request, layer, and KV head. Signed-off-by: Jiawei Lin <jiawei.lin@epfl.ch>
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.
PR description
Add
EchoPress, a training-free approximation to KVzip that reuses prefill queries and cached keys to score virtual context repetitions. Paper: https://arxiv.org/abs/2610.00412EchoPress virtually reconstructs context by rotating queries during prefill. It performs a single KVzip-style reconstruction pass on the first chunk, capped at 2K tokens, then uses the exact KVzip scores from that chunk to calibrate the virtual scores of subsequent chunks.
Evaluation
EchoPressmatches KVZip's accuracy on both RULER-4K and LongBench. Benchmark details can be found in our paper.Code changes
echoentry in the evaluation registry.Checklist
Before submitting a PR, please make sure:
Tests are working (
make test)Code is formatted correctly (
make style, on errors try fix withmake format)Copyright header is included
All commits are signed-off using
git commit -s(new press)
mypress_press.pyis in thepressesdirectory(new press)
MyPressis in__init__.py(new press)
README.mdis updated with a 1 liner about the new press in the Available presses section(new press) New press is in the
default_presseslist intests/default_presses.py(new press) A docstring is provided that follows the same structure as the existing ones