Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 33 additions & 15 deletions docs/60_mlperf/mlperf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ MLPerf submission rather than from El Capitan. See :ref:`mlperf-reference-result
Problem
*********

The benchmark continues pretraining of Llama 3.1 405B from Meta's BF16 checkpoint on the
C4 dataset until the validation log perplexity reaches the quality target. The model
The benchmark continues pretraining of Llama 3.1 405B from the MLCommons-distributed
BF16 benchmark checkpoint on the C4 dataset until the validation log perplexity reaches
the quality target. The model
follows the `Llama 3.1 paper <https://arxiv.org/abs/2407.21783>`__ except that it uses the
Mixtral 8x22B tokenizer instead of the paper's TikToken-based tokenizer.

Expand Down Expand Up @@ -87,7 +88,8 @@ Mixtral 8x22B tokenizer instead of the paper's TikToken-based tokenizer.
- First 5,760 sequences (47,185,920 tokens) of a fixed, unshuffled subset of the
C4 validation split
- - Starting point
- Meta Llama 3.1 405B BF16 checkpoint, converted to NeMo format
- MLCommons-distributed NeMo-format conversion of Meta's Llama 3.1 405B BF16
checkpoint for MLPerf Training v6.0
(``opt_init_checkpoint_step`` = 0)
- - Quality metric
- Validation log perplexity
Expand All @@ -97,9 +99,16 @@ Mixtral 8x22B tokenizer instead of the paper's TikToken-based tokenizer.
- Every 18,432 sequences. The first ``FLOOR(0.0026 * global_batch_size + 12)``
evaluations are skipped.

The pretokenized dataset, tokenizer, and checkpoint are distributed by MLCommons. The
checkpoint is available only to MLCommons members; see `Checkpoint download
<https://github.com/mlcommons/training/tree/master/retired_benchmarks/large_language_model_pretraining/nemo#checkpoint-download>`__.
All vendors must use the same starting checkpoint: the MLCommons-distributed
Llama 3.1 405B BF16 benchmark initialization for MLPerf Training v6.0, with the
prescribed Mixtral 8x22B tokenizer. Framework conversion or resharding must preserve
this prescribed initialization.

The pretokenized dataset, tokenizer, and checkpoint are distributed by MLCommons.
The checkpoint is available only to MLCommons members through the
`MLCommons checkpoint access portal <https://llama3-1.mlcommons.org>`__.
See the `v6.0 checkpoint download instructions
<https://github.com/mlcommons/training/tree/a70765e9885ec1cba8e69a842ecfbdea750336c4/large_language_model_pretraining/nemo#checkpoint-download>`__.

*****************
Figure of Merit
Expand All @@ -109,8 +118,11 @@ The figure of merit (FOM) is the MLPerf Training score: the wall-clock time, in
to train the model to the quality target. Lower is better. Scoring follows the MLPerf
Training v6.0 rules:

* Each benchmark result needs at least three runs. With three runs, the score is the
median run time (the olympic mean of three runs).
* Each benchmark result needs at least three independent runs. The scoring run set is
aggregated using the Olympic mean: drop the fastest and slowest results, then take
the mean of the remaining times. With three runs, this is the median run time.
Additional runs must follow the v6.0 rules for scoring-set selection and failed runs;
taking the median of all collected runs is not the general scoring rule.
* Convergence is compared with the reference convergence points (RCPs) for the global
batch size used. A result that converges faster than the RCP mean, but within the
allowed statistical range, has its score normalized to the RCP mean. A result that
Expand Down Expand Up @@ -192,7 +204,8 @@ must reproduce the same data, model, and hyperparameters.
#. Download the pretokenized C4 dataset and tokenizer with ``data_scripts/download.sh``.
Allow at least 2.5 TB of storage.

#. Download the NeMo-formatted Llama 3.1 405B checkpoint (more than 1.5 TB).
#. Download the MLCommons-distributed v6.0 NeMo-format starting checkpoint described
under `Problem`_ (more than 1.5 TB).

#. Select a configuration and submit the job. The NVIDIA flow sources a configuration
file and submits ``run.sub`` with Slurm. This example reproduces the reference
Expand Down Expand Up @@ -291,10 +304,14 @@ A run is valid if:
**************

The model state is large compared with accelerator memory, so memory capacity sets the
minimum size of a model replica. At about 16 to 18 bytes per parameter for BF16 weights,
FP32 gradients, FP32 master weights, and AdamW moments, the weights and optimizer state
take about 6.5 to 7.3 TB before activations. This is an estimate, not a measurement. A
distributed optimizer can also shard the optimizer state across data-parallel replicas.
minimum size of a model replica. BF16 weights (2 bytes), FP32 gradients (4 bytes), FP32
master weights (4 bytes), and two FP32 AdamW moments (8 bytes) total 18 bytes per
parameter, or about 7.3 TB for 405 billion parameters. Using BF16 gradients instead
reduces this layout to 16 bytes per parameter, or about 6.5 TB. These are unsharded
model-state estimates in decimal TB, not measured peak memory; activations, temporary
buffers, and allocator reserve require additional capacity. A distributed optimizer
can shard optimizer state across data-parallel replicas. Actual memory use depends on
the implementation's tensor storage and sharding groups.
Activation memory grows with the sequence length (8,192) and the micro-batch size, and
is reduced by context parallelism and activation recomputation.

Expand Down Expand Up @@ -387,8 +404,9 @@ checkpoint, took 8.5 to 8.7 minutes per run and is not part of the score.
*************************

Project the MLPerf Training score (time to train, in minutes) of Llama 3.1 405B on the
proposed system, following the closed-division rules. Report the score as the median of
at least three runs.
proposed system, following the closed-division rules. Report the score from at least
three independent runs using the v6.0 run-set selection, Olympic-mean aggregation, and
RCP normalization rules described in `Figure of Merit`_.

.. _mlperf-required-parameters:

Expand Down
Loading