Benchmarks

NVIDIA RTX A4000 BERT Large Fine Tuning Benchmarks in TensorFlow

August 20, 2021
18 min read
blog-rtx-a4000-bert-large-benchmarks.jpg

NVIDIA RTX A4000: BERT Inferencing and Training Benchmarks in TensorFlow

For this post, we measured fine-tuning performance (training and inference) for the BERT implementation of TensorFlow on NVIDIA RTX A4000 GPUs. For testing we used an Exxact Valence Workstation that was fitted with 4x RTX A4000 GPUs with 16GB GPU memory per GPU.

Benchmark scripts we used for evaluation:

finetune_train_benchmark.sh

and

finetune_inference_benchmark.sh

from NVIDIA NGC Repository BERT for TensorFlow. We made slight modifications to the training benchmark script to get the larger batch size numbers.

The script runs multiple tests on the SQuAD v1.1 dataset using batch sizes 1, 2, 4, and 8. Inferencing tests were conducted using a 1 GPU configuration on BERT Large. In addition, we ran all benchmarks using TensorFlow's XLA across the board. Other training settings can be viewed at the end of this blog.

Key Points and Observations

  • Scenarios that are not typically used in real-world training, such as single GPU throughput are illustrated in the table below, and provided for reference as an indication of single chip throughput of the platform.
  • For those interested in training BERT Large, a 2x RTX A4000 system may be a great choice to start with, giving the opportunity to add additional cards as budget/scaling needs increase.
  • NOTE: In order to run these benchmarks, or to be able to fine-tune BERT Large with 4x GPUs you'll need a system with at least 64GB RAM.

Interested in getting faster results?
Learn more about Exxact AI workstations starting at $3,700


Exxact Workstation System Specs:

Nodes1
Processor / Count2x AMD EPYC 7552
Total Logical Cores192
MemoryDDR4 512GB
StorageNVMe 3.84TB
OSUbuntu 18.04
CUDA Version11.2
BERT Dataset

squad v1

Tensorflow2.40

GPU Benchmark Overview

FP = Floating Point Precision, Seq = Sequence Length, BS = Batch Size

1x RTX A4000 BERT LARGE Inference Benchmark

Raw Data

ModelSequence-LengthBatch-sizePrecisionTotal-Inference-TimeThroughput-Average(sent/sec)Latency-Average(ms)Latency-50%(ms)Latency-90%(ms)Latency-95%(ms)iLatency-99%(ms)Latency-100%(ms)
base1281fp1613.59155.386.446.436.836.937.177.81
base1281fp3212.73128.87.767.738.18.218.4911.4
base1282fp1618.25220.849.068.939.429.59.7110.52
base1282fp3218.09156.2512.812.7213.1413.213.4616.49
base1284fp1624.14268.3214.9114.8715.2415.3215.6529.78
base1284fp3229.36165.4924.1724.2124.5424.6224.7424.93
base1288fp1635.6303.2926.3826.3826.7326.8526.9527.05
base1288fp3249.5181.2144.1544.2344.6244.6844.844.91
base3841fp1613.38160.376.246.116.656.76.977.38
base3841fp3212.63130.457.677.558.088.188.5212.04
base3842fp1618.28221.39.048.939.429.499.6410.47
base3842fp3218.28155.0812.912.8813.213.313.4516.3
base3844fp1624.12267.2714.9714.9915.2615.3215.5416.06
base3844fp3229.43165.0724.2324.2524.5824.6824.826.3
base3848fp1635.74304.7526.2526.2826.7326.8326.9827.19
base3848fp3249.53181.1944.1544.244.6444.744.8145.62
large1281fp1629.7562.8315.9215.9716.6916.8517.1217.84
large1281fp3226.8553.1518.8218.7319.7119.8620.2724.23
large1282fp1639.0182.1624.3424.1825.2425.4225.8427.49
large1282fp3242.6957.834.634.5135.5735.7836.1538.11
large1284fp1657.4594.0442.5442.4643.5943.7944.1545.14
large1284fp3274.1860.616666.0767.267.4667.6867.93
large1288fp1690.61105.5475.875.8576.8677.177.478.4
large1288fp32139.860.89131.37131.73132.79133.01133.37133.67
large3841fp1629.7462.5615.9816.0616.7716.9117.1617.99
large3841fp3227.1252.419.0919.0320.0420.2220.5722.28
large3842fp1638.9182.3824.2824.0725.1725.325.5226.05
large3842fp3242.7758.0134.4834.3735.4735.6636.0536.45
large3844fp1657.3393.9242.5942.5543.5343.7244.144.65
large3844fp3274.3860.4466.1966.2367.1867.4367.6467.93
large3848fp1690.59105.6275.7475.8176.6776.9777.3278.46
large3848fp32139.7560.93131.29131.52132.72133.05133.57134.62

