Skip to content

Fix DecodingPress argument names in README#249

Open
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:docs/decoding-press-readme-args
Open

Fix DecodingPress argument names in README#249
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:docs/decoding-press-readme-args

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • update the DecodingPress README examples to use the current constructor argument names
  • fix the listed default values for compression_interval, target_size, and hidden_states_buffer_size
  • clarify that the examples compress to a target cache size, not a token buffer size

Root cause

The README examples still used older argument names like compression_steps and token_buffer_size, while the implementation now expects compression_interval, target_size, and hidden_states_buffer_size. Copy-pasting the old examples raised TypeError.

Validation

  • rg -n "compression_steps|token_buffer_size|compression_interval|target_size|hidden_states_buffer_size" README.md
  • `uv run --python 3.11 python - <<'PY'
    from kvpress import DecodingPress, KnormPress, CriticalKVPress, PrefillDecodingPress

DecodingPress(base_press=KnormPress(), compression_interval=10, target_size=512)
PrefillDecodingPress(
prefilling_press=CriticalKVPress(KnormPress()),
decoding_press=DecodingPress(base_press=KnormPress(compression_ratio=0.2), compression_interval=5, target_size=256),
)
print("doc-snippets-ok")
PY`

Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant