Repository navigation
Jupyter and Colab
The supplied LLM_DDP_Parallel_Training.ipynb is a self-contained notebook. It writes llm_ddp_parallel_training.py and a requirements file to its working directory, checks hardware availability, and launches training through subprocess calls.
- Open the
.ipynbin JupyterLab, VS Code, Colab or Kaggle. - Run setup / inspection cells. Install missing dependencies in a separate notebook cell using
%pip install -r requirements.txtif needed. - Execute the
%%writefilecell to create the Python CLI script. - Run the single CPU or two CPU processes through
subprocess.runin the provided cells. - Enable Qwen training only after confirming available CUDA devices and package compatibility.
The separate-process approach avoids common notebook issues with torchrun and IPython argparse injection.
Important: The notebook writes files to the current working directory. If you run it in a clone of this repository, ensure you do not unintentionally overwrite work-in-progress source changes. The notebook's two-CPU demonstration works without a second GPU; standard Colab sessions may only expose one GPU.
Distributed LLM Training · PyTorch DDP (educational) — Home · System-Architecture · Low-Level-Design · Publishing-the-Wiki
This project is licensed under the Apache License, Version 2.0.© 2026 Sudhanshu Shukla · Licensed under the Apache License, Version 2.0.