Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
ZX-ModelCloud committed Dec 20, 2024
1 parent 5bd16e2 commit eca906b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gptqmodel/models/definitions/qwen2_vl.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from typing import Dict

from qwen_vl_utils import process_vision_info

from transformers import AutoModelForVision2Seq, Qwen2VLProcessor

from ..base import BaseGPTQModel
Expand All @@ -10,6 +8,8 @@


class Qwen2VLGPTQ(BaseGPTQModel):
require_pkgs_version = ["qwen_vl_utils>=0.0.8"]

loader = AutoModelForVision2Seq

base_modules = ["model.embed_tokens", "model.norm"]
Expand Down Expand Up @@ -66,6 +66,8 @@ def prepare_dataset(
calibration_dataset,
batch_size: int = 1,
tokenizer=None, ):
from qwen_vl_utils import process_vision_info

processor = Qwen2VLProcessor.from_pretrained(self.model_id_or_path)
calib_data = []
for batch in batched(calibration_dataset, batch_size, process_func=self.preprocess_dataset):
Expand Down

0 comments on commit eca906b

Please sign in to comment.