NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
QuartzNet for PyTorch
Resource
NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
QuartzNet for PyTorch

End-to-end neural acoustic model for automatic speech recognition providing high accuracy at a low memory footprint.

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 with a number of specific configurations, run:

GRAD_ACC_SEQ=<SEQUENCE> NUM_GPUS_SEQ=<NUMS_OF_GPUS> bash scripts/train_benchmark.sh

for example:

GRAD_ACC_SEQ="12 24" NUM_GPUS_SEQ="4 8" bash scripts/train_benchmark.sh

This invocation will measure performance in four setups (two different batch sizes for every single forward/backward pass times two hardware setups).

By default, this script makes forward/backward pre-allocation passes with all possible audio lengths enabling immediate stabilization of training step times in the cuDNN benchmark mode, and trains for two epochs on the train-clean-100 subset of LibriSpeech.

Inference performance benchmark

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

BATCH_SIZE_SEQ=<BATCH_SIZES> MAX_DURATION_SEQ=<DURATIONS> bash scripts/inference_benchmark.sh

for example:

BATCH_SIZE_SEQ="24 48" MAX_DURATION_SEQ="2 7 16.7" bash scripts/inference_benchmark.sh

The script runs on a single GPU and evaluates on the dataset of fixed-length utterances shorter than MAX_DURATION and padded to that duration.

Results

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

Training accuracy results

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

Our results were obtained by running the scripts/train.sh training script in the PyTorch 21.07-py3 NGC container on NVIDIA DGX A100 (8x A100 80GB) GPUs.

Number of GPUsBatch size per GPUPrecisiondev-clean WERdev-other WERtest-clean WERtest-other WERTime to train
8144mixed3.4710.843.6910.6934 h

The table reports word error rate (WER) of the acoustic model with greedy decoding on all LibriSpeech dev and test datasets for mixed precision training.

Training stability test

The following table compares greedy decoding word error rates across 8 different training runs with different seeds for mixed precision training.

DGX A100 80GB, FP16, 8x GPUSeed #1Seed #2Seed #3Seed #4Seed #5Seed #6Seed #7Seed #8MeanStd
dev-clean3.573.483.543.483.473.693.513.593.540.07
dev-other10.6810.7810.4710.7210.8411.0310.6710.8610.760.15
test-clean3.703.823.793.843.694.033.823.803.810.10
test-other10.7510.6210.5410.9010.6911.1410.4110.8210.730.21

Training performance results

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

Our results were obtained by running:

AMP=true NUM_GPUS_SEQ="1" GRAD_ACC_SEQ="16 24" bash scripts/train_benchmark.sh
AMP=true NUM_GPUS_SEQ="4" GRAD_ACC_SEQ="4 6" bash scripts/train_benchmark.sh
AMP=true NUM_GPUS_SEQ="8" GRAD_ACC_SEQ="2 3" bash scripts/train_benchmark.sh
AMP=false NUM_GPUS_SEQ="1" GRAD_ACC_SEQ="16 24" bash scripts/train_benchmark.sh
AMP=false NUM_GPUS_SEQ="4" GRAD_ACC_SEQ="4 6" bash scripts/train_benchmark.sh
AMP=false NUM_GPUS_SEQ="8" GRAD_ACC_SEQ="2 3" bash scripts/train_benchmark.sh

in the PyTorch 21.07-py3 NGC container on NVIDIA DGX A100 with (8x A100 80GB) GPUs. Performance numbers (in items/images per second) were averaged over an entire training epoch.

Batch size / GPUGrad accumulationGPUsThroughput - TF32Throughput - mixed precisionThroughput speedup (TF32 to mixed precision)Weak scaling - TF32Weak scaling - mixed precision
4824178.8989.691.141.001.00
7216179.0188.701.121.001.00
4864303.16343.061.133.843.82
7244304.47341.951.123.853.86
4838576.37644.271.127.317.18
7228583.31651.601.127.387.35

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

Training performance: NVIDIA DGX-2 (16x V100 32GB)

Our results were obtained by running:

