At a glance
On 2026-05-15 xAI updated xai-org/x-algorithm with the biggest open-source drop of how X ranks the For You feed since the original 2023 release. The architecture is dramatically simpler. The transparency is dramatically narrower.
5
Top-level directories
Down from 90+ Scala packages in 2023.
8
Pipeline stages
Ingest → hydrate → source → filter → score → select → serve.
19
Things the model predicts
From likes to reports, all scored in one transformer pass.
0
Production weights published
Every score-combination constant is in a redacted params file.
Five things to know
- One transformer does most of the work now. The 2023 system stitched together half a dozen specialised components. The 2026 system runs a single Grok-derived transformer called Phoenix across both candidate retrieval and ranking.
- The interest graph went from explicit to implicit. The 145,000 hand-curated community labels (SimClusters) are gone. Phoenix learns its own representation of your interests from your engagement history.
- Reports and blocks are predicted, not just enforced. The model is trained to predict the probability you will report, block, mute, or hide a post — and those probabilities count against the score with negative weights.
- The weight table is no longer public. The famous 2023 numbers (a reply-with-author-engagement is worth 150× a like, a report is worth roughly −738× a like) are history. Today’s weights live in a redacted
paramsfile that ships nowhere. - You cannot actually run this against real data. Production weights, training data, classifier weights, and the Kafka schemas needed to plug in are all out of scope. What ships is inference plumbing plus a 3 GB demo checkpoint.
The pipeline, one screen
Every request to your For You feed walks the same eight stages. Each stage is a Rust trait — sources fan out, hydrators enrich, filters drop, scorers rank, selectors mix, side-effects log.
The pipeline
Eight stages, one request
A single request to ForYouFeedServer walks eight stages inside home-mixer. Component counts are taken from the public xai-org/x-algorithm tree.
- Stage 01
Ingest
Thunder subscribes to a Kafka stream of post create/delete events and serves recent posts from accounts you follow.
KafkaRustIn-memory store - Stage 02
Query hydration
Twenty hydrators fan out in parallel to load your follow list, blocks, mutes, impression bloom filter, action sequence, and demographics.
20 hydratorsParallel fan-out - Stage 03
Candidate sourcing
Eleven sources run concurrently. Thunder supplies in-network candidates; Phoenix two-tower retrieval supplies out-of-network candidates. Ads, who-to-follow, topics, and Grok prompts contribute the rest.
11 sourcesThunder in-netPhoenix out-of-net - Stage 04
Candidate hydration
Seventeen hydrators enrich each candidate with core post data, engagement counts, media flags, author metadata, brand-safety verdicts, and visibility-filter verdicts.
17 hydratorsGizmoduckBrand safety - Stage 05
Filters
Seventeen filters drop ineligible candidates: too old, self-tweets, duplicates, previously seen, muted keywords, blocked or muted authors, visibility-filter flagged items.
17 filtersVF + ancillary VFDedup - Stage 06
Scoring
Phoenix transformer predicts probabilities for 19 actions per candidate. Weighted scorer combines them with redacted weights. OON scorer dampens out-of-network. Author-diversity scorer floors repeated authors.
Phoenix transformer19 action headsOON dampener - Stage 07
Selection
Top-k score selector sorts by combined score; blender selector interleaves ads and other source types into the final ranked list.
Top-kBlender - Stage 08
Serve + side effects
Fifteen side effects publish events to Kafka, update Redis caches, log A/B test bucket assignments, and update served-history.
15 side effectsKafka publishersRedis caches
Source · xai-org/x-algorithm/home-mixer (directory counts as of 2026-05-15)
The funnel
From a million posts to your screen
Every request runs through this funnel. The 1,500-candidate and 50/50 in-network ratio anchors come from X's 2023 engineering blog; the 2026 release does not reaffirm them. Read the absolute counts as directional.
Step 01
Eligible posts
Everything published on X across the last 48 hours.
Step 02
Working set
11 candidate sources fan out: Thunder (in-network), Phoenix retrieval (out-of-network), ads, who-to-follow.
Step 03
After filters
Age, dedup, blocks, mutes, muted keywords, visibility filter, previously-seen, previously-served.
Step 04
Scored
Phoenix predicts 19 action probabilities per candidate. Weighted scorer combines them into a single number.
Step 05
Selected
Sort by score, interleave ads and other sources, send to your device.
Anchors · 2023 X engineering blog. Verified architecture · 2026 home-mixer tree.
What changed since 2023
The 2023 release exposed roughly ninety Scala packages and two separate Python repos for the ML. The 2026 release fits in five directories. Most of the named subsystems people argued about publicly — SimClusters, TwHIN, tweepcred, the verified boost — are not in the new tree.
Then vs now
What moved, what was removed
Twelve concerns, side by side. The 2023 column reflects the original twitter/the-algorithm and twitter/the-algorithm-ml releases. The 2026 column reflects the public state of xai-org/x-algorithm as of 2026-05-15.
Source · diff of repo trees between twitter/the-algorithm (2023-03) and xai-org/x-algorithm (2026-05).
Honest caveat: absence from the public repo is not the same as absence in production. The new architecture would let any per-author boost live in one redacted weight without touching a line of visible code.
What the algorithm optimises for
For every candidate post, the model predicts nineteen different outcomes: will you like it, reply, repost, dwell, follow the author, share it via DM, copy the link — or report, block, mute, hit “not interested.” Each prediction gets a weight. The score is their weighted sum.
The 2026 weights are not public. The 2023 weights are, and they tell a clear story about what the system was being asked to value.
The weights, 2023
What X was asking the algorithm to maximise
The published weights from twitter/the-algorithm-ml/projects/home/recap. A reply that gets a reply from the author was worth 150× a like. A report was worth roughly −738× a like.
The bar lengths use a signed log scale so the +0.005 video-playback weight is visible next to the −369 report weight. Hover any bar for the raw value.
Source · twitter/the-algorithm-ml · 2023. The 2026 weights are in a non-public params crate.
Two patterns stand out. Replies that pull the original author back into the conversation were worth 150× a like — the system was being asked to optimise for conversation, not passive scrolling. And the report weight (−369) was so large that roughly one report in two thousand impressions would cancel out every like the post otherwise earned.
Worth pausing on the calibration logic too: the README explained that weights were set so each weighted probability contributes roughly the same amount to the score on average. Reports are rare, so the per-event weight has to be large to matter. The −369 number is less a moral judgement and more a probability rescaling.
Worked example
How one post becomes one score
For every candidate the ranker predicts the probability of each action a viewer might take, multiplies by the weight for that action, and sums. The example below uses 2023 weights and plausible probabilities for a single candidate — it illustrates the shape of the calculation, not 2026 production values.
Example only · 2026 weights are not public; probabilities are illustrative.
How Phoenix reads a request
The transformer takes a flat sequence: [you | your history | candidate posts]. The clever part is what each piece is allowed to look at. Each candidate can attend to you and to your full action history, but cannot attend to the other candidates in the batch. That keeps scoring independent — one post’s score never depends on what else happens to be queued up next to it.
Inside the ranker
Three inputs, one pass
The ranker reads three things in one pass: who you are, what you've done recently, and the candidate posts. The trick that makes serving cheap is that each candidate is allowed to look at you and at your history — but never at the other candidates. That way every candidate's score is independent of which other posts happen to be in the same batch.
Identity tokens
You
Who is requesting the feed. Hashed user ID, demographics, recently inferred topics.
127 history tokens
Your recent actions
The last few posts you liked, replied to, dwelled on, blocked, or reported — with their authors.
64 candidate tokens
Candidate posts
Each candidate is scored alongside every other candidate in one transformer pass.
Source · xai-org/x-algorithm/phoenix/recsys_model.py + phoenix/README.md
What you can and can’t learn from this release
The 2023 release was, for all its messiness, the most auditable open-source recommender at scale anyone had shipped. You could read the weight table, count the SimClusters communities a user belonged to, and follow specific signals through specific files. The 2026 release is cleaner code and a smaller window.
The audit gap
Published vs withheld
Mapping the release against a working clone. Five categories: code, model, config, data, infra. Green = published in xai-org/x-algorithm. Red = excluded.
- Orchestration code (home-mixer, candidate-pipeline)Code
Full Rust source for the For You pipeline framework, sources, hydrators, filters, scorers, selectors, side effects.
- Phoenix model architectureCode
Two-tower retrieval, transformer ranker, candidate-isolation attention mask, Grok-1-derived backbone.
- Phoenix mini-checkpoint (~3 GB)Model
Demo model via Git LFS. 128–256-dim embeddings, 2–4 layers, 4 attention heads. Inference-grade only.
- Grox task-execution engineCode
Python framework for running content-understanding workloads (spam, post-category, PTOS policy).
- Thunder in-memory post storeCode
Rust service that consumes post events from Kafka and serves the in-network candidate source.
- Production-scale Phoenix weightsModel
The full-size production model is not shipped. The mini-checkpoint is intentionally small.
- Engagement weights (xai_feature_switches::Params)Config
All score-combination constants (FAVORITE_WEIGHT, REPLY_WEIGHT, REPORT_WEIGHT, OON_WEIGHT_FACTOR, etc.) load from a params crate that is not in the repo.
- Training dataData
No engagement logs, no impressions, no labelled examples.
- Training loop, loss functionsCode
Public Python is inference plumbing; the training pipeline is not included.
- Grox classifier weightsModel
Only the execution engine is open; the spam / NSFW / PTOS classifier weights are not shipped.
- A/B experiment definitionsConfig
phoenix_experiments_side_effect.rs logs experiments but the experiment configs themselves are external.
- Kafka topic schemas, Redis schemas, proto IDLsInfra
No data-plane contracts. You cannot stand up a working clone against real X data.
- Tweepcred / author reputation codeCode
Present in 2023 dump; absent from xai-org/x-algorithm. Whether it still runs upstream is unverifiable.
- Fan-out / write pathCode
How posts reach Thunder (and the rest of the system) on the write side is not part of the release.
- Advertiser pipelineCode
Bidding, targeting, attribution code is not in the repo. Ads appear only as an inserted candidate source.
Source · enumerated from the xai-org/x-algorithm tree and from internal references in the published Rust crates.
Bottom line
2023 was a recommender system that happened to live at Twitter. 2026 is a Grok-shaped system that happens to do recommendations. The architecture is more elegant, the surface area is smaller, and the verifiable claims about live behaviour have narrowed. Both releases are technically the open-sourcing of the recommendation algorithm. They expose very different things.
Sources
Primary. xai-org/x-algorithm repo and READMEs (home-mixer, phoenix, grox, thunder). weighted_scorer.rs names the 19 action weights.
2023 baseline. twitter/the-algorithm-ml — recap README is the origin of the weight table in Visualization 03.
Independent commentary. Brigadir & Boykis — awesome-twitter-algo, Sol Messing (Knight First Amendment Institute), Sumit Kumar, akitaonrails analysis.
Academic. SimClusters (KDD 2020), TwHIN (arXiv:2202.05387), MaskNet (arXiv:2102.07619).
Caveat · The xai-org repo has three commits in its history (one in January 2026 and two on 2026-05-15). Architectural claims here are sourced to the public tree at that timestamp. Nothing in this post should be read as a claim about live X ranking decisions, only about what the published repo says.