Enhancing Performance and Scalability of Large-Scale Recommendation Systems with Jagged Flash Attention

Rengan Xu, Junjie Yang, Yifan Xu, Hong Li, Xing Liu +15 more
9/19/2024
cs.LGcs.AIcs.IR

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

The integration of hardware accelerators has significantly advanced the capabilities of modern recommendation systems, enabling the exploration of complex ranking paradigms previously deemed impractical. However, the GPU-based computational costs present substantial challenges. In this paper, we demonstrate our development of an efficiency-driven approach to explore these paradigms, moving beyond traditional reliance on native PyTorch modules. We address the specific challenges posed by ranking models' dependence on categorical features, which vary in length and complicate GPU utilization. We introduce Jagged Feature Interaction Kernels, a novel method designed to extract fine-grained insights from long categorical features through efficient handling of dynamically sized tensors. We further enhance the performance of attention mechanisms by integrating Jagged tensors with Flash Attention. Our novel Jagged Flash Attention achieves up to 9x speedup and 22x memory reduction compared to dense attention. Notably, it also outperforms dense flash attention, with up to 3x speedup and 53% more memory efficiency. In production models, we observe 10% QPS improvement and 18% memory savings, enabling us to scale our recommendation systems with longer features and more complex architectures.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{xu2024enhancing,
  title  = {Enhancing Performance and Scalability of Large-Scale Recommendation Systems with Jagged Flash Attention},
  author = {Rengan Xu and Junjie Yang and Yifan Xu and Hong Li and Xing Liu and Devashish Shankar and Haoci Zhang and Meng Liu and Boyang Li and Yuxi Hu and Mingwei Tang and Zehua Zhang and Tunhou Zhang and Dai Li and Sijia Chen and Gian-Paolo Musumeci and Jiaqi Zhai and Bill Zhu and Hong Yan and Srihari Reddy},
  year   = {2024},
  eprint = {2409.15373},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.15373v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.15373.svg)](https://codeofpaper.com/paper/2409.15373)

Discussion