Skip to content

llama : run all KQV ops on the CPU with no KV offload #5049

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

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Conversation

slaren
Copy link
Member

@slaren slaren commented Jan 20, 2024

This change restores the behavior such that all the attention ops are run on the CPU when not offloading the KV. The net effect is that the amount of data that needs to be transferred between the CPU and GPU is much smaller, and performance should improve for large contexts, but for small contexts prompt/batch performance may be worse.

This should also fix nkvo with CUDA, but the underlying issue is still not known.

@JianbangZ
Copy link

JianbangZ commented Jan 22, 2024

@slaren As I mentioned somewhere else, this commit broke some stuff
#5082

crasm pushed a commit that referenced this pull request Jan 23, 2024
jordankanter pushed a commit to jordankanter/llama.cpp that referenced this pull request Feb 3, 2024
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 1, 2024
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