Skip to main content
QUICK REVIEW

[Paper Review] Mixed-Precision Embedding Using a Cache

Jie Yang, Jianyu Huang|arXiv (Cornell University)|Oct 21, 2020
Topic ModelingComputer Science32 references15 citations
TL;DR

This paper proposes a mixed-precision embedding training method using a small, high-precision cache to store frequently or recently accessed embedding rows, while the majority are trained in low precision (INT8 or INT4). The approach achieves up to 7× memory reduction with full accuracy retention and 16% training speedup on industrial-scale models by minimizing GPU-to-host transfers and leveraging efficient cache replacement policies.

ABSTRACT

In recommendation systems, practitioners observed that increase in the number of embedding tables and their sizes often leads to significant improvement in model performances. Given this and the business importance of these models to major internet companies, embedding tables for personalization tasks have grown to terabyte scale and continue to grow at a significant rate. Meanwhile, these large-scale models are often trained with GPUs where high-performance memory is a scarce resource, thus motivating numerous work on embedding table compression during training. We propose a novel change to embedding tables using a cache memory architecture, where the majority of rows in an embedding is trained in low precision, and the most frequently or recently accessed rows cached and trained in full precision. The proposed architectural change works in conjunction with standard precision reduction and computer arithmetic techniques such as quantization and stochastic rounding. For an open source deep learning recommendation model (DLRM) running with Criteo-Kaggle dataset, we achieve 3x memory reduction with INT8 precision embedding tables and full-precision cache whose size are 5% of the embedding tables, while maintaining accuracy. For an industrial scale model and dataset, we achieve even higher >7x memory reduction with INT4 precision and cache size 1% of embedding tables, while maintaining accuracy, and 16% end-to-end training speedup by reducing GPU-to-host data transfers.

Motivation & Objective

  • To address the growing memory footprint of large-scale embedding tables in deep learning recommendation systems.
  • To reduce GPU memory usage without sacrificing model accuracy in large-scale training workloads.
  • To explore the effectiveness of combining low-precision training with a high-precision cache for embedding tables.
  • To evaluate the impact of cache size, replacement policies, and precision levels on model accuracy and training efficiency.
  • To improve training speed by reducing PCIe bandwidth usage through smarter memory access patterns.

Proposed method

  • The method uses a small, high-precision cache (1–5% of embedding table size) to store the most frequently or recently accessed embedding rows.
  • The majority of embedding rows are trained in low precision (INT8 or INT4), while the cache stores full-precision gradients and parameters for active rows.
  • Cache replacement policies such as LRU and LFU are used to manage which rows are promoted to high precision based on access frequency or recency.
  • Stochastic rounding is applied during low-precision training to mitigate systematic rounding bias and maintain accuracy.
  • The system integrates with existing deep learning frameworks and uses unified memory (UVM) for large tables, with the cache reducing PCIe traffic.
  • The approach is evaluated on both open-source (DLRM with Criteo-Kaggle) and industrial-scale models, measuring memory savings, accuracy, and training speed.

Experimental results

Research questions

  • RQ1Can a small high-precision cache effectively maintain model accuracy when most embedding rows are trained in low precision (INT8/INT4)?
  • RQ2How do different cache replacement policies (LRU, LFU) affect model accuracy and cache hit rate in low-precision embedding training?
  • RQ3What is the optimal cache size relative to the embedding table for balancing memory reduction and accuracy recovery?
  • RQ4How does stochastic rounding compare to round-to-nearest in low-precision embedding training with and without a high-precision cache?
  • RQ5To what extent can this caching mechanism reduce GPU-to-host data transfers and improve end-to-end training speed?

Key findings

  • The method achieves up to 7× memory reduction on an industrial-scale model using INT4 precision and a 1% high-precision cache while maintaining neutral accuracy.
  • With a 5% high-precision cache, the approach achieves 3× memory reduction on the open-source DLRM model using INT8 precision and maintains full accuracy.
  • Stochastic rounding consistently outperforms round-to-nearest in low-precision training, especially when combined with a high-precision cache, by reducing systematic rounding bias.
  • Cache hit rate has a strong correlation with training speed: high hit rates saturate GPU memory bandwidth, while low hit rates still outperform unified memory (UVM) access.
  • An end-to-end training speedup of 16% is achieved on the industrial model by reducing GPU-to-host data transfers through effective caching.
  • The accuracy improvement from increasing cache size shows diminishing returns, indicating that small caches (1–5%) are sufficient for near-optimal performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.