Skip to content

Commit 289a0ff

Browse files
committed
update readme
1 parent ec6f5a8 commit 289a0ff

File tree

1 file changed

+9
-1
lines changed
  • examples/pytorch/custom_handler_fp8_fsdp1n2_compile

1 file changed

+9
-1
lines changed

examples/pytorch/custom_handler_fp8_fsdp1n2_compile/README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,21 @@ sh setup.sh
1515
In this example we present
1616

1717
```bash
18+
# # config the PYTHONPATH if needed
19+
# export PYTHONPATH=/teamspace/studios/this_studio/pytorch-lightning/examples/pytorch/custom_handler_fp8_fsdp1n2_compile:$PYTHONPATH
20+
cd pytorch-lightning/examples/pytorch/custom_handler_fp8_fsdp1n2_compile
21+
22+
# fsdp1 + fp8 + torch compile + gradient checkpointing + cpu offloading
23+
python train.py --enable_fp8 --enable_torch_compile --enable_gradient_checkpointing --enable_cpu_offload
1824

25+
# fsdp2 + fp8 + torch compile + gradient checkpointing (the example does not implement fsdp2 cpu offloading currently)
26+
python train.py --enable_fsdp2 --enable_fp8 --enable_torch_compile --enable_gradient_checkpointing
1927
```
2028

2129
## Test the handlers
2230

2331
```bash
24-
# config the PYTHONPATH if needed
32+
# # config the PYTHONPATH if needed
2533
# export PYTHONPATH=/teamspace/studios/this_studio/pytorch-lightning/examples/pytorch/custom_handler_fp8_fsdp1n2_compile:$PYTHONPATH
2634
cd pytorch-lightning/examples/pytorch/custom_handler_fp8_fsdp1n2_compile
2735
pytest tests/*

0 commit comments

Comments
 (0)