Skip to content

Commit 8c5eeac

Browse files
Update torchtitan benchmarking script (#2088)
* rename benchmark script * update config path
1 parent 0045d88 commit 8c5eeac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

benchmarks/float8/training/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Float8 training benchmarking
22

3-
The `float8_training_benchmark.sh` script in this directory can be used to launch a Llama3 8b training run with [torchtitan](https://github.com/pytorch/torchtitan) training run, and parse the logs to calculate the median tokens/sec and peak memory usage for you.
3+
The `torchtitan_benchmark.sh` script in this directory can be used to launch a Llama3 8b training run with [torchtitan](https://github.com/pytorch/torchtitan) training run, and parse the logs to calculate the median tokens/sec and peak memory usage for you.
44

55
## Usage
66

7-
Example: `TORCHTITAN_ROOT=${HOME}/torchtitan FLOAT8_RECIPE_WITH_BEST_SETTINGS=rowwise ./float8_training_benchmark.sh`
7+
Example: `TORCHTITAN_ROOT=${HOME}/torchtitan FLOAT8_RECIPE_WITH_BEST_SETTINGS=rowwise ./torchtitan_benchmark.sh`
88

99
Training parameters can be configured via environment variables.
1010

1111
- Required:
1212
- `TORCHTITAN_ROOT`: Root directory of torchtitan in your local filesystem
1313
- Optional:
14-
- `FLOAT8_RECIPE_WITH_BEST_SETTINGS`: "rowwise" or "tensorwise". Applies float8 training with the specified scaling recipe, as well as additional training configs which are optimal for that scaling recipe. See `float8_training_benchmark.sh` for more details.
14+
- `FLOAT8_RECIPE_WITH_BEST_SETTINGS`: "rowwise" or "tensorwise". Applies float8 training with the specified scaling recipe, as well as additional training configs which are optimal for that scaling recipe. See `torchtitan_benchmark.sh` for more details.
1515
- `BATCH_SIZE`: Defaults to 1.
1616
- `STEPS`: Defaults to 100.
1717
- `EXTRA_ARGS`: Extra arguments to pass to torchtitan training script. See [torchtitan](https://github.com/pytorch/torchtitan) docs for the full list of options.

benchmarks/float8/training/float8_training_benchmark.sh renamed to benchmarks/float8/training/torchtitan_benchmark.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ cd ${TORCHTITAN_ROOT}
4545
echo "float8 args: ${FLOAT8_ARGS}"
4646

4747
# run the command with the specified arguments
48-
CONFIG_FILE="./torchtitan/models/llama/train_configs/llama3_8b.toml" ${TORCHTITAN_ROOT}/run_train.sh --training.steps=${STEPS} --training.batch_size=${BATCH_SIZE} --training.compile ${FLOAT8_ARGS} ${EXTRA_ARGS} 2>&1 | tee ${LOG_FILE}
48+
CONFIG_FILE="./torchtitan/models/llama3/train_configs/llama3_8b.toml" ${TORCHTITAN_ROOT}/run_train.sh --training.steps=${STEPS} --training.batch_size=${BATCH_SIZE} --training.compile ${FLOAT8_ARGS} ${EXTRA_ARGS} 2>&1 | tee ${LOG_FILE}
4949

5050
# return to original working directory
5151
cd $original_dir

0 commit comments

Comments
 (0)