- 강의 질문
- AI TECH
Part 2 모델 경량화
2025.09.03 15:26 작성
# 모델 경량화: Quantization 설정
from transformers import BitsAndBytesConfig
import torch
quantization_config=BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type='nf4'
)
위 코드 실행 시 아래와 같은 런타임 에러가 발생합니다. 어떻게 해결해야하나요?
RuntimeError Traceback (most recent call last)
/tmp/ipython-input-481459432.py in <cell line: 0>()
1 # 모델 경량화: Lora 설정
----> 2 from peft import LoraConfig
RuntimeError: CUDA Setup failed despite GPU being available. Please run the following command to get more information: python -m bitsandbytes
위 와 같이 해봐도 해결되지 않고 있습니다.