Data Chart

1x RTX A4000 Benchmarks BERT for Tensorflow 2 FineTuning Training

Raw Data

Training Time HoursThroughput sentences/sec
Base FP32, BS11.0715.42
Base FP16, BS11.2314.34
Base FP32, BS21.4521.34
Base FP16, BS21.522.3
Base FP16 XLA,BS11.8621.22
Base FP16, BS42.0530.59
Base FP16 XLA,BS22.0835.3
Base FP32, BS42.325.44
Base FP16 XLA,BS42.453.32
Large FP32, BS12.75.82
Base FP16 XLA,BS82.8570.82
Large FP16, BS12.895.85
Base FP16, BS83.1337.81
Large FP16, BS23.728.61
Base FP32, BS83.8529.18
Large FP32, BS23.877.71
Large FP16 XLA,BS14.238.32
Large FP16 XLA,BS24.7713.5
Large FP16, BS45.2311.57
Large FP16 XLA,BS45.5819.73
Large FP32, BS46.19.37
Large FP16 XLA,BS87.1325.09
Large FP16, BS88.2513.99
Base FP32 XLA,BS142.40.75
Base FP32 XLA,BS2751.04
Base FP32 XLA,BS493.351.07
Base FP32 XLA,BS8117.21.37

Data Chart

2x RTX A4000 Benchmarks BERT for Tensorflow 2 FineTuning Training

Raw Data

Training Time HoursThroughput sentences/sec
Base FP32 , BS11.6421.82
Base FP16, BS11.723.39
Base FP32 XLA , BS11.8526.72
Base FP32 , BS22.0133.36
Base FP16, BS22.0435.99
Base FP32 XLA , BS22.1244.35
Base FP16 XLA , BS12.429.73
Base FP16, BS42.5753.15
Base FP16 XLA , BS22.651.83
Base FP32 XLA , BS42.6263.18
Base FP32 , BS42.8443.9
Base FP16 XLA , BS42.9283
Base FP16 XLA , BS83.38120.19
Base FP32 XLA , BS83.5282.78
Base FP16, BS83.6469.01
Large FP16, BS14.078.94
Large FP32, BS14.27.93
Base FP32 , BS84.453.68
Large FP16, BS24.8514.21
Large FP32, BS25.311.98
Large FP16 XLA , BS15.4611.14
Large FP16 XLA , BS2619.13
Large FP16, BS46.3420.31
Large FP16 XLA , BS46.8130.4
Large FP32, BS47.4815.97
Large FP16 XLA , BS88.2942.3
Large FP16, BS89.3125.94

Data Chart

4x RTX A4000 Benchmarks BERT for Tensorflow 2 FineTuning Training

Raw Data

Training Time HoursThroughput sentences/sec
Base FP16, BS11.7943.52
Base FP32 XLA, BS11.7839.02
Base FP32, BS11.7939.02
Base FP16, BS22.0969.84
Base FP32, BS22.1561.86
Base FP32 XLA, BS22.1561.82
Base FP16 XLA, BS12.4953.84
Base FP16, BS42.63102.85
Base FP16 XLA, BS22.796.01
Base FP32 XLA, BS42.9683.8
Base FP32, BS42.9683.73
Base FP16 XLA, BS43158.56
Base FP16 XLA, BS83.45233.43
Base FP16, BS83.67137.78
Large FP16, BS14.2916.68
Base FP32, BS84.48105.07
Base FP32 XLA, BS84.49104.6
Large FP32, BS14.6114.12
Large FP16, BS25.0626.85
Large FP32, BS25.6422.15
Large FP16 XLA, BS15.6620.56
Large FP16 XLA, BS26.2135.69
Large FP16 XLA, BS86.5239.21
Large FP16 XLA, BS47.0157.43
Large FP32, BS47.8130.51
Large FP16 XLA, BS88.4382.55
Large FP16, BS89.3452.13

Data Chart

NVIDIA RTX A4000 Series GPUs

GPU FeaturesNVIDIA RTX A4000
GPU Memory16GB GDDR6 with error-correction code (ECC)
Display Ports4x DisplayPort 1.4
Max Power Consumption140 W
Graphics BusPCI Express Gen 4 x 16
Form Factor4.4” (H) x 9.5” (L) Single Slot
Thermal

Active

VR ReadyYes

Additional GPU Benchmarks


Have any questions?
Contact Exxact Today


