Article Complete
AIM
Pytorch introduces TorchRec, an open source library to build recommendation systems
Pytorch introduces TorchRec, an open source library to build recommendation systems

Pytorch introduces TorchRec, an open source library to build recommendation systems

TorchRec was used to train a model with 1.25 million parameters that went into production in January.

Published Updated

Key takeaways

  • TorchRec is an open source library introduced by Meta for building advanced recommendation systems under PyTorch.
  • The library facilitates the creation of personalisation models using common sparsity and parallelism techniques.
  • TorchRec includes optimised kernels and modelling primitives, enhancing the efficiency of large-scale recommendation systems.
  • After two years of testing, TorchRec has successfully trained models with 1.25 million and 3 trillion parameters.
5 min

CEO Mark Zuckerberg has introduced TorchRec, an open source library for building state-of-the-art recommendation Systems under PyTorch, at Inside the Lab event. The new library provides common sparsity and parallelism primitives, enabling researchers to build state-of-the-art personalisation models and deploy them in production. It  includes a scalable low-level modelling foundation alongside rich batteries-included modules.

Meta initially targeted“two-tower” architectures with separate submodules to learn representations of candidate items and the query or context. Input signals can be a mix of floating point “dense” features or high-cardinality categorical “sparse” features that require large embedding tables to be trained. Efficient training of such architectures involves combining data parallelism that replicates the “dense” part of computation and model parallelism that partitions large embedding tables across many nodes.

The library includes optimised Recommendation Systems kernels that run on FBGEMM, a high-performance kernel library, modelling primitives such as jagged tensors and embedding bags, to create multinodal models using model parallelism. The PyTorch team has released TorchRec after close to two years in testing.

TorchRec was used to train a model with 1.25 million parameters that went into production in January and a 3 trillion parameter model that is expected to go into production. 

https://twitter.com/nirbaaytandon/status/1496558280289800195
https://twitter.com/datametrician/status/1496629924656029698
Membership

Stay ahead with AI insights.

Unlimited access to premium articles, exclusive analysis, and the stories shaping India's AI economy.

Subscribe now

AIM Americas

1190 Miraloma Way Suite P, Sunnyvale, CA 94085

AIM India

1st Floor, Sakti Statesman, Bellandur, Bengaluru – 560103

Β© 2026 AIM. All rights reserved.