Closed zs856 closed 3 months ago
Apologies on the delay! It seems like your GPU has too less VRAM maybe
Apologies on the delay! It seems like your GPU has too less VRAM maybe
I am not sure actually.
Here below is the information I got when I tried to make use of mistralai/Mistral-Nemo-Instruct-2407
:
🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.
==((====))== Unsloth 2024.8: Fast Mistral patching. Transformers = 4.43.3.
\\ /| GPU: NVIDIA L20. Max memory: 44.521 GB. Platform = Linux.
O^O/ \_/ \ Pytorch: 2.3.0+cu121. CUDA = 8.9. CUDA Toolkit = 12.1.
\ / Bfloat16 = TRUE. FA [Xformers = 0.0.26.post1. FA2 = False]
"-____-" Free Apache license: http://github.com/unslothai/unsloth
However, for loding this model successfully, I had to run the code below in the very beginning:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "3"
Otherwise, I will get:
ValueError: Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit the quantized model. If you want to dispatch the model on the CPU or the disk while keeping these modules in 32-bit, you need to set load_in_8bit_fp32_cpu_offload=Trueand pass a customdevice_maptofrom_pretrained. Check https://huggingface.co/docs/transformers/main/en/main_classes/quantization#offload-between-cpu-and-gpu for more details.
Oh that error means you're running our of VRAM on 1 GPU - sadly Unsloth doesn't work yet on multi GPU setups
Here below is the code I run:
I got:
ValueError: Some modules are dispatched on the CPU or the disk. Make sure you have enough GPU RAM to fit the quantized model. If you want to dispatch the model on the CPU or the disk while keeping these modules in 32-bit, you need to set
load_in_8bit_fp32_cpu_offload=Trueand pass a custom
device_mapto
from_pretrained. Check https://huggingface.co/docs/transformers/main/en/main_classes/quantization#offload-between-cpu-and-gpu for more details.
Docker image I used:
quay.io/jupyter/pytorch-notebook:cuda12-pytorch-2.3.0
Dependency I used:
pip install "unsloth[cu121-ampere-torch230] @ git+https://github.com/unslothai/unsloth.git"
Any help or advise will be helpful. Thanks!
When I run:
I got: