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()
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train forwarder1121/twotower-yelp-baseline