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

use flash_attn_with_kvcache for faster inference #2539

Merged
merged 11 commits into from
Dec 26, 2023

Conversation

vince62s
Copy link
Member

@vince62s vince62s commented Dec 19, 2023

This PR does:

  1. switch apex RMSNorm to awq_inference_engine RMSNorm which is much faster
  2. add rotary_theta as an option (llama/mistral used to use 1e4 while Mixtral and mistralv0.2 use 1e6)
  3. use flash2 flash_attn_with_kvcache instead of regular flash_attn_func for step > 0 (much faster to increment cache in place in certain cases)

@vince62s vince62s changed the title [WIP] use flash_attn_with_kvcache for faster inference use flash_attn_with_kvcache for faster inference Dec 26, 2023
@vince62s vince62s merged commit 0436cdd into OpenNMT:master Dec 26, 2023
2 checks passed
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