X released its feed-ranking code on Tuesday, publishing the system that decides what appears in users’ “For You” feeds and why, after a public pledge from Elon Musk. According to a tweeted announcement, the team made the code public on GitHub, following Mr. Musk’s earlier promise to open-source the algorithm in seven days.
The company says the model uses a Grok-based transformer to rank posts by predicting likes, replies, and other actions. The implementation uses end-to-end machine learning without hand-engineered features and mixes Rust and Python for modular retrieval and scoring.
The system pulls content from followed accounts and ML-discovered out-of-network posts, then assigns scores predicting engagement. It balances followed sources and suggested posts while applying diversity limits and negative signals such as blocks.
Observers noted the move could reshape industry norms, with TknOps CEO Midhun Krishna M calling it a potential blueprint for recommendation systems (see TknOps.io). Grok analyzed the release and highlighted five key factors influencing visibility, including novelty and user history.
The disclosure arrives amid scrutiny of X’s AI tools and recent policy shifts, including revoked API access for engagement-rewarding apps and limits on Grok’s image editing features. “We know the algorithm is dumb and needs massive improvements, but at least you can see us struggle to make it better in real-time and with transparency.” (Ed. note: Musk said updates will repeat every four weeks.)