AMP=true NUM_GPUS_SEQ="1" GRAD_ACC_SEQ="24 48" bash scripts/train_benchmark.sh
AMP=true NUM_GPUS_SEQ="4" GRAD_ACC_SEQ="6 12" bash scripts/train_benchmark.sh
AMP=true NUM_GPUS_SEQ="8" GRAD_ACC_SEQ="3 6" bash scripts/train_benchmark.sh
AMP=true NUM_GPUS_SEQ="16" GRAD_ACC_SEQ="3" bash scripts/train_benchmark.sh
AMP=false NUM_GPUS_SEQ="1" GRAD_ACC_SEQ="48" bash scripts/train_benchmark.sh
AMP=false NUM_GPUS_SEQ="4" GRAD_ACC_SEQ="12" bash scripts/train_benchmark.sh
AMP=false NUM_GPUS_SEQ="8" GRAD_ACC_SEQ="6" bash scripts/train_benchmark.sh
AMP=false NUM_GPUS_SEQ="16" GRAD_ACC_SEQ="3" bash scripts/train_benchmark.sh

in the PyTorch 21.07-py3 NGC container on NVIDIA DGX-2 with (16x V100 32GB) GPUs. Performance numbers (in items/images per second) were averaged over an entire training epoch.

Batch size / GPUGrad accumulationGPUsThroughput - FP32Throughput - mixed precisionThroughput speedup (FP32 to mixed precision)Weak scaling - FP32Weak scaling - mixed precision
2448144.6567.951.521.001.00
48241-67.49-1.001.00
24124170.18258.561.523.813.81
4864-254.58--3.77
2468330.53495.521.507.407.29
4838-477.87--7.08
24316616.51872.991.4213.8112.85

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

Inference performance results

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

Our results were obtained by running:

bash AMP=false scripts/inference_benchmark.sh
bash AMP=true scripts/inference_benchmark.sh

in the PyTorch 21.07-py3 NGC container on NVIDIA DGX A100 (1x A100 80GB) GPU. Performance numbers (latency in milliseconds per batch) were averaged over 500 iterations.

FP16 Latency (ms) PercentilesTF32 Latency (ms) PercentilesFP16/TF32 speed up
BSDuration (s)90%95%99%Avg90%95%99%AvgAvg
12.035.5136.3655.5735.7133.2333.8640.0533.230.93
22.038.0538.9152.6738.2134.1735.1739.3233.730.88
42.038.4338.9845.4437.7835.0236.0044.1034.750.92
82.038.6339.3745.4337.9435.4936.7045.9434.530.91
162.042.3344.5861.0240.2835.6636.9345.3834.780.86
17.037.7238.5442.5637.2833.2334.1640.5433.130.89
27.039.4441.3553.6238.5635.1535.8141.8334.820.90
47.038.3939.4845.0137.9837.5438.5142.6736.120.95
87.040.8241.7654.2039.4337.6739.9745.2436.120.92
167.042.8044.8056.9241.5240.6641.9653.2439.240.95
116.738.2238.9844.1537.8033.8934.9842.6633.230.88
216.739.8441.0952.5039.3435.8637.1642.0434.390.87
416.741.0242.6454.9639.5035.9837.0239.3034.870.88
816.740.9342.0656.2639.3640.9342.0645.5039.341.00
1616.757.2158.6571.3357.7862.7463.8271.1361.491.06

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

Inference performance: NVIDIA DGX-2 (1x V100 32GB)

Our results were obtained by running:

bash AMP=false scripts/inference_benchmark.sh
bash AMP=true scripts/inference_benchmark.sh

in the PyTorch 21.07-py3 NGC container on NVIDIA DGX-2 with (1x V100 32GB) GPU. Performance numbers (latency in milliseconds per batch) were averaged over 500 iterations.

FP16 Latency (ms) PercentilesFP32 Latency (ms) PercentilesFP16/FP32 speed up
BSDuration (s)90%95%99%Avg90%95%99%AvgAvg
12.036.8938.1641.8035.8533.4433.7838.0933.010.92
22.040.4741.3345.7040.0232.6233.2736.3832.090.80
42.041.5042.8549.6541.1234.5634.8337.1034.040.83
82.049.8750.4851.9949.1934.9035.1736.5734.270.70
162.046.3946.7747.8740.0445.3745.8947.5244.461.11
17.048.8349.1652.2248.2633.8734.5036.4533.240.69
27.041.4841.8245.0741.0342.3242.6643.8641.791.02
47.042.4843.2547.2941.5637.2038.1839.7436.460.88
87.039.7840.4944.7338.8946.8447.1748.0744.781.15
167.049.8550.5653.0444.9560.2160.6864.9257.941.29
116.740.8041.1642.9640.5242.0442.5344.5937.080.92
216.741.3741.6943.7440.8535.6136.4940.3234.680.85
416.750.2251.0754.1349.5140.9541.3844.0940.390.82
816.744.9345.3849.2444.1662.5462.9265.9561.861.40
1616.770.7471.5675.1669.87102.52103.57108.20101.571.45

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