facebookresearch/ads_model_kernel_library

High-performance GPU kernels for Ads and Recsys model training, independently implemented and optimized for real-world workloads and model-specific input characteristics.

Python

57

22 commits

updated Oct 15, 2026

See the code

README

Ads Model Kernel Library

High-performance GPU kernels for Meta Ads Recommendation Systems, developed by Meta Ads AI. This library provides optimized GPU kernel implementations that have been published.

Projects

ProjectDescriptionArchitecturePathBlog
GDPAGeneralized Dot Product Attention kernelsBlackwell (SM100)gdpa/PyTorch Blog
TLX Block AttentionTriton TLX block attention kernelsBlackwell (SM100)block_attention/PyTorch Blog
TLX Multi-CTA Norm FusionTriton TLX fused matmul with RMSNorm and LayerNorm kernelsBlackwell (SM100)multi_cta_norm_fusion/PyTorch Blog
TLX GDPA MegakernelTriton TLX generalized dot product attention megakernelBlackwell (SM100)gdpa_megakernel/PyTorch Blog
TLX Jagged Flash AttentionTriton TLX jagged flash attention kernel for variable-length sequencesBlackwell (SM100)tlx_jfa/Coming soon
LP-FA4Low-precision FlashAttention-4 kernels with BF16 and MXFP8 APIsBlackwell (SM10x)lp_fa4/Coming soon

Requirements

  • Python >= 3.10
  • PyTorch >= 2.0
  • NVIDIA GPU with Hopper (SM90) or Blackwell (SM100) architecture
  • CUDA >= 12.0
  • nvidia-cutlass-dsl >= 4.1.0
  • fbtriton==3.6.1 for TLX packages

Installation

For CuteDSL GDPA:

pip install nvidia-cutlass-dsl>=4.1.0 torch einops

For TLX packages, see the project-specific environment.yml files or install the matching Triton build:

pip install fbtriton==3.6.1

Quick Start

See individual project READMEs for detailed usage:

Contributors

Meta Ads AI: Jiaqi Xu, Hongtao Yu, Dev Shanker, Junqing (Jacky) Zhou, Han Xu, Jake Siso, Xiaoyi Liu, Huayu Li, Markus Hoehnerbach, Manman Ren, Chao Chen, Hao Yan, Weinan Song

More contributors will be added as we publish more kernels.

License

Apache License 2.0. See LICENSE for details.

facebookresearch/ads_model_kernel_library

High-performance GPU kernels for Ads and Recsys model training, independently implemented and optimized for real-world workloads and model-specific input characteristics.

Python

57

22 commits

updated Oct 15, 2026

See the code

README

Ads Model Kernel Library

High-performance GPU kernels for Meta Ads Recommendation Systems, developed by Meta Ads AI. This library provides optimized GPU kernel implementations that have been published.

Projects

ProjectDescriptionArchitecturePathBlog
GDPAGeneralized Dot Product Attention kernelsBlackwell (SM100)gdpa/PyTorch Blog
TLX Block AttentionTriton TLX block attention kernelsBlackwell (SM100)block_attention/PyTorch Blog
TLX Multi-CTA Norm FusionTriton TLX fused matmul with RMSNorm and LayerNorm kernelsBlackwell (SM100)multi_cta_norm_fusion/PyTorch Blog
TLX GDPA MegakernelTriton TLX generalized dot product attention megakernelBlackwell (SM100)gdpa_megakernel/PyTorch Blog
TLX Jagged Flash AttentionTriton TLX jagged flash attention kernel for variable-length sequencesBlackwell (SM100)tlx_jfa/Coming soon
LP-FA4Low-precision FlashAttention-4 kernels with BF16 and MXFP8 APIsBlackwell (SM10x)lp_fa4/Coming soon

Requirements

  • Python >= 3.10
  • PyTorch >= 2.0
  • NVIDIA GPU with Hopper (SM90) or Blackwell (SM100) architecture
  • CUDA >= 12.0
  • nvidia-cutlass-dsl >= 4.1.0
  • fbtriton==3.6.1 for TLX packages

Installation

For CuteDSL GDPA:

pip install nvidia-cutlass-dsl>=4.1.0 torch einops

For TLX packages, see the project-specific environment.yml files or install the matching Triton build:

pip install fbtriton==3.6.1

Quick Start

See individual project READMEs for detailed usage:

Contributors

Meta Ads AI: Jiaqi Xu, Hongtao Yu, Dev Shanker, Junqing (Jacky) Zhou, Han Xu, Jake Siso, Xiaoyi Liu, Huayu Li, Markus Hoehnerbach, Manman Ren, Chao Chen, Hao Yan, Weinan Song

More contributors will be added as we publish more kernels.

License

Apache License 2.0. See LICENSE for details.

Significant stargazers

Stefan Schweter

585 followers · starred May 2026

Christopher Akiki

133 followers · starred May 2026