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 awq to quantize Deepseek-coder-33B-instruct model #157

Open
CarolXh opened this issue Mar 13, 2024 · 0 comments
Open

Use awq to quantize Deepseek-coder-33B-instruct model #157

CarolXh opened this issue Mar 13, 2024 · 0 comments

Comments

@CarolXh
Copy link

CarolXh commented Mar 13, 2024

When I use awq official code to quantize Deepseek-coder-33B-instruct model, the scripts are as following:

from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer

model_path = '/hy-tmp/deepseek-coder-33b-instruct'
quant_path = '/hy-tmp/deepseek-coder-33b-instruct-awq'
quant_config = { "zero_point": True, "q_group_size": 128, "w_bit": 4, "version": "GEMM" }

model = AutoAWQForCausalLM.from_pretrained(model_path, trust_remote_code=True, device_map="auto",**{"low_cpu_mem_usage": True})
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

model.quantize(tokenizer, quant_config=quant_config)

model.save_quantized(quant_path)
tokenizer.save_pretrained(quant_path)

It reports:
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
Token indices sequence length is longer than the specified maximum sequence length for this model (98937 > 16384). Running this sequence through the model will result in indexing errors
Killed

And then kills my process. How can I solve this problem if I use awq on such a big model?

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

1 participant