-
Notifications
You must be signed in to change notification settings - Fork 25.8k
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
Extremely slow model loading for BNB 4bit saved weights #29810
Comments
My bad, was actually a WSL2 bug...microsoft/WSL#4197 |
But as suggested by https://www.reddit.com/r/bashonubuntuonwindows/comments/li9c7k/has_anyone_been_able_to_fix_the_delay_with_wsl/, maybe HF was querying git status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System Info
transformers
version: 4.39.0Who can help?
@SunMarc @ArthurZucker
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
I am converting the original llava1.6 mistral 7b into BNB 4 bit saved model by inserting
model.save_pretrained()
at https://github.com/haotian-liu/LLaVA/blob/7440ec9ee37b0374c6b5548818e89878e38f3353/llava/model/builder.py#L114The saved model is mere 4.6GB: https://huggingface.co/panoyo9829/llava-v1.6-mistral-7b-bnb-4bit
However, it takes a good 77.8 seconds on a AMD 5800X (8core16 thread) to load it. It takes 9.2seconds on a 80 core Intel Xeon CPU to load. This seems too slow. I am on a NVMe SSD but I see close to 0% disk IO.
Expected behavior
When loading fp16 models, it take less than 30 seconds and disk IO is very much occupied, while when loading a BNB 4bit model, i see almost 0 disk IO.
Something related to loading BNB model must have been affecting it a lot.
Possible regression from #26037
I am fully aware that HF now supports llava-next natively and I have yet to try saving bnb 4bit weights from the hf converted weights, but my point is this is not related to the model itself since fp16 loads fine.
The text was updated successfully, but these errors were encountered: