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 merge_qkv to replace fused_qkv for llama2 #11727

Merged
merged 9 commits into from
Aug 7, 2024

Conversation

rnwang04
Copy link
Contributor

@rnwang04 rnwang04 commented Aug 6, 2024

Description

1. Why the change?

  • Use merge_qkv to replace fused_qkv for llama2 to improve batch performance

  • update to use new rope

  • validate Llama-2-7b-chat-hf when transformers 4.36.2 with IPEX_LLM_QUANTIZE_KV_CACHE=0

  • validate Llama-2-7b-chat-hf when transformers 4.36.2 with IPEX_LLM_QUANTIZE_KV_CACHE=1

  • validate Llama-2-7b-chat-hf when transformers 4.31.0 with IPEX_LLM_QUANTIZE_KV_CACHE=0

  • validate Llama-2-7b-chat-hf when transformers 4.31.0 with IPEX_LLM_QUANTIZE_KV_CACHE=1

  • validate Llama-2-7b-chat-hf when transformers 4.41.0 with IPEX_LLM_QUANTIZE_KV_CACHE=0

  • validate Llama-2-7b-chat-hf when transformers 4.41.0 with IPEX_LLM_QUANTIZE_KV_CACHE=1

  • validate Llama-2-7b-chat-hf when transformers 4.36.2 on CPU

2. User API changes

No change.

3. Summary of the change

  • Use merge_qkv to replace fused_qkv for llama2 to improve batch performance
  • update to use new rope
  • Fix CPU ut

4. How to test?

  • Unit test: Please manually trigger the PR Validation here by inputting the PR number (e.g., 1234). And paste your action link here once it has been successfully finished.

@rnwang04 rnwang04 marked this pull request as draft August 6, 2024 10:22
@rnwang04
Copy link
Contributor Author

rnwang04 commented Aug 6, 2024

@rnwang04 rnwang04 marked this pull request as ready for review August 7, 2024 02:47
@rnwang04
Copy link
Contributor Author

rnwang04 commented Aug 7, 2024

@rnwang04 rnwang04 merged commit 00a5574 into intel-analytics:main Aug 7, 2024
1 check passed
@rnwang04 rnwang04 deleted the use_merged_qkv_for_llama branch August 7, 2024 10:04
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.

2 participants