Installation Guide¶
System Requirements¶
Hardware¶
Minimum:
- CPU: 4 cores
- RAM: 8 GB
- Storage: 20 GB free space
Recommended:
- CPU: 8+ cores
- RAM: 16+ GB
- GPU: NVIDIA GPU (8GB+ VRAM)
- Storage: 50+ GB SSD
Software¶
- Python 3.9 - 3.12
- CUDA 11.0+ (for GPU training)
- Git
Installation Methods¶
Method 1: Install from Source (Recommended)¶
Method 2: Full Installation¶
Includes optional dependencies like Triton, TorchRec, and PEFT:
Method 3: Development Installation¶
git clone https://github.com/phonism/genrec.git
cd genrec
pip install -e ".[dev]"
pre-commit install
Method 4: Dependencies Only¶
Core Dependencies¶
torch>=2.0.0- Deep learning frameworkaccelerate>=0.31.0- Distributed traininggin-config>=0.5.0- Configuration managementsentence-transformers>=3.0.0- Text encoding (for RQVAE)transformers>=4.40.0- Hugging Face Transformers (for LCRec, NoteLLM)wandb>=0.19.0- Experiment trackingpandas>=1.5.0,polars>=1.9.0- Data processingeinops>=0.8.0- Tensor operations
Optional Dependencies¶
GPU Support¶
Check CUDA¶
python -c "import torch; print(f'CUDA: {torch.cuda.is_available()}, Version: {torch.version.cuda}')"
Install CUDA-enabled PyTorch¶
# CUDA 11.8
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
# CUDA 12.1
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
Verify Installation¶
python -c "
from genrec.models import SASRec, HSTU, RqVae, Tiger, LCRec, Cobra
print('GenRec installed successfully')
"
Common Issues¶
ImportError: No module named 'torch'¶
CUDA out of memory¶
Reduce batch size via --gin "train.batch_size=16".