Understanding Training Efficiency of Deep Learning Recommendation Models at Scale

Bilge Acun, Matthew Murphy, Xiaodong Wang, Jade Nie, Carole-Jean Wu, Kim M. Hazelwood

TL;DR

This paper pulls back the curtain on the massive recommendation models that power Facebook’s data centers, revealing that unlike Vision or NLP models, these systems are often bottlenecked by memory capacity rather than raw compute. The authors introduce Zion, a next-generation hardware-software co-designed platform that utilizes 2TB of system memory and 1TB/s bandwidth to efficiently train models with embedding tables that are simply too large for standard GPU memory.

What Problem Does This Paper Address?

In the world of deep learning research, Vision (CNNs) and Language (Transformers) models get most of the spotlight. However, in industrial data centers, Deep Learning Recommendation Models (DLRMs) consume the vast majority of compute cycles.

The challenge is that DLRMs are "bipolar" workloads. They consist of compute-intensive Multi-Layer Perceptrons (MLPs) and memory-intensive Embedding Tables (EMBs). While MLPs love GPUs, EMBs can reach terabytes in size—far exceeding the High Bandwidth Memory (HBM) available on even the best GPUs. This creates a massive efficiency gap: if you put the tables on the GPU, you run out of space; if you keep them on the CPU, you create a communication bottleneck that starves the GPU of data.

Methods

The researchers conducted a multi-dimensional characterization of three major production models ($M1_{prod}$, $M2_{prod}$, and $M3_{prod}$) and a custom test suite. They evaluated several Embedding Table Placement Strategies:

  1. GPU Memory: Tables are sharded across GPU HBM.
  2. System Memory of GPU Server: Tables stay in the server's RAM, accessed by GPUs.
  3. Remote CPU Servers: Tables are hosted on separate parameter servers.
  4. Hybrid: A mix of the above.

The paper introduces the Zion platform, which differs from the previous "Big Basin" design by significantly beefing up the CPU-to-GPU connection and system memory. While Big Basin was an 8-GPU system with a modest CPU side, Zion is an 8-socket CPU system interconnected with 8 GPUs, providing the massive memory capacity (2TB) needed to hold giant embedding tables locally.

Datasets

The study uses three anonymized but representative Facebook production models:

  • $M1_{prod}$ & $M2_{prod}$: Smaller models with embedding tables in the tens of gigabytes.
  • $M3_{prod}$: A massive "embedding-dominant" model with tables in the hundreds of gigabytes to terabytes.
  • Synthetic Test Suite: A parameterized model used to systematically sweep through variables like dense/sparse feature counts, MLP dimensions, and hash sizes.

Key Insights and Ideas

  • The "Memory Wall" is Real: For models like $M3_{prod}$, the training throughput on a standard GPU server (Big Basin) was actually lower (0.67x) than a traditional CPU-only setup. This is because the overhead of moving massive embedding vectors from remote servers over the network outweighed the GPU's compute speedup.
  • Zion’s Design Philosophy: Zion isn't just "more GPUs." It’s about balance. By providing 2TB of system memory and 1TB/s of memory bandwidth, Zion allows the GPUs to access giant embedding tables without leaving the server, effectively solving the "embedding-dominant" scaling problem.
  • The Accuracy-Throughput Trade-off: To make GPUs efficient, you need large batch sizes. However, the authors found that increasing batch sizes leads to an "accuracy gap" (up to 0.2% loss in normalized entropy). In the recommendation world, a 0.1% loss is often considered intolerable, meaning throughput gains can't be chased blindly.
  • Hash Size Sensitivity: Increasing the "hash size" (the number of rows in an embedding table) increases communication costs between GPUs during training, which can cause throughput to drop significantly even if the compute load remains the same.

Key Results

  • Efficiency Gains: For $M1_{prod}$, the GPU-based Big Basin system improved throughput by 2.25x and power efficiency by 4.3x compared to CPU servers.
  • Scaling Bottlenecks: $M3_{prod}$ scaled poorly on Big Basin due to its massive memory requirements but showed "several orders of magnitude" improvement on the Zion platform.
  • Zion Performance: On Zion, placing embedding tables in system memory (RAM) yielded the best results for large models, as it balanced the high capacity of RAM with the high compute of GPUs.
  • Batch Size Scaling: GPU throughput increases almost linearly with batch size until it hits a saturation point (around 1600-3200 for these models), but manual hyper-parameter tuning is required to claw back the resulting accuracy loss.

Limitations and Future Work

The authors acknowledge that their prototype Zion server lacked direct GPU-to-GPU communication (all traffic went through the CPU), which limited the performance of certain placement strategies.

As models continue to grow into the multi-terabyte range, even a single Zion node won't be enough. The authors suggest that future work must focus on scale-out Zion clusters, requiring even more sophisticated networking and software sharding strategies to maintain efficiency across multiple nodes. Additionally, automated hyper-parameter tuning (AutoML) will be essential to mitigate the accuracy losses seen when scaling batch sizes for GPU training.

Summary updated

BibTeX
@inproceedings{acun2021understanding,
  author = {Bilge Acun and Matthew Murphy and Xiaodong Wang and Jade Nie and Carole-Jean Wu and Kim M. Hazelwood},
  title = {{Understanding Training Efficiency of Deep Learning Recommendation Models at Scale}},
  booktitle = {HPCA},
  year = {2021},
  url = {https://openreview.net/forum?id=VE3HZDl4wr},
}
Figure