-
Notifications
You must be signed in to change notification settings - Fork 9.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
common : fix parallel shard download interleaving output #6831
base: master
Are you sure you want to change the base?
common : fix parallel shard download interleaving output #6831
Conversation
Well, I would prefer to properly implement a global progress callback rather than completely remove progression. |
@phymbert implemented a global progress callback and updated the PR description! |
double received_bytes; | ||
}; | ||
|
||
std::map<std::string, shard_file_progress> progress_table; |
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.
It must be done without global variables.
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.
Is it something easily possible you think @TevinWang ?
@TevinWang do you need help on the global variable issue ? @ggerganov do you confirm the issue with the proposed approach? IMHO this contribution is valuable as the console output is currently hard to read |
Yes, the globals should be avoided |
Motivation
Currently when downloading model shards, the progress output shown is interleaved, which is difficult to interpret. To fix this, we case on whether the download is a shard, and create a global table that stores the progress information for each model shard. We continuously update a progress bar for each of the shards in
llama_load_model_from_url
until all downloads are complete.Closes #6537
Changes
llama_download_file
to indicate whether a download is a shardprogressTable
global to store progress informationBefore and after:
Testing:
Tested using the following command on CPU: