Skip to content

fix: auto-disable dynamic shapes when custom KV cache is enabled#235

Open
psiddh wants to merge 1 commit into
huggingface:mainfrom
psiddh:auto-disable-dynamic-shapes-with-custom-kv-cache
Open

fix: auto-disable dynamic shapes when custom KV cache is enabled#235
psiddh wants to merge 1 commit into
huggingface:mainfrom
psiddh:auto-disable-dynamic-shapes-with-custom-kv-cache

Conversation

@psiddh

@psiddh psiddh commented Jun 24, 2026

Copy link
Copy Markdown

The custom KV cache op (update_cache) only supports single-token inputs, but dynamic shapes enables variable-length prefill. This combination exports successfully but crashes at inference with an opaque error.

Auto-set disable_dynamic_shapes=True when use_custom_kv_cache=True, with a warning log so users know the override happened.

The custom KV cache op (update_cache) only supports single-token inputs,
but dynamic shapes enables variable-length prefill. This combination
exports successfully but crashes at inference with an opaque error.

Auto-set disable_dynamic_shapes=True when use_custom_kv_cache=True,
with a warning log so users know the override happened.

Co-authored-by: Claude <noreply@anthropic.com>
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