AI Hardware & Software Stack

Why are lookups in the large embedding tables used by recommendation models and similar hard for AI hardware?

  1. ATable lookups require enormous numbers of multiplications
  2. BEmbedding tables are small and always fit on chip
  3. CThere is almost no computation, and scattered reads from a huge table leave matrix units unused, so speed depends on memory capacity, bandwidth and latency
Show answer and explanation

Answer: C. There is almost no computation, and scattered reads from a huge table leave matrix units unused, so speed depends on memory capacity, bandwidth and latency

In recommendation systems, tables holding a vector per user or item ID can reach hundreds of GB, and each input reads and sums scattered rows. There is almost no computation, and the irregular reads defeat coalescing and caching, very different from the matrix-product work accelerators excel at. Tables are sharded across the memory of many GPUs or CPUs to secure enough capacity and bandwidth.

  • A. Lookups are mostly reads with few multiplications.
  • B. They can reach hundreds of GB and do not fit on chip.
  • C. Correct. The memory system, not the arithmetic units, is key.
Practice this topic Back to topic

More AI Hardware & Software Stack questions

  1. Which orders the AI software stack from the layer closest to users down to the layer closest to hardware?
  2. What is the difference between training and inference for a neural network?
  3. Which is NOT a reason training needs much more memory than inference for the same model?
  4. A 7-billion-parameter (7B) model is trained with weights, gradients and Adam's two states all held in FP32 (4 bytes). Excluding activations, roughly how much memory is needed?
  5. If a 7-billion-parameter (7B) model's weights are held in FP16 (2 bytes), roughly how much memory do the weights take?