NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
DLRM for TensorFlow2
Resource
NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
DLRM for TensorFlow2

The Deep Learning Recommendation Model (DLRM) is a recommendation model designed to make use of both categorical and numerical inputs.

The performance measurements in this document were conducted at the time of publication and may not reflect the performance achieved from NVIDIA's latest software release. For the most up-to-date performance measurements, go to NVIDIA Data Center Deep Learning Product Performance.

Benchmarking

The following section shows how to run benchmarks measuring the model performance in training and inference modes.

Training performance benchmark

To benchmark the training performance on a specific batch size, follow the instructions in the Quick Start Guide. You can also add the --max_steps 1000 if you want to get a reliable throughput measurement without running the entire training.

You can also use synthetic data by running with the --dataset_type synthetic option if you haven't downloaded the dataset yet.

Inference performance benchmark

To benchmark the inference performance on a specific batch size, run:

horovodrun -np 1 -H localhost:1 --mpi-args=--oversubscribe numactl --interleave=all -- python -u main.py --dataset_path /data/dlrm/ --amp --restore_checkpoint_path <checkpoint_path> --mode inference

Results

The following sections provide details on how we achieved our performance and accuracy in training and inference.

We used three model size variants to show memory scalability in multi-GPU setup:

NameDatasetNumber of parametersModel size
smallCriteo 1TB, FL=154.2B15.6 GiB
largeCriteo 1TB, FL=322.8B84.9 GiB
extra largeCriteo 1TB, FL=0113B421 GiB

Training accuracy results

Training accuracy: NVIDIA DGX A100 (8x A100 80GB)

Our results were obtained by running training scripts as described in the Quick Start Guide in the DLRM Docker container.

GPUsModel sizeBatch size / GPUAccuracy (AUC) - TF32Accuracy (AUC) - mixed precisionTime to train - TF32 [minutes]Time to train - mixed precision [minutes]Time to train speedup (TF32 to mixed precision)
1small64k0.80250.802526.7516.271.64
8large8k0.80270.80268.776.571.33
8extra large8k0.80260.802610.479.081.15
Training accuracy: NVIDIA DGX-1 (8x V100 32GB)

Our results were obtained by running training scripts as described in the Quick Start Guide in the DLRM Docker container.

GPUsModel sizeBatch size / GPUAccuracy (AUC) - FP32Accuracy (AUC) - mixed precisionTime to train - FP32 [minutes]Time to train - mixed precision [minutes]Time to train speedup (FP32 to mixed precision)
1small64k0.80270.8025109.6334.833.15
8large8k0.80280.802626.0113.731.89
Training accuracy: NVIDIA DGX-2 (16x V100 32GB)

Our results were obtained by running training scripts as described in the Quick Start Guide in the DLRM Docker container.

GPUsModel sizeBatch size / GPUAccuracy (AUC) - FP32Accuracy (AUC) - mixed precisionTime to train - FP32 [minutes]Time to train - mixed precision [minutes]Time to train speedup (FP32 to mixed precision)
1small64k0.80260.8026105.1333.373.15
8large8k0.80270.802721.2111.431.86
16large4k0.80250.802615.5210.881.43
Training stability test

The histograms below show the distribution of ROC AUC results achieved at the end of the training for each precision/hardware platform tested. There are no statistically significant differences between precision, number of GPUs or hardware platform. Using the larger dataset has a modest, positive impact on final AUC score.


Figure 4. Results of stability tests for DLRM.

Training performance results

We used throughput in items processed per second as the performance metric.

Training performance: NVIDIA DGX A100 (8x A100 80GB)

Our results were obtained by following the commands from the Quick Start Guide in the DLRM Docker container on NVIDIA DGX A100 (8x A100 80GB) GPUs. Performance numbers (in items per second) were averaged over 1000 training steps.

GPUsModel sizeBatch size / GPUThroughput - TF32Throughput - mixed precisionThroughput speedup (TF32 to mixed precision)
1small64k2.68M4.47M1.67
8large8k9.39M13.31M1.42
8extra large8k9.93M12.1M1.22

To achieve these results, follow the steps in the Quick Start Guide.

Training performance: comparison with CPU for the "extra large" model

For the "extra large" model (113B parameters) we also obtained CPU results for comparison using the same source code (using the --cpu command line flag for the CPU-only experiments).

We compare three hardware setups:

  • CPU only,
  • a single GPU that uses CPU memory for the largest embedding tables,
  • Hybrid-Parallel using the full DGX A100-80GB
HardwareThroughput [samples / second]Speedup over CPU
2xAMD EPYC 774217.7k1x
1xA100-80GB + 2xAMD EPYC 7742 (large embeddings on CPU)768k43x
DGX A100 (8xA100-80GB) (hybrid parallel)12.1M683x
Training performance: NVIDIA DGX-1 (8x V100 32GB)
GPUsModel sizeBatch size / GPUThroughput - FP32Throughput - mixed precisionThroughput speedup (FP32 to mixed precision)
1small64k0.648M2.06M3.18
8large8k2.9M5.89M2.03

To achieve the same results, follow the steps in the Quick Start Guide.

Training performance: NVIDIA DGX-2 (16x V100 32GB)
GPUsModel sizeBatch size / GPUThroughput - FP32Throughput - mixed precisionThroughput speedup (FP32 to mixed precision)
1small64k0.675M2.16M3.2
8large8k3.75M7.72M2.06
16large4k5.74M9.39M1.64

To achieve the same results, follow the steps in the Quick Start Guide.

Inference performance results

Inference performance: NVIDIA DGX A100 (8x A100 80GB)
GPUsModel sizeBatch size / GPUThroughput - TF32Throughput - mixed precisionAverage latency - TF32 [ms]Average latency - mixed precision [ms]Throughput speedup (mixed precision to TF32)
1small20481.43M1.54M1.481.331.08
Inference performance: NVIDIA DGX1V-32GB (8x V100 32GB)
GPUsModel sizeBatch size / GPUThroughput - FP32Throughput - mixed precisionAverage latency - FP32 [ms]Average latency - mixed precision [ms]Throughput speedup (mixed precision to FP32)
1small20480.765M1.05M2.901.951.37
Inference performance: NVIDIA DGX2 (16x V100 16GB)
GPUsModel sizeBatch size / GPUThroughput - FP32Throughput - mixed precisionAverage latency - FP32 [ms]Average latency - mixed precision [ms]Throughput speedup (mixed precision to FP32)
1small20481.03M1.37M2.101.631.53