blog-rtx-a4000-bert-large-benchmarks.jpg
Benchmarks

NVIDIA RTX A4000 BERT Large Fine Tuning Benchmarks in TensorFlow

August 20, 202118 min read

NVIDIA RTX A4000: BERT Inferencing and Training Benchmarks in TensorFlow

For this post, we measured fine-tuning performance (training and inference) for the BERT implementation of TensorFlow on NVIDIA RTX A4000 GPUs. For testing we used an Exxact Valence Workstation that was fitted with 4x RTX A4000 GPUs with 16GB GPU memory per GPU.

Benchmark scripts we used for evaluation:

finetune_train_benchmark.sh

and

finetune_inference_benchmark.sh

from NVIDIA NGC Repository BERT for TensorFlow. We made slight modifications to the training benchmark script to get the larger batch size numbers.

The script runs multiple tests on the SQuAD v1.1 dataset using batch sizes 1, 2, 4, and 8. Inferencing tests were conducted using a 1 GPU configuration on BERT Large. In addition, we ran all benchmarks using TensorFlow's XLA across the board. Other training settings can be viewed at the end of this blog.

Key Points and Observations

  • Scenarios that are not typically used in real-world training, such as single GPU throughput are illustrated in the table below, and provided for reference as an indication of single chip throughput of the platform.
  • For those interested in training BERT Large, a 2x RTX A4000 system may be a great choice to start with, giving the opportunity to add additional cards as budget/scaling needs increase.
  • NOTE: In order to run these benchmarks, or to be able to fine-tune BERT Large with 4x GPUs you'll need a system with at least 64GB RAM.

Interested in getting faster results?
Learn more about Exxact AI workstations starting at $3,700


Exxact Workstation System Specs:

Nodes1
Processor / Count2x AMD EPYC 7552
Total Logical Cores192
MemoryDDR4 512GB
StorageNVMe 3.84TB
OSUbuntu 18.04
CUDA Version11.2
BERT Dataset

squad v1

Tensorflow2.40

GPU Benchmark Overview

FP = Floating Point Precision, Seq = Sequence Length, BS = Batch Size

1x RTX A4000 BERT LARGE Inference Benchmark

Raw Data

ModelSequence-LengthBatch-sizePrecisionTotal-Inference-TimeThroughput-Average(sent/sec)Latency-Average(ms)Latency-50%(ms)Latency-90%(ms)Latency-95%(ms)iLatency-99%(ms)Latency-100%(ms)
base1281fp1613.59155.386.446.436.836.937.177.81
base1281fp3212.73128.87.767.738.18.218.4911.4
base1282fp1618.25220.849.068.939.429.59.7110.52
base1282fp3218.09156.2512.812.7213.1413.213.4616.49
base1284fp1624.14268.3214.9114.8715.2415.3215.6529.78
base1284fp3229.36165.4924.1724.2124.5424.6224.7424.93
base1288fp1635.6303.2926.3826.3826.7326.8526.9527.05
base1288fp3249.5181.2144.1544.2344.6244.6844.844.91
base3841fp1613.38160.376.246.116.656.76.977.38
base3841fp3212.63130.457.677.558.088.188.5212.04
base3842fp1618.28221.39.048.939.429.499.6410.47
base3842fp3218.28155.0812.912.8813.213.313.4516.3
base3844fp1624.12267.2714.9714.9915.2615.3215.5416.06
base3844fp3229.43165.0724.2324.2524.5824.6824.826.3
base3848fp1635.74304.7526.2526.2826.7326.8326.9827.19
base3848fp3249.53181.1944.1544.244.6444.744.8145.62
large1281fp1629.7562.8315.9215.9716.6916.8517.1217.84
large1281fp3226.8553.1518.8218.7319.7119.8620.2724.23
large1282fp1639.0182.1624.3424.1825.2425.4225.8427.49
large1282fp3242.6957.834.634.5135.5735.7836.1538.11
large1284fp1657.4594.0442.5442.4643.5943.7944.1545.14
large1284fp3274.1860.616666.0767.267.4667.6867.93
large1288fp1690.61105.5475.875.8576.8677.177.478.4
large1288fp32139.860.89131.37131.73132.79133.01133.37133.67
large3841fp1629.7462.5615.9816.0616.7716.9117.1617.99
large3841fp3227.1252.419.0919.0320.0420.2220.5722.28
large3842fp1638.9182.3824.2824.0725.1725.325.5226.05
large3842fp3242.7758.0134.4834.3735.4735.6636.0536.45
large3844fp1657.3393.9242.5942.5543.5343.7244.144.65
large3844fp3274.3860.4466.1966.2367.1867.4367.6467.93
large3848fp1690.59105.6275.7475.8176.6776.9777.3278.46
large3848fp32139.7560.93131.29131.52132.72133.05133.57134.62

