Open Urammar opened 5 months ago
The error is found and fixed in \installer_files\env\Lib\site-packages\accelerate\utils\modeling.py
Line 128
if mem_size <= 0:
raise ValueError(err_msg)
return mem_size
For multi-GPU this should be
if mem_size < 0:
raise ValueError(err_msg)
return mem_size
This fix is not entirely correct, as it permits setting 0 to all fields, which would attempt to load a model with no memory allocated at all, with no error message. As a temporary fix, however, it would permit multi-gpu setups to load models in transformers at all, so i'll take the janky win.
But this behavior needs to be updated to check for multi-gpus and only complain if no vram is set across all detected cards.
Describe the bug
This is a reproduction of #4193 This was never adequately fixed, or has regressed, it appears.
Is there an existing issue for this?
Reproduction
As above
Screenshot
No response
Logs
System Info