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

How to build int4_gptq on Mixtral 8x7b #1581

Open
gloritygithub11 opened this issue May 12, 2024 · 3 comments
Open

How to build int4_gptq on Mixtral 8x7b #1581

gloritygithub11 opened this issue May 12, 2024 · 3 comments
Assignees
Labels
triaged Issue has been triaged by maintainers

Comments

@gloritygithub11
Copy link

I use following code to generate the checkpoint:

set -e

export MODEL_DIR=/mnt/memory
export MODEL_NAME=Mixtral-8x7B-Instruct-v0.1
export LD_LIBRARY_PATH=/usr/local/tensorrt/lib:$LD_LIBRARY_PATH
export PATH=/usr/local/tensorrt/bin:$PATH
export PRECISION=int4_gptq_a16
export QUANTIZE=int4_gptq
export DTYPE=bfloat16
export PYTHONPATH=/app/tensorrt-llm:$PYTHONPATH


python ../llama/convert_checkpoint.py \
    --model_dir $MODEL_DIR/${MODEL_NAME} \
    --output_dir $MODEL_DIR/tmp/trt_models/${MODEL_NAME}/$PRECISION/1-gpu \
    --dtype $DTYPE \
    --use_weight_only \
    --weight_only_precision $QUANTIZE 

get error:

[TensorRT-LLM] TensorRT-LLM version: 0.10.0.dev2024050700
0.10.0.dev2024050700
Traceback (most recent call last):
  File "/app/tensorrt-llm/examples/llama/../llama/convert_checkpoint.py", line 466, in <module>
    main()
  File "/app/tensorrt-llm/examples/llama/../llama/convert_checkpoint.py", line 445, in main
    assert args.modelopt_quant_ckpt_path is not None

It looks the convert_checkpoint.py require a parameter for modelopt_quant_ckpt_path. How to generate modelopt_quant_ckpt_path?

@byshiue
Copy link
Collaborator

byshiue commented May 15, 2024

Thank you for the report. GPT-Q is not supported in MoE model.

@byshiue byshiue self-assigned this May 15, 2024
@byshiue byshiue added the triaged Issue has been triaged by maintainers label May 15, 2024
@gloritygithub11
Copy link
Author

Thanks @byshiue for the response. Will it be supported at sometime in future?

@byshiue
Copy link
Collaborator

byshiue commented May 17, 2024

We are working on the feature. We will update here if the feature is supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

2 participants