가중치 4비트 양자화 후 예시 코드의 vlm_chat 실행 불가

#13
by gowns - opened

다음과 같은 코드로 4비트 양자화 했습니다.

quantization_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_compute_dtype=torch.float32,
    bnb_4bit_use_double_quant=True,
    bnb_4bit_quant_type="nf4"
)


model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, quantization_config=quantization_config, torch_dtype=torch.float32).to(device="cuda")
preprocessor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_name)

양자화 적용 전에는 정상적으로 실행되는 것을 확인했습니다. 양자화 적용 후에는 예시의 chat 부분은 정상적으로 실행되나 vlm_chat 부분에서 첨부한 이미지와 같은 에러가 발생합니다. 설정이 잘 못 된 것일까요?

스크린샷 2025-04-30 140935.png

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment