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

KV cache for faster generation #197

Closed
carmocca opened this issue Apr 27, 2023 · 0 comments · Fixed by #266
Closed

KV cache for faster generation #197

carmocca opened this issue Apr 27, 2023 · 0 comments · Fixed by #266
Labels
enhancement New feature or request inference

Comments

@carmocca
Copy link
Member

Reference: https://www.dipkumar.dev/becoming-the-unbeatable/posts/gpt-kvcache/
Whisper (MIT licensed) has a nice PyTorch-y implementation for this: https://github.com/openai/whisper/blob/c09a7ae299c4c34c5839a76380ae407e7d785914/whisper/model.py#L274-L305
nanoGPT doesn't implement this.

An argument against this is that it complicates the model code during training

Suggested by @Liyang90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request inference
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant