HASTE: Hardware-Aware Dynamic Sparse Training for Large Output Spaces
Abstract
Lay Summary
Many AI systems need to choose from a very large set of possible labels: for example, assigning product tags, recommending related items, or matching search queries to advertisements. When there are millions of labels, the final prediction layer of the model can become too large and slow to train, even if the rest of the model is manageable. Our work introduces HASTE, a training method that makes this large prediction layer sparse in a hardware-friendly way. The key idea is to group related labels, such as similar products or topics, and let labels in the same group reuse the same small subset of model features. This reduces memory use and makes the computation better aligned with modern GPUs, instead of relying on random sparse access patterns that are often inefficient. We also handle frequent and rare labels differently to make training more stable. Overall, HASTE helps train large-label models faster and with less memory while keeping prediction quality close to dense models.