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
Top in AI & ML
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.
Related Reading
Guides and comparisons from the Greptile content library
Automated Code Review: How It Works & Best Tools [2026]
What automated code review is, how it differs from traditional and AI code review, the six types of code review automation tools, and why linters and SAST alone are no longer enough as agentic coding grows.
Flaky Tests: What Is a Flaky Test and How Do You Manage Them?
What flaky tests are, what causes them, how to detect them, and 12 ways to fix them. Plus why end-to-end tests are more prone to flakiness, and how seeing what actually happened during a run helps you tell a test problem from a code problem.
How Greptile Uses Infisical for Secrets Management
How Greptile uses Infisical to keep every secret in one store and let its AI review agents call customer services without ever holding the credentials.
The 7 Best AI Coding Tools for Complex Codebases
The best AI coding tools for complex codebases, ranked on accuracy, suggestion quality, and full-codebase context. See which ones you can actually trust.