Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix past_present_share_buffer=false kv cache bug and asserts #1110

Merged
merged 6 commits into from
Dec 4, 2024

Conversation

aciddelgado
Copy link
Contributor

This PR fixes a bug where, when using continuous decoding, the output would differ depending on whether past_present_share_buffer was on or off. The bug was actually deeper than this, as the KV-Cache was missing the last generated token when using continuous decoding, regardless of share buffer.

It also fixes a few assert statements.

src/generators.h Outdated Show resolved Hide resolved
src/generators.cpp Outdated Show resolved Hide resolved
src/generators.h Outdated Show resolved Hide resolved
@guschmue
Copy link
Contributor

guschmue commented Dec 2, 2024

tested with webgpu and dynamic kv_cache ... super, that works now

src/generators.h Outdated Show resolved Hide resolved
@aciddelgado aciddelgado merged commit 4bae456 into main Dec 4, 2024
12 of 13 checks passed
@aciddelgado aciddelgado deleted the aciddelgado/fix_kvcache_bug branch December 4, 2024 00:54
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.

3 participants