datawhalechina/torch-rechub

A Lighting Pytorch Framework for Recommendation Models, Easy-to-use and Easy-to-extend.

What it solves

Torch-RecHub provides a standardized, accessible library for building and studying recommendation systems. It solves the complexity of implementing diverse recommendation algorithms from scratch by offering a collection of over 30 pre-built PyTorch models, ranging from retrieval and ranking to multi-task and generative recommendation.

How it works

The framework provides a modular structure where users can define sparse, dense, and sequence features, then pass them into specialized trainers for different tasks. It supports training across various hardware, including NVIDIA GPUs, AMD GPUs, Huawei Ascend NPUs, and CPUs. Once trained, models can be exported to ONNX for production inference, and user or item embeddings can be integrated with vector search tools like Faiss or Milvus.

Who it’s for

  • Students and researchers looking to study recommendation models alongside their original papers.
  • Data scientists participating in recommendation competitions who need a reliable baseline.
  • Small engineering teams building recommendation services that require multi-GPU training and model export capabilities.

Highlights

  • Extensive model library including industry-standard architectures like DeepFM, DIN, MMoE, and SASRec.
  • Unified training and evaluation workflows for retrieval, ranking, and multi-task learning.
  • Hardware-agnostic training support for diverse compute environments.
  • Built-in experiment tracking through integrations with W&B, SwanLab, and TensorBoardX.
  • Support for ONNX export to facilitate deployment in production inference services.

Related

  • Project
  • Project
  • Project
  • Project
  • Project