← all repositories
datawhalechina/torch-rechub

PyTorch recsys kit with 30+ models and an exit ramp to ONNX

Torch-RecHub exists to stop recsys teams from rewriting the same PyTorch trainer loops every time they want to test a new ranking or matching model.

1.2k stars Jupyter Notebook ML FrameworksDomain Apps
torch-rechub
Not currently ranked — collecting fresh signals.
star history

What it does Torch-RecHub is a PyTorch-based framework that bundles more than 30 recommendation models—covering ranking, matching, multi-task learning, and generative approaches—into a shared training and evaluation pipeline. It abstracts the repetitive parts of recsys development (data loading, trainer loops, metric calculation) so researchers and engineers can swap models without rewiring the surrounding infrastructure. The project also targets production handoffs by bundling ONNX export and optional integrations for vector indexing and big-data preprocessing.

The interesting bit The framework’s real appeal is its hardware agnosticism: it explicitly supports NVIDIA CUDA, AMD ROCm, and Huawei Ascend NPU backends, which is unusual for a research-oriented recsys toolkit. It also treats experiment tracking as a first-class citizen, offering built-in hooks for WandB, SwanLab, and TensorBoardX without forcing you to pick one.

Key highlights

  • Ships with 30+ out-of-the-box models, from classic DeepFM and DIN to newer generative architectures like HSTU.
  • Modular structure: separate trainers for CTR ranking, matching, and multi-task learning, plus reusable layers and feature engineering utilities.
  • Hardware coverage spans CPU, NVIDIA GPUs, AMD ROCm, and Huawei Ascend NPU.
  • Optional extras for production needs: ONNX export, FAISS/Annoy/Milvus vector retrieval, and PySpark-based data processing.
  • Built-in experiment tracking integrations for WandB, SwanLab, and TensorBoardX.

Caveats

  • The README’s “10 lines of code” claim is aspirational marketing; real usage still requires navigating config files, optional dependency groups, and hardware-specific PyTorch builds.
  • Several model categories are listed but the README truncates their details, so it is unclear how complete their implementations are compared to the thoroughly tabulated ranking models.

Verdict A solid starting point for recsys practitioners who want a unified PyTorch sandbox rather than copy-pasting model code from scattered papers. Skip it if you are looking for a fully managed serving platform; this is a training and export framework, not a hosted service.

Frequently asked

What is datawhalechina/torch-rechub?
Torch-RecHub exists to stop recsys teams from rewriting the same PyTorch trainer loops every time they want to test a new ranking or matching model.
Is torch-rechub open source?
Yes — datawhalechina/torch-rechub is open source, released under the MIT license.
What language is torch-rechub written in?
datawhalechina/torch-rechub is primarily written in Jupyter Notebook.
How popular is torch-rechub?
datawhalechina/torch-rechub has 1.2k stars on GitHub.
Where can I find torch-rechub?
datawhalechina/torch-rechub is on GitHub at https://github.com/datawhalechina/torch-rechub.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.