Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.
This repository was archived by the owner on May 11, 2025. It is now read-only.

internvl_chat isn't supported yet. #737

@Maglanyulan

Description

@Maglanyulan

environment:

autoawq==0.2.8
GPU V100

code:

from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer

model_path = 'InternVL2_5-4B-MPO'
quant_path = 'InternVL2_5-4B-MPO-awq'
quant_config = { "zero_point": True, "q_group_size": 128, "w_bit": 4, "version": "GEMM" }

# Load model
model = AutoAWQForCausalLM.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

# Quantize
model.quantize(tokenizer, quant_config=quant_config)

# Save quantized model
model.save_quantized(quant_path)
tokenizer.save_pretrained(quant_path)

print(f'Model is quantized and saved at "{quant_path}"')

error:

File "/usr/local/lib/python3.10/site-packages/awq/models/auto.py", line 76, in from_pretrained
    model_type = check_and_get_model_type(
  File "/usr/local/lib/python3.10/site-packages/awq/models/auto.py", line 51, in check_and_get_model_type
    raise TypeError(f"{config.model_type} isn't supported yet.")
TypeError: internvl_chat isn't supported yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions