(model)
| 703 | |
| 704 | # Function for unwrapping if model was compiled with `torch.compile`. |
| 705 | def unwrap_model(model): |
| 706 | model = accelerator.unwrap_model(model) |
| 707 | model = model._orig_mod if is_compiled_module(model) else model |
| 708 | return model |
| 709 | |
| 710 | # Train! |
| 711 | total_batch_size = args.train_batch_size * accelerator.num_processes * args.gradient_accumulation_steps |
no outgoing calls
no test coverage detected