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

Add int8 models to Llama2 and Llama3 #1734

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

james77777778
Copy link
Collaborator

The params is the number reported by Model.summary() which should be consistent with other models.
All models can run inference using colab T4.
You can check out the outputs of llama3_instruct_8b_en_int8 from this colab:
https://colab.research.google.com/drive/1KbUzNsY0906HFcn7FzRiBDtOtO-08msj?usp=sharing

Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

Looks good! Maybe mention int8 in the description?

@@ -25,6 +25,16 @@
},
"kaggle_handle": "kaggle://keras/llama2/keras/llama2_7b_en/1",
},
"llama2_7b_en_int8": {
"metadata": {
"description": "LLaMA 2 7B Quantized Base model",
Copy link
Member

Choose a reason for hiding this comment

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

Maybe LLaMA 2 7B base model with weight quantized to int8.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have updated the description to follow Gemma's convention.

Additionally, I used "with activation and weights quantized to int8." to indicate that we are using dynamic int8 quantization instead of weights-only quantization.

WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

sgtm!

@mattdangerw mattdangerw merged commit 9fa1237 into keras-team:master Aug 6, 2024
7 checks passed
@james77777778 james77777778 deleted the add-int8-models branch August 7, 2024 00:32
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