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

Support qwen2 model, optimize phi3 model, revise model loading strategy #46

Merged
merged 5 commits into from
Jul 5, 2024

Conversation

guoqingbao
Copy link
Collaborator

Key changes for #44 :

  1. QWen2 model added
  2. Performance of Phi3 optimized
  3. Redundant transpose removed in decoding stage for paged attention
  4. Model loading strategy changed: given a model type, specify the local weight path or concret model id, this enables loading of different models under the same model architecture, for example, llama3 for model type of "llama"
  5. ReadMe updated to reflect newly supported models and corresponding usage

Tested case:

cargo run --release -- --port 2000 --weight-path /home/qwen2-1.8b/ qwen2 --repeat-last-n 64

or

cargo run --release -- --port 2000 --model-id Qwen/Qwen1.5-1.8B-Chat qwen2 --repeat-last-n 64

Around 150 tokens/s achieved for qwen2 1.8B on A100 (mixed precision of FP32 and BF16).

@EricLBuehler
Copy link
Owner

Thank you for adding this, it is great. There are a bunch of unused items warnings when you build this, can you please check that?

@guoqingbao
Copy link
Collaborator Author

Thank you for adding this, it is great. There are a bunch of unused items warnings when you build this, can you please check that?

Fixed

Copy link
Owner

@EricLBuehler EricLBuehler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@EricLBuehler EricLBuehler merged commit 211346e into EricLBuehler:master Jul 5, 2024
5 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.

2 participants