NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
VAE for TensorFlow1
Resource
NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
VAE for TensorFlow1

The Variational Autoencoder for collaborative filtering focuses on providing recommendations. This is an optimized implementation.

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, run:

mpirun --bind-to numa --allow-run-as-root -np 8 -H localhost:8 python main.py  --train [--amp]

Inference performance benchmark

To benchmark the inference performance, run:

python main.py --inference_benchmark [--amp]

Results

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

Training accuracy results

All training performance results were obtained by running:

mpirun --bind-to numa --allow-run-as-root -np <gpus> -H localhost:8 python main.py  --train [--amp]

in the TensorFlow 20.06 NGC container.

Training accuracy: NVIDIA DGX A100 (8x A100 40GB)
GPUsBatch size / GPUAccuracy - TF32Accuracy - mixed precisionTime to train - TF32 [s]Time to train - mixed precision [s]Time to train speedup (TF32 to mixed precision)
124,5760.4302980.430398112.8109.41.03
83,0720.4308970.43035325.930.40.85
Training accuracy: NVIDIA DGX-1 (8x V100 32GB)
GPUsBatch size / GPUAccuracy - FP32Accuracy - mixed precisionTime to train - FP32 [s]Time to train - mixed precision [s]Time to train speedup (FP32 to mixed precision)
124,5760.4305920.430525346.5186.51.86
83,0720.4307530.43120259.142.21.40

Training performance results

Performance numbers below show throughput in users processed per second. They were averaged over an entire training run.

Training performance: NVIDIA DGX A100 (8x A100 40GB)
GPUsBatch size / GPUThroughput - TF32Throughput - mixed precisionThroughput speedup (TF32 - mixed precision)Strong scaling - TF32Strong scaling - mixed precision
124,576354,032365,4741.0311
83,0721,660,7001,409,7700.854.693.86
Training performance: NVIDIA DGX-1 (8x V100 32GB)
GPUsBatch size / GPUThroughput - FP32Throughput - mixed precisionThroughput speedup (FP32 - mixed precision)Strong scaling - FP32Strong scaling - mixed precision
124,576114,125213,2831.8711
83,072697,6281,001,2101.446.114.69

Inference performance results

Our results were obtained by running:

python main.py  --inference_benchmark [--amp]

in the TensorFlow 20.06 NGC container.

We use users processed per second as a throughput metric for measuring inference performance. All latency numbers are in seconds.

Inference performance: NVIDIA DGX A100 (1x A100 40GB)

TF32

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
111810.0008470.0008630.0008710.000901

FP16

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
112150.0008230.0008580.0008640.000877
Inference performance: NVIDIA DGX-1 (1x V100 16GB)

FP32

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
17180.0013920.0014430.0014580.001499

FP16

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
17070.0014130.0015110.0015430.001622