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
pnnx/pnnxpnnx is an open‑source tool that optimises PyTorch models and exports them to a lightweight, dependency‑free format (PNNX) and to ncnn/ONNX‑zero files, enabling fast inference on edge devices.
- Project
ankane/torch.rbTorch.rb is a Ruby gem that brings PyTorch-style deep learning to Ruby, powered by LibTorch (PyTorch's C++ engine). It provides tensors, operations, automatic differentiation (autograd), neural network modules, optimizers, and model save/load — all following the PyTorch API with Ruby naming conventions. Installation requires downloading LibTorch first and takes 5–10 minutes to compile; Windows is unsupported. GPU acceleration works via CUDA on Linux and MPS on Apple silicon. The project includes companion libraries for vision, text, audio, and more, plus tutorials and examples for getting started.
- Project
alibaba/TorchEasyRecTorchEasyRec is a PyTorch-based recommendation system framework that simplifies the development and production deployment of deep learning models for candidate generation, ranking, and multi-task learning.
- Project
MTSWebServices/RecToolsA Python library that streamlines the creation of recommender systems by providing a unified interface for various models, from matrix factorization to advanced Transformers.
- Project
meta-pytorch/torchtunetorchtune is a PyTorch‑based library that provides ready‑to‑run recipes and configs for fine‑tuning, RL‑HF, distillation, quantization‑aware training, and inference of many modern LLMs (Llama, Gemma, Qwen, Phi, etc.). It abstracts distributed training, memory‑saving tricks, and device support behind a simple CLI (`tune`) and YAML files, integrating with Hugging Face, torch‑ao, FSDP2, and logging tools. Though development stopped in 2025, it remains a practical, open‑source toolkit for LLM experimentation.