Data Chart

1x RTX A4000 Benchmarks BERT for Tensorflow 2 FineTuning Training

Raw Data

Training Time HoursThroughput sentences/sec
Base FP32, BS11.0715.42
Base FP16, BS11.2314.34
Base FP32, BS21.4521.34
Base FP16, BS21.522.3
Base FP16 XLA,BS11.8621.22
Base FP16, BS42.0530.59
Base FP16 XLA,BS22.0835.3
Base FP32, BS42.325.44
Base FP16 XLA,BS42.453.32
Large FP32, BS12.75.82
Base FP16 XLA,BS82.8570.82
Large FP16, BS12.895.85
Base FP16, BS83.1337.81
Large FP16, BS23.728.61
Base FP32, BS83.8529.18
Large FP32, BS23.877.71
Large FP16 XLA,BS14.238.32
Large FP16 XLA,BS24.7713.5
Large FP16, BS45.2311.57
Large FP16 XLA,BS45.5819.73
Large FP32, BS46.19.37
Large FP16 XLA,BS87.1325.09
Large FP16, BS88.2513.99
Base FP32 XLA,BS142.40.75
Base FP32 XLA,BS2751.04
Base FP32 XLA,BS493.351.07
Base FP32 XLA,BS8117.21.37

Data Chart

2x RTX A4000 Benchmarks BERT for Tensorflow 2 FineTuning Training

Raw Data

Training Time HoursThroughput sentences/sec
Base FP32 , BS11.6421.82
Base FP16, BS11.723.39
Base FP32 XLA , BS11.8526.72
Base FP32 , BS22.0133.36
Base FP16, BS22.0435.99
Base FP32 XLA , BS22.1244.35
Base FP16 XLA , BS12.429.73
Base FP16, BS42.5753.15
Base FP16 XLA , BS22.651.83
Base FP32 XLA , BS42.6263.18
Base FP32 , BS42.8443.9
Base FP16 XLA , BS42.9283
Base FP16 XLA , BS83.38120.19
Base FP32 XLA , BS83.5282.78
Base FP16, BS83.6469.01
Large FP16, BS14.078.94
Large FP32, BS14.27.93
Base FP32 , BS84.453.68
Large FP16, BS24.8514.21
Large FP32, BS25.311.98
Large FP16 XLA , BS15.4611.14
Large FP16 XLA , BS2619.13
Large FP16, BS46.3420.31
Large FP16 XLA , BS46.8130.4
Large FP32, BS47.4815.97
Large FP16 XLA , BS88.2942.3
Large FP16, BS89.3125.94

Data Chart

4x RTX A4000 Benchmarks BERT for Tensorflow 2 FineTuning Training

Raw Data

Training Time HoursThroughput sentences/sec
Base FP16, BS11.7943.52
Base FP32 XLA, BS11.7839.02
Base FP32, BS11.7939.02
Base FP16, BS22.0969.84
Base FP32, BS22.1561.86
Base FP32 XLA, BS22.1561.82
Base FP16 XLA, BS12.4953.84
Base FP16, BS42.63102.85
Base FP16 XLA, BS22.796.01
Base FP32 XLA, BS42.9683.8
Base FP32, BS42.9683.73
Base FP16 XLA, BS43158.56
Base FP16 XLA, BS83.45233.43
Base FP16, BS83.67137.78
Large FP16, BS14.2916.68
Base FP32, BS84.48105.07
Base FP32 XLA, BS84.49104.6
Large FP32, BS14.6114.12
Large FP16, BS25.0626.85
Large FP32, BS25.6422.15
Large FP16 XLA, BS15.6620.56
Large FP16 XLA, BS26.2135.69
Large FP16 XLA, BS86.5239.21
Large FP16 XLA, BS47.0157.43
Large FP32, BS47.8130.51
Large FP16 XLA, BS88.4382.55
Large FP16, BS89.3452.13

Data Chart

NVIDIA RTX A4000 Series GPUs

GPU FeaturesNVIDIA RTX A4000
GPU Memory16GB GDDR6 with error-correction code (ECC)
Display Ports4x DisplayPort 1.4
Max Power Consumption140 W
Graphics BusPCI Express Gen 4 x 16
Form Factor4.4” (H) x 9.5” (L) Single Slot
Thermal

Active

VR ReadyYes

Additional GPU Benchmarks


Have any questions?
Contact Exxact Today