nemo_automodel.components.training.benchmark_summary
nemo_automodel.components.training.benchmark_summary
End-of-run summary of a training recipe run as its performance benchmark.
benchmark: true (or --benchmark) runs a training recipe as its performance benchmark. Its summary averages
the optimizer steps after ci.perf_testing.warmup_steps the way Core Models averages a performance run and the
legacy benchmarking recipe averaged its timed iterations: the tokens of those steps over their time, and MFU
weighted by step time. A step’s time is its token count over its tokens per second, two fields of its step line.
Module Contents
Classes
Functions
Data
API
Steady-state throughput of a benchmark run, over the steps after its warmup.
Add one optimizer step. A step without tokens has no time and is left out.
Parameters:
The step number of its step line.
Tokens of the step (num_tokens_per_step), the numerator of its tokens per second.
Global tokens per second of the step (tps).
MFU of the step in percent, or None when the model has no FLOPs formula.
Log the summary, and write it as JSON when the config names a path. Call it on one rank.
Parameters:
Number of GPUs.
Returns: dict[str, Any]
The summary, as summarize returns it.
Average the steps after the warmup, under the field names of the legacy benchmark summary.
Parameters:
Number of GPUs. The per-GPU throughput divides by it, as the step line does.
Returns: dict[str, Any]
total_steps, warmup_steps, training_steps, first_training_step,
Typed view over the summary of a benchmark run.
The run’s global batch size, reported next to the averages.
Where the summary is also written as JSON (ci.perf_testing.json_output_path), or
None for the log line alone.
The run’s local batch size, reported next to the averages.
Leading optimizer steps that the averages leave out (ci.perf_testing.warmup_steps).
An empty summary that the training loop records its steps into.
The log line of a summary from BenchmarkSummary.summarize.
Parameters:
The summary to print.
Returns: str
benchmark summary: <n> steps after <w> warmup steps | avg step time <s> s | tps <x>(<y>/gpu) | mfu <z>,
Write a summary as JSON, creating the parent directory.
Parameters:
The summary to write.
The JSON file.
Returns: Path
The path written.