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

Reduction in the number of parameters #1584

Closed
sri-fiddler opened this issue Jan 28, 2025 · 2 comments
Closed

Reduction in the number of parameters #1584

sri-fiddler opened this issue Jan 28, 2025 · 2 comments

Comments

@sri-fiddler
Copy link

The number of parameters for a Llama 3.1 8B model is 8.03B according to Huggingface. The same Unsloth model, when quantised to 4bits is 4.56B. How and why is there a reduction in the number of parameters? As far as I am aware, quantisation reduces the size of each parameter, but it doesn't do away with it.

Meta Llama 3.1 8B : https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct

Unsloth Llama 3.1 8B : https://huggingface.co/unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit

@danielhanchen
Copy link
Contributor

Oh not a bug - it's because the pre-quantized uploads saves it directly in 4bit, and packs them into 1 8bit number, hence the reduction

@sri-fiddler
Copy link
Author

This is quite brilliant. Good optimisation.

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

No branches or pull requests

2 participants