Torch-RecHub Recommender Systems Practice
This directory introduces practical recommender system workflows with Torch-RecHub on AMD GPU / ROCm environments. The goal is not only to run several models, but to understand how a modern recommendation pipeline is organized: feature definitions, data generators, trainers, ranking and matching models, experiment tracking, and model export for serving.
Torch-RecHub is a lightweight PyTorch recommender system framework designed to make industrial-style recommendation experiments easier to reproduce. It provides 30+ mainstream models across ranking, matching, multi-task learning, and generative recommendation, together with unified data loading, training, evaluation, tracking, and ONNX export utilities.
Why It Is Here
In hello-rocm, this case focuses on the AMD GPU side of recommender systems. You will learn how to install ROCm-compatible PyTorch, run Torch-RecHub tutorials on AMD hardware, and connect model training with deployment-oriented steps such as ONNX export and lightweight retrieval validation.
The tutorials use small sample datasets so the full workflow can be tested locally. The metrics are for pipeline validation rather than production benchmarking.
What You Will Learn
- How CTR ranking models such as DeepFM turn dense and sparse features into click-through-rate predictions.
- How DIN models user behavior sequences with target-aware attention.
- How DSSM builds a two-tower matching model and uses item embeddings for retrieval.
- How MMOE shares experts across multiple recommendation objectives.
- How Torch-RecHub connects WandB, SwanLab, and TensorBoardX through a unified
model_loggerinterface. - How trained ranking and matching models can be exported to ONNX and validated with ONNXRuntime.
Torch-RecHub Highlights
- PyTorch-first design: uses PyTorch dynamic graphs and hardware acceleration, including CPU, NVIDIA CUDA GPU, AMD ROCm GPU, and Huawei Ascend NPU.
- Rich model library: includes 30+ recommendation models covering ranking, matching, multi-task learning, and generative recommendation.
- Modular components: feature definitions, layers, trainers, losses, metrics, and utilities are separated so models and datasets can be extended.
- Standardized workflow: provides unified data loading, training, evaluation, experiment tracking, and model export paths.
- Deployment awareness: supports ONNX export and serving-oriented validation, making it easier to move from training to inference.
- Experiment tracking: integrates WandB, SwanLab, and TensorBoardX through a consistent logging interface.