X Recommendation Algorithm: Social media content recommendation system
Open source implementation of X's recommendation algorithm for timeline and notification ranking.
Learn more about X Recommendation Algorithm
X Recommendation Algorithm is a distributed system of services and machine learning models that generates personalized content feeds for X's platform. The architecture combines multiple candidate sources including search indexes, graph-based traversals, and user interaction data, which are then processed through light and heavy ranking models. The system uses various ML frameworks including neural networks for ranking, graph embeddings (SimClusters, TwHIN), and real-time streaming processors for user actions. It serves the For You Timeline and Recommended Notifications by coordinating data processing, model inference, and content filtering across multiple microservices.
Multi-Source Candidates
Combines in-network search results, graph-based traversals using GraphJet, and follow recommendations to generate diverse candidate pools. Uses both real-time user interaction graphs and batch-processed social signals.
Layered Ranking
Implements a two-stage ranking system with light rankers for initial filtering and heavy neural network rankers for final scoring. Supports both timeline ranking and push notification relevance scoring.
Graph-Based Features
Leverages multiple graph representations including SimClusters for community detection, TwHIN for dense embeddings, and real-time interaction graphs. Provides graph features for user-user and user-content relationships.
See how people are using X Recommendation Algorithm
Related Repositories
Discover similar tools and frameworks used by developers
Megatron-LM
Library for training large transformer models with distributed computing and GPU-optimized building blocks.
Evo 2
Foundation model for DNA sequence generation and scoring.
Open WebUI
Extensible multi-LLM chat platform with RAG pipeline.
Stanford Alpaca
Research project that fine-tunes LLaMA models to follow instructions using self-generated training data.
YOLOv7
PyTorch single-stage detector with bag-of-freebies training optimizations.