huggingface / local-gemma

Gemma 2 optimized for your local machine.
Apache License 2.0
329 stars 28 forks source link

unable to use memory_extreme #24

Closed egollhofer closed 2 months ago

egollhofer commented 3 months ago

When running the sample code with memory_extreme the following error is thrown:

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 setload_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.

gante commented 3 months ago

Hi @egollhofer 👋

Would you be able to share some information about your hardware, so I may attempt to reproduce (and fix) the issue? 🤗