06
The scoring (the actual algorithm)
Each remaining post is scored by an ML model called Phoenix, a transformer based on Grok. For every post it predicts the probability you will: like, reply, repost, quote, click, expand the photo, watch the video, dwell, share, follow the author... and also the negative ones: not interested, block, mute, report.
Imagine a friend looking at a post and quietly betting: “There’s a 14% chance you’ll like this, a 2% chance you’ll reply, a 0.3% chance you’ll block them.” Then they sum it up with weights.
Under the hood: Each predicted probability has a weight. Positive actions add to the score; negative actions subtract. Then two correction passes run: author diversity attenuates posts when one author dominates the feed, and an OON scorer rebalances out-of-network content. phoenix/recsys_model.py · home-mixer/scorers/
A little deeper
Phoenix is a transformer. It reads your engagement history as a sequence, then for each candidate post predicts a vector of probabilities — one per action type.
A clever trick called “candidate isolation” forbids candidates from attending to each other during scoring. The result: each post’s score depends only on your context, so scores are independent and cacheable.
View on GitHub →Made by Henrique Martins