-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
add tqdm when loading checkpoint shards #6569
add tqdm when loading checkpoint shards #6569
Conversation
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge). To run full CI, you can do one of these:
🚀 |
@youkaichao @WoosukKwon Can you help see if can add this function? |
I think this is a good idea. Two things to note:
|
thank you for your reply
|
code in this pr is too hacky to maintain in the future. I suggest just add |
The changes were made as you suggested |
hf_weights_files = tqdm(hf_weights_files,desc="Loading safetensors checkpoint shards") | ||
for st_file in hf_weights_files: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the common practice would be:
for st_file in tqdm(hf_weights_files, desc="Loading safetensors checkpoint shards"):
please check https://github.com/vllm-project/vllm/blob/main/CONTRIBUTING.md for how to format the code locally. |
@zhaotyer I pushed to this branch so that it can be merged quickly. thanks for your initial contribution! |
this should help people understand the weight loading time, avoid users thinking vLLM hangs, just like #6636 . |
locally tested, it works. |
ok.thx |
Co-authored-by: tianyi.zhao <tianyi.zhao@transwarp.io> Co-authored-by: youkaichao <youkaichao@126.com>
Co-authored-by: tianyi.zhao <tianyi.zhao@transwarp.io> Co-authored-by: youkaichao <youkaichao@126.com>
Co-authored-by: tianyi.zhao <tianyi.zhao@transwarp.io> Co-authored-by: youkaichao <youkaichao@126.com>
Co-authored-by: tianyi.zhao <tianyi.zhao@transwarp.io> Co-authored-by: youkaichao <youkaichao@126.com>
Co-authored-by: tianyi.zhao <tianyi.zhao@transwarp.io> Co-authored-by: youkaichao <youkaichao@126.com> Signed-off-by: Alvant <alvasian@yandex.ru>
Co-authored-by: tianyi.zhao <tianyi.zhao@transwarp.io> Co-authored-by: youkaichao <youkaichao@126.com>
When we load a model with relatively large parameters, it takes a long time due to IO limitations, but we cannot see the model loading progress.In addition, sometimes some weight files of the model are missing, but vllm can still load successfully, but the answers will be garbled, so I added tqdm to display the current weight loading progress.