Skip to content

Commit c07da88

Browse files
committed
README
Signed-off-by: Malay Nagda <malayn@nvidia.com>
1 parent 3e892cf commit c07da88

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

scripts/llm/performance/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Performance Recipes
2+
3+
- Scripts defined in `scripts/llm/performance` are recipes optimized for performance. These scripts can launch pre-training experiments on Slurm based clusters.
4+
- You will need a virtual environemnt with NeMo and Nemo-Run related dependencies installed as the experiment configuration is resolved before launching it inside NeMo container.
5+
6+
## Example
7+
8+
The following line shows an example of how you can launch a pre-training experiment-
9+
10+
`python3 scripts/llm/performance/llama3_8b.py --account <your_slurm_account> -partition <your_slurm_partition>`
11+
12+
## Configuration Options
13+
14+
- Slurm account and partition are mandatory arguments for launching the experiment.
15+
- You can use the following optional arguments as needed-
16+
- -l/--log_dir: Location to store your experiment artifacts and logs.
17+
- Make sure the environemnt variable `NEMORUN_HOME=<log_dir>` is accessible and set correctly in your virtual environment.
18+
- You can run `export NEMORUN_HOME=<log_dir>` in your terminal. You can add it your bashrc file (or equivalent for your OS/Linux distro) for setting it permanently.
19+
- -t/--time_limit: Maximum time limit for your experiment. Your slurm job will be cancelled after this. Default is 30 minutes.
20+
- -i/--container_image: The NeMo container you want to use. Defaults to latest dev container- 'nvcr.io/nvidia/nemo:dev'.
21+
- -c/--compute_dtype: Specifies whether you want to use bf16 or fp8 precision for training. Defaults to 'bf16'. You can choose to use 'fp8'.
22+
- -ep/--enable_profiling: Enable nsys profiling. It is disabled by default. When enabled, profiling will be enabled for 1 step from step 5 to step 6. You can change the step in the respective recipe script.
23+
- -tb/--tensorboard: Enable tensorboard logging. It is disabled by default.
24+
- CAUTION: Tensorboard logging may cause performance overhead.
25+
- -d/--dryrun: Using this argument will not launch the experiment. It will simply print the sbatch script to stdout. This can be helpful to verify you have set your experiment correctly as needed.
26+
- You don't need to set any value for `--enable_profiling`, `--tensorboard` and `--dryrun`. See the below example for reference-
27+
`python3 scripts/llm/performance/llama3_8b.py --account <your_slurm_account> -p <your_slurm_partition> -ep --tensorboard -d`

0 commit comments

Comments
 (0)