-
Notifications
You must be signed in to change notification settings - Fork 974
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 progress bar for weight loading #1534
Conversation
but why have 5 progress bars? i'd prefer a single bar that measures ALL the progress but maybe prints a message saying what stage it's at (if needed). it's like gettting 10 progress bars to start a laptop just because the laptop is doing 10 things under the hood. |
The problem is that we have We can maybe just have a progress bar over the |
Ok figured out an efficient way to do a global progress bar. Tests are failing because of a change in EleutherAI's GPTNeoX model in an external repo that we test against. Will investigate and fix in a separate PR and then revisit this. |
Maybe we could just retrieve the number of layers from the config file, monitor when the conversion script started working on another layer and use this as a signal to update the progress bar? |
There's now one global progress bar for all files and weights that are being loaded:
|
else: | ||
# Handling files without progress bar in debug mode | ||
for bin_file in sorted(bin_files): | ||
current_file_size = os.path.getsize(bin_file) |
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.
This line can be deleted. You don't use current_file_size
later on.
Previously, when someone downloaded a new model via CLI
or
it was very verbose when loading the model weights (which is useful for debugging):
This PR changes the default behavior to show progress bars instead:
The old behavior can still be used via
litgpt download microsoft/phi-2 --verbose true
CC @williamFalcon