X com releases its algorithm as open-source on GitHub
X released the source code of its algorithm that generates content in the "For You" feed as open-source on GitHub. The algorithm combines posts from followed accounts with discovered posts using machine learning, filters content, and ranks posts using a transformer model. Making the code public enables transparency in the system and helps understand how posts are ordered in the feed.
It's great to see that some companies have the motivation to go against the grain. By releasing the algorithm for the X social network (formerly Twitter), it not only became more transparent but also gave the community the opportunity to participate in it.
What are the main sources of posts in X's content ranking algorithm?
The algorithm combines two sources: posts from accounts the user follows (in-network content) and posts from accounts the user does not follow, discovered through machine learning and other mechanisms (out-of-network content). Both sources are ranked together using the same model.
Which model is used to rank posts in the For You feed?
The Phoenix model reads the user's recent engagement history and predicts the likelihood of the user taking certain actions on each post. These predictions are combined into a single score using weights that determine how much each action (like, share, block, etc.) influences the ranking of posts.
What does the X algorithm GitHub repository contain besides ranking code?
The repository contains systems for visibility filtering, models for account evaluation, tools for image and video analysis, enforcement systems, and code for model training. It also includes the new Under the Hood tool that allows users to see aggregate statistics about labels on their account and posts.
- A workspace where humans and agents build together, on a relay you own. — github.com 74 % match
- LFM2.5-2.6B: small and capable local AI model — liquid.ai 72 % match
- Comparing AI for web creation - one prompt, 11 models, vastly different results — netlify.com 72 % match
- GitHub15
- Phoenix
- SimClusters
- Thunder
- Brazil 2026 Elections