Blog

Benchmarks

NVIDIA RTX A4500 BERT Large Fine Tuning Benchmarks in TensorFlow

February 17, 2022
13 min read
EXX-Blog-BERT-RTX-A4500-Tensorflow-Benchmark.jpg

Fine-tuning BERT Large on a GPU Workstation

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

Benchmark scripts we used for evaluation were the 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 1x GPU configurations on BERT Large. In addition, we ran all benchmarks using TensorFlow's XLA across the board.

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 A4500 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 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 to do NLP training on starting around $5,500


Exxact Workstation System Specs:

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

squad v1

TensorFlow2.40

GPU Benchmark Overview

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

1x Quadro RTX A4500 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)
base1281fp1625.98186.138.945.566.346.466.86387.51
base1281fp3220.34188.558.385.486.326.486.855501.44
base1282fp1620.47364.388.845.676.26.326.785679.04
base1282fp3219.65389.558.475.35.895.996.185654.98
base1284fp1626.39695.6411.555.796.246.366.95774.98
base1284fp3226.41696.7511.545.766.226.416.865767.47
base1288fp1634.2964.1813.578.278.728.949.525876.52
base1288fp3234.42965.4713.68.288.648.899.445899.06
base3841fp1617.03177.111.465.656.116.256.76059.77
base3841fp3217.2176.1111.495.666.156.296.776051.43
base3842fp1625.64239.8919.38.318.849.139.846456.22
base3842fp3225.6240.1819.268.298.89.069.776447.57
base3844fp1631.28305.3224.2913.0913.6213.8514.976660.95
base3844fp3231.11304.4324.2813.1313.613.814.986639.34
base3848fp1643.89358.8234.2922.2722.7923.124.517002.83
base3848fp3243.9358.7634.3322.2622.823.1124.357031.13
large1281fp1647.42103.6215.969.4210.9511.1611.6711340.21
large1281fp3236.28108.715.528.9110.1210.410.9611350.15
large1282fp1638.82180.417.7711.0911.9112.0512.4411356.99
large1282fp3239.12177.6217.9711.4511.9812.1312.7911389.43
large1284fp1658.85253.7127.8415.9416.4816.6517.5211607
large1284fp3257.8261.9427.3515.0116.1716.3517.0111606.73
large1288fp1678.49348.5534.1522.8923.8224.0524.7111839.75
large1288fp3279.35345.5734.5323.2223.9624.1924.8812047.05
large3841fp1634.4977.0924.9912.9813.7613.8914.5912534.02
large3841fp3233.9579.8124.4912.3413.3513.5114.0912472.18
large3842fp1654.497.7744.0420.3421.2121.3822.213302.25
large3842fp3253.8898.2243.8320.1221.1821.3822.1913331.07
large3844fp1668.97118.2257.6533.9534.4434.6235.3113713.5
large3844fp3269.14117.8857.7534.0734.5934.7835.7313693.18
large3848fp16104.65126.6588.7663.2263.8764.1765.3214498.6
large3848fp32104.84126.418963.3364.1164.465.5314539.54

Data Chart

Finetune Inferencing BERT for TensorFlow 2
Data Chart

8x RTX A4500 Benchmarks BERT for TensorFlow 2 FineTuning Training

Raw Data

Training Time HoursThroughput sentences/sec
FP16, Seq 128, BS12247.9787.04
FP32, Seq 128, BS11859.29107.77
FP16, Seq 128, BS2996.29228.01
FP32, Seq 128, BS2994.02228.55
FP16, Seq 128, BS4617.1449.09
FP32, Seq 128, BS4618.85449.5
FP16, Seq 128, BS8392.02807.31
FP32, Seq 128, BS8391.99809.54
FP16, Seq 384, BS11778.13113.63
FP32, Seq 384, BS11781.29113.46
FP16, Seq 384, BS21086.58205.96
FP32, Seq 384, BS21081.24207.12
FP16, Seq 384, BS4742.6346.99
FP32, Seq 384, BS4743.12346.3
FP16, Seq 384, BS8520.45521.61
FP32, Seq 384, BS8519.85522.77

Data Chart

Finetune Inferencing BERT for TensorFlow 2 Chart 2

NVIDIA RTX A4500 Series GPUs

GPU FeaturesNVIDIA RTX A4500
GPU Memory20GB GDDR6 with error-correction code (ECC)
Display Ports4x DisplayPort 1.4
Max Power Consumption2000 W
Graphics BusPCI Express Gen 4 x 16
Form Factor4.4” (H) x 10.5” (L) Dual Slot
Thermal

Active

NVLink2-way Low-profile (2-slot and 3-slot bridges)
VR ReadyYes

Additional GPU Benchmarks

Exxact Workstation System Specs

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

squad v1

Additional GPU Benchmarks


Have any questions?
Contact Exxact Today


