Repository navigation
Configuration
Sudhanshu edited this page Nov 11, 2026
·
1 revision
| Flag | Default | Description |
|---|---|---|
--model |
tiny |
tiny (from scratch) or qwen (pretrained LoRA) |
--cpu |
false | Force CPU training |
--corpus-file |
built-in examples | Path to UTF-8, one example per line |
--batch-size |
2 |
Per-rank batch size |
--seq-len |
64 |
Maximum sequence length (at least 4) |
--epochs |
1 |
Number of full training epochs |
--max-steps |
4 |
Maximum optimizer steps per rank per epoch; 0 means all batches |
--lr |
tiny 3e-4, Qwen 2e-4
|
Optional learning-rate override |
--repeat |
4 |
Corpus repetition multiplier |
--save-dir |
ddp_example_output |
Folder for resulting artifacts |
Distributed environment variables normally supplied by torchrun: WORLD_SIZE, RANK, and LOCAL_RANK. Use --standalone --nproc_per_node=N for a local single-node demonstration.
Not implemented: gradient accumulation, an LR scheduler, mixed-precision autocast configuration, DeepSpeed, model-parallel tensor partitioning, or evaluation flags.
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.