We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6900bee commit cf18a1eCopy full SHA for cf18a1e
examples/llama/convert_nanotron_to_hf.py
@@ -173,3 +173,7 @@ def check_converted_model_generation(save_path: Path):
173
# Check if the conversion was successful by generating some text.
174
if args.check_conversion:
175
check_converted_model_generation(save_path=args.save_path)
176
+
177
+ # Destroy process group at the end if torch.distributed is initialized
178
+ if torch.distributed.is_available() and torch.distributed.is_initialized():
179
+ torch.distributed.destroy_process_group()
0 commit comments