EXX-Blog-BERT-RTX-A4500-Tensorflow-Benchmark.jpg
Benchmarks

NVIDIA RTX A4500 BERT Large Fine Tuning Benchmarks in TensorFlow

February 17, 202213 min read

Fine-tuning BERT Large on a GPU Workstation

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

Benchmark scripts we used for evaluation were the 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 1x GPU configurations on BERT Large. In addition, we ran all benchmarks using TensorFlow's XLA across the board.

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 A4500 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 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 to do NLP training on starting around $5,500


Exxact Workstation System Specs:

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

squad v1

TensorFlow2.40

GPU Benchmark Overview

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

1x Quadro RTX A4500 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)
base1281fp1625.98186.138.945.566.346.466.86387.51
base1281fp3220.34188.558.385.486.326.486.855501.44
base1282fp1620.47364.388.845.676.26.326.785679.04
base1282fp3219.65389.558.475.35.895.996.185654.98
base1284fp1626.39695.6411.555.796.246.366.95774.98
base1284fp3226.41696.7511.545.766.226.416.865767.47
base1288fp1634.2964.1813.578.278.728.949.525876.52
base1288fp3234.42965.4713.68.288.648.899.445899.06
base3841fp1617.03177.111.465.656.116.256.76059.77
base3841fp3217.2176.1111.495.666.156.296.776051.43
base3842fp1625.64239.8919.38.318.849.139.846456.22
base3842fp3225.6240.1819.268.298.89.069.776447.57
base3844fp1631.28305.3224.2913.0913.6213.8514.976660.95
base3844fp3231.11304.4324.2813.1313.613.814.986639.34
base3848fp1643.89358.8234.2922.2722.7923.124.517002.83
base3848fp3243.9358.7634.3322.2622.823.1124.357031.13
large1281fp1647.42103.6215.969.4210.9511.1611.6711340.21
large1281fp3236.28108.715.528.9110.1210.410.9611350.15
large1282fp1638.82180.417.7711.0911.9112.0512.4411356.99
large1282fp3239.12177.6217.9711.4511.9812.1312.7911389.43
large1284fp1658.85253.7127.8415.9416.4816.6517.5211607
large1284fp3257.8261.9427.3515.0116.1716.3517.0111606.73
large1288fp1678.49348.5534.1522.8923.8224.0524.7111839.75
large1288fp3279.35345.5734.5323.2223.9624.1924.8812047.05
large3841fp1634.4977.0924.9912.9813.7613.8914.5912534.02
large3841fp3233.9579.8124.4912.3413.3513.5114.0912472.18
large3842fp1654.497.7744.0420.3421.2121.3822.213302.25
large3842fp3253.8898.2243.8320.1221.1821.3822.1913331.07
large3844fp1668.97118.2257.6533.9534.4434.6235.3113713.5
large3844fp3269.14117.8857.7534.0734.5934.7835.7313693.18
large3848fp16104.65126.6588.7663.2263.8764.1765.3214498.6
large3848fp32104.84126.418963.3364.1164.465.5314539.54

Data Chart

Finetune Inferencing BERT for TensorFlow 2
Data Chart

8x RTX A4500 Benchmarks BERT for TensorFlow 2 FineTuning Training

Raw Data

Training Time HoursThroughput sentences/sec
FP16, Seq 128, BS12247.9787.04
FP32, Seq 128, BS11859.29107.77
FP16, Seq 128, BS2996.29228.01
FP32, Seq 128, BS2994.02228.55
FP16, Seq 128, BS4617.1449.09
FP32, Seq 128, BS4618.85449.5
FP16, Seq 128, BS8392.02807.31
FP32, Seq 128, BS8391.99809.54
FP16, Seq 384, BS11778.13113.63
FP32, Seq 384, BS11781.29113.46
FP16, Seq 384, BS21086.58205.96
FP32, Seq 384, BS21081.24207.12
FP16, Seq 384, BS4742.6346.99
FP32, Seq 384, BS4743.12346.3
FP16, Seq 384, BS8520.45521.61
FP32, Seq 384, BS8519.85522.77

Data Chart

Finetune Inferencing BERT for TensorFlow 2 Chart 2

NVIDIA RTX A4500 Series GPUs

GPU FeaturesNVIDIA RTX A4500
GPU Memory20GB GDDR6 with error-correction code (ECC)
Display Ports4x DisplayPort 1.4
Max Power Consumption2000 W
Graphics BusPCI Express Gen 4 x 16
Form Factor4.4” (H) x 10.5” (L) Dual Slot
Thermal

Active

NVLink2-way Low-profile (2-slot and 3-slot bridges)
VR ReadyYes

Additional GPU Benchmarks

Exxact Workstation System Specs

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

squad v1

Additional GPU Benchmarks


Have any questions?
Contact Exxact Today