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

AttributeError: 'Qwen2VLAWQForCausalLM' object has no attribute 'prepare_inputs_for_generation' #3089

Open
GLaStu opened this issue Feb 13, 2025 · 1 comment

Comments

@GLaStu
Copy link

GLaStu commented Feb 13, 2025

在使用swift的web-ui进行模型导出时,提示AttributeError: 'Qwen2VLAWQForCausalLM' object has no attribute 'prepare_inputs_for_generation'。

@Jintao-Huang
Copy link
Collaborator

Jintao-Huang commented Feb 13, 2025

# Test environment: transformers==4.47.1, autoawq==0.2.8
CUDA_VISIBLE_DEVICES=0 \
swift export \
    --model Qwen/Qwen2-VL-2B-Instruct \
    --dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
              'AI-ModelScope/alpaca-gpt4-data-en#500' \
    --quant_n_samples 256 \
    --quant_batch_size -1 \
    --max_length 2048 \
    --quant_method awq \
    --quant_bits 4 \
    --output_dir Qwen2-VL-2B-Instruct-AWQ

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