We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, how can we save intermediate checkpoints with your code?
We add the following code. However, it does not work.
if completed_steps+1%32==0: if accelerator.is_main_process: accelerator.print(f"Saving model to {args.output_dir}") unwrapped_model = accelerator.unwrap_model(model) state_dict = accelerator.get_state_dict(model) print(completed_steps+1) unwrapped_model.save_pretrained( f"{args.output_dir}_{completed_steps}", is_main_process=accelerator.is_main_process, save_function=accelerator.save, state_dict=state_dict, ) accelerator.wait_for_everyone()
We find that the program keeps getting stuck at the step state_dict = accelerator.get_state_dict(unwrapped_model).
state_dict = accelerator.get_state_dict(unwrapped_model)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, how can we save intermediate checkpoints with your code?
We add the following code. However, it does not work.
We find that the program keeps getting stuck at the step
state_dict = accelerator.get_state_dict(unwrapped_model)
.The text was updated successfully, but these errors were encountered: