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

No reduction in model size #15

Open
Sekri0 opened this issue Oct 1, 2024 · 5 comments
Open

No reduction in model size #15

Sekri0 opened this issue Oct 1, 2024 · 5 comments

Comments

@Sekri0
Copy link

Sekri0 commented Oct 1, 2024

I use this command to quantize llama2-7b-chat model, but the model size dosen't change.
CUDA_VISIBLE_DEVICES=0 python3 main.py
--model /mnt/home/model/llama2-7b-chat-hf
--epochs 20 --output_dir ./log/llama2-7b-w2a8
--eval_ppl --wbits 2 --abits 8 --lwc --let
--tasks piqa,arc_easy,arc_challenge,boolq,hellaswag,winogrande
--real_quant
--save_dir /mnt/home/model/abq-llm/llama2-7b-w2a8

@zengchao0424
Copy link

Hello, the weights obtained through this way are the calibrated fake quantization weights. To achieve actual weight compression, a packing operation is required to store the weights. For example, using INT2 quantization, the pack operation will use an INT32 to store 16 INT2 element values.

@lswzjuer
Copy link
Collaborator

lswzjuer commented Oct 3, 2024

We are developing a complete link from pseudo-quantized models to real packing weights and directly executing WxAy quantized inference in Torch, which is expected to be released within a week after the National Day. We did not release this link before because the engine inside ByteDance is a pure C++ solution.

@Sekri0
Copy link
Author

Sekri0 commented Oct 15, 2024

We are developing a complete link from pseudo-quantized models to real packing weights and directly executing WxAy quantized inference in Torch, which is expected to be released within a week after the National Day. We did not release this link before because the engine inside ByteDance is a pure C++ solution.

Thank you for your work. May I ask when you guys are planning to release the code related to real packing weight and Torch inference

@lswzjuer
Copy link
Collaborator

lswzjuer commented Oct 17, 2024 via email

@limertang
Copy link

@lswzjuer
Did you release the code?
I quantized the model,and the model size of save_dir is still the same as before.

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

4 participants