*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 4104507d authored by Pfister, Martin's avatar Pfister, Martin
Browse files

Correct saving with FSDP

parent b2d7cf00
No related branches found
No related tags found
No related merge requests found
......@@ -120,6 +120,8 @@ if local_process_index == 0:
# Save model in first process only:
if process_index == 0:
if trainer.is_fsdp_enabled:
trainer.accelerator.state.fsdp_plugin.set_state_dict_type("FULL_STATE_DICT")
trainer.save_model()
# trainer.push_to_hub()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment