Two-Tower Recommendation Model (Yelp Baseline)
This repository contains a baseline Two-Tower recommendation model trained on the Yelp Dataset.
π Model Summary
- Architecture: Two-Tower (User Tower + Item Tower)
- User Tower: Embedding table trained end-to-end
- Item Tower: MLP taking pretrained POI embeddings (772-dim)
- Loss: Binary cross entropy with negative sampling
- Negative Samples per interaction: 10
- Training Epochs: 3 (CPU-based)
The model was trained as a foundational retrieval baseline to validate end-to-end recommendation pipeline feasibility.
π Included Files
twotower_model.ptβ Trained model weights.gitattributesβ Git LFS tracking file
β Limitations
This is a baseline model and achieves low performance due to:
- user_id-only embeddings (no behavioral or text features)
- CPU-only training (limited epochs)
- sparse interactions across many users
π Future Improvements
- Add user textual embeddings (LLM-based persona summaries)
- Add sequence-based behavioral embeddings
- Apply hard negative sampling & better contrastive losses
- Train on GPU for larger batch sizes & deeper models
π Usage Example (Python)
import torch
from model import TwoTowerModel # Your model class
model = TwoTowerModel(num_users=851921, emb_dim=128)
model.load_state_dict(torch.load("twotower_model.pt"))
model.eval()
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support