-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
`load_in_8bit_fp32_cpu_offload=True #39
Comments
48GPU ram should be enough for the demo without the 8bit. Can you set the low_resource to False in eval_configs/minigpt4_eval.yaml and check whether you still have this issue? |
I have followed the code given in the huggingface docs:
Getting this error
|
try this: model = AutoModelForCausalLM.from_pretrained("AlekseyKorshuk/vicuna-7b",device_map=device_map, quantization_config=quantization_config) |
i solve that error like this you can do it same for your model Load model and tokenizerquantization_config = BitsAndBytesConfig(load_in_8bit_fp32_cpu_offload=True) model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1", quantization_config=quantization_config) tokenizer = AutoTokenizer.from_pretrained("mirajbhandari/mistral-7b-chat-finetune") |
Any idea how to solve this:
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=True
and pass a customdevice_map
tofrom_pretrained
. Checkhttps://huggingface.co/docs/transformers/main/en/main_classes/quantization#offload-between-cpu-and-gpu
for more details.
I have 48gb of vram the GPU RAM must be enough!
The text was updated successfully, but these errors were encountered: