CoolFace
Datasetpublic

dmckinney-ml/movie-recommender-artifacts

๐ŸŽฌ Two-Tower + FAISS + XGBoost Recommender โ€” Inference Artifacts This dataset contains the serialized inference artifacts for the Two-Stage Movie Recommendation System built using TensorFlow Recommenders, FAISS, and XGBoost. These artifacts support low-latency retrieval and ranking for the deployed Hugging Face Space: ๐Ÿ”— Space: two-tower-faiss-xgb-recommender ๐Ÿ“Œ Overview The recommendation system follows a two-stage architecture: Retrieval (Stage 1)โ€ฆ See the full description on the dataset page: https://huggingface.co/datasets/dmckinney-ml/movie-recommender-artifacts.

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes98downloads
Dataset Card

๐ŸŽฌ Two-Tower + FAISS + XGBoost Recommender โ€” Inference Artifacts

This dataset contains the serialized inference artifacts for the Two-Stage Movie Recommendation System built using TensorFlow Recommenders, FAISS, and XGBoost.

These artifacts support low-latency retrieval and ranking for the deployed Hugging Face Space:

๐Ÿ”— Space: two-tower-faiss-xgb-recommender


๐Ÿ“Œ Overview

The recommendation system follows a two-stage architecture:

Retrieval (Stage 1)

  • โ€”Two-tower neural embedding model (TensorFlow Recommenders)
  • โ€”Vector similarity search using FAISS (IndexFlatIP)
  • โ€”Cosine similarity implemented via inner-product normalization

Ranking (Stage 2)

  • โ€”XGBoost learning-to-rank model
  • โ€”Input features:
  • โ€”User embedding
  • โ€”Movie embedding
  • โ€”Genre one-hot features
Artifacts are structured for inference-only usage.

๐Ÿ—‚๏ธ Artifact Contents

FileDescription
faiss.indexFAISS index containing 87K+ movie embeddings
xgb_ranker.jsonTrained XGBoost ranking model
two_tower/user_model/Saved user embedding sub-model
two_tower/movie_model/Saved movie embedding sub-model
two_tower/genre_model/Saved genre projection model
two_tower/rating_model/Saved rating prediction head
movie_id_to_row.jsonMapping from MovieLens ID โ†’ FAISS index row
movies.parquetMovie metadata (title + features)

๐Ÿ“Š Training Data

Models were trained on the MovieLens 32M dataset:

  • โ€”32 million ratings
  • โ€”~87,585 movies
  • โ€”~200,948 users

Preprocessing performed using:

  • โ€”Apache Beam (Cloud Dataflow)
  • โ€”BigQuery
  • โ€”Kubeflow Pipelines (Vertex AI)

๐Ÿง  Embedding Details

PropertyValue
Embedding dimensionalityTunable (selected via Hyperband)
Vector spaceNormalized for cosine similarity
FAISS index typeIndexFlatIP
Total indexed items~87K

๐Ÿ“ˆ Ranking Model

PropertyValue
XGBoost objectiverank:pairwise
Evaluation metricNDCG
Hyperparameter tuningOptuna (50 trials)
Validation strategyUser-level cold-start split

๐Ÿš€ Intended Usage

These artifacts are designed for:

  • โ€”โœ… Inference inside the Hugging Face Space
  • โ€”โœ… Reproducible local experimentation
  • โ€”โœ… Demonstration of production-style ML architecture
โš ๏ธ Not intended for retraining without the full GCP pipeline.

๐Ÿ› ๏ธ Loading Example

python
import faiss
import xgboost as xgb
import tensorflow as tf

# FAISS index
index = faiss.read_index("faiss.index")

# XGBoost ranker
booster = xgb.Booster()
booster.load_model("xgb_ranker.json")

# Two-tower sub-models
user_model = tf.keras.models.load_model("two_tower/user_model")
movie_model = tf.keras.models.load_model("two_tower/movie_model")

๐Ÿ“„ License