X has open-sourced its "For You" feed algorithm today. On January 20, 2026, X's engineering team announced the release of the core recommendation system powering the For You timeline, available at [1]. This initiative enhances transparency, fulfilling Elon Musk's pledge from earlier this month to share the full code—including organic and ad recommendations—with updates every four weeks and developer notes. The repository, already garnering 6.3k stars and 1.1k forks, uses Rust (63%) and Python (37%), indicating it is the live production system blending in-network posts from followed accounts with machine learning-discovered out-of-network content.
The system is built around a Grok-based transformer model, derived from xAI's Grok-1. The pipeline, managed by "Home Mixer," begins with user context hydration (likes, follows, etc.), sources candidates via Thunder (in-network) and Phoenix (out-of-network retrieval), then performs ranking. The transformer predicts engagement probabilities—such as P(like), P(reply), P(repost), and even negatives like P(block)—to generate a final weighted score, incorporating author diversity and filters for spam or mutes. It relies solely on end-to-end machine learning without hand-engineered features for relevance.
Elon Musk described the algorithm as "dumb," but emphasized open-sourcing for collaborative improvements amid regulatory scrutiny on feeds and Grok's image features. Unlike the stagnant 2023 twitter/the-algorithm repository, this project is actively maintained (latest commit about 16 hours ago) under xai-org. While some reports suggest partial redaction, there are no major conflicts. Creators can now adjust strategies around engagement velocity and diversity to enhance visibility—valuable tools for optimizing posts.


