Introduction
Deep Learning Recommendation Models (DLRMs) are critical for personalized digital experiences, yet they face a significant scaling challenge. These models rely on massive embedding tables to process categorical features. As these tables grow to trillions of parameters, they exceed the high-bandwidth memory (HBM) capacity of modern GPUs. Traditional solutions offload these tables to CPU memory, but the resulting PCI-e bottleneck and slow CPU access often necessitate asynchronous updates, which can compromise training stability and convergence.
Methodology
To address these bottlenecks, we present a frequency-aware software cache that optimizes GPU memory utilization. The system architecture is divided into two primary components: a Static Module and a Dynamic Module.
The Static Module performs a pre-training analysis of the dataset to identify the access frequency of categorical IDs, reordering the primary embedding table in CPU memory accordingly. The Dynamic Module manages a "CUDA Cached Weight" on the GPU. During training, the system identifies missing IDs and performs parallel row swaps between CPU and GPU. All cache management operations, including indexing and uniqueness checks, are executed on the GPU to maintain high throughput. Furthermore, a "Data Transmitter" linearizes scattered updates into contiguous blocks to maximize PCI-e bandwidth efficiency.
Dataset Analysis and Insights
The efficacy of this approach is rooted in the "long-tail" distribution of real-world recommendation data. Evaluation on industry-standard benchmarks—Criteo Kaggle and Avazu—reveals an extreme skew in feature access patterns.
In the Criteo dataset, for instance, a mere 0.14% of the most popular IDs account for 90% of all access occurrences. By leveraging this "90/0.1 Rule," the software cache can maintain a high hit ratio even with a small GPU footprint. Empirical results suggest that a cache size of approximately 1.5% of the total model size provides an optimal balance between memory savings and training speed.
Key Results
The frequency-aware cache demonstrates significant improvements in memory efficiency and performance:
- Memory Efficiency: The system reduces CUDA memory requirements by approximately 80% compared to standard implementations like TorchRec.
- Training Speed: Despite offloading the majority of parameters, the system maintains competitive end-to-end training speeds, significantly outperforming traditional CPU-only embedding lookups.
- Accuracy Preservation: Synchronous training ensures that model convergence and AUROC metrics remain identical to full-GPU implementations, preserving predictive power across various cache ratios.
Conclusion and Future Work
This software-defined cache provides a viable path for training massive DLRMs on limited GPU hardware by exploiting data access statistics. While currently reliant on static pre-analysis, future iterations aim to support dynamic frequency tracking for streaming data. Additional optimizations, such as input-ID prefetching and embedding compression, are expected to further alleviate PCI-e bottlenecks and enhance scalability.
Summary updated