[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-77456":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":13,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":15,"starSnapshotCount":15,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},77456,"x-algorithm-wiki","cclank\u002Fx-algorithm-wiki","cclank","Architecture wiki for the open-sourced X \"For You\" recommendation algorithm (xai-org\u002Fx-algorithm) — 21 source-anchored pages","https:\u002F\u002Flansu-wiki-web.lank.workers.dev\u002Fwiki\u002Fcclank\u002Fx-algorithm-wiki#index",null,"HTML",150,15,117,0,42.11,false,"main",true,[],"2026-06-12 04:01:21","# X For You 推荐算法 Wiki\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWiki-x--algorithm-blue?style=for-the-badge&logo=markdown\" alt=\"Wiki\" height=\"28\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSource-xai--org%2Fx--algorithm-green?style=for-the-badge&logo=github\" alt=\"Source\" height=\"28\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FKnowledge_Base-34_pages-orange?style=for-the-badge&logo=obsidian\" alt=\"Knowledge Base\" height=\"28\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FContent-6800%2B_lines-purple?style=for-the-badge\" alt=\"Content\" height=\"28\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FVerified-Source_Code-brightgreen?style=for-the-badge\" alt=\"Verified\" height=\"28\">\n  \u003Ca href=\"https:\u002F\u002Flansu-wiki-web.lank.workers.dev\u002Fwiki\u002Fcclank\u002Fx-algorithm-wiki#index\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLive_Preview-Open-1f6feb?style=for-the-badge&logo=cloudflare&logoColor=white\" alt=\"Live Preview\" height=\"28\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n> 基于 `xai-org\u002Fx-algorithm` 开源仓库源码(commit `0bfc279`,2026-05-15 release)的深度架构知识库。\n> 所有页面结论均追溯到源码,附 `文件:行号` 锚点;遵循 [LLM Wiki 模式](https:\u002F\u002Fgithub.com\u002Fxai-org\u002Fx-algorithm)。\n\n---\n\n## 这是什么\n\nX(Twitter)开源的 \"For You\" 信息流推荐系统由五大组件构成 —— 编排层、流水线框架、站内帖子库、ML 召回\u002F排序、内容理解服务。本 wiki 把这套系统的架构与实现拆成 34 个相互链接的页面:**11 页零代码的「白话导览」** + 23 页源码级技术页。\n\n- **想快速理解整套系统**:从白话导览读起 —— [how-it-works](guide\u002Fhow-it-works.md)\n- **想看技术细节**:入口页 [system-architecture](concepts\u002Fsystem-architecture.md)\n- **想免 clone 在线浏览**:[在线预览站点](https:\u002F\u002Flansu-wiki-web.lank.workers.dev\u002Fwiki\u002Fcclank\u002Fx-algorithm-wiki#index) —— 带侧栏导航\n\n---\n\n## 目录\n\n### 白话导览 · 先读这个(11 页,零代码)\n\n- [how-it-works](guide\u002Fhow-it-works.md) — 白话总览:一条帖子怎么一步步走进你的 For You\n- [the-five-components](guide\u002Fthe-five-components.md) — 五大组件速览:各组件是干嘛的、为什么需要它\n- [glossary](guide\u002Fglossary.md) — 术语速查表:召回 \u002F 排序 \u002F 双塔 \u002F 候选隔离… 一句话解释\n- [faq](guide\u002Ffaq.md) — 常见疑问:为什么刷到陌生人、广告怎么插进来、负反馈有什么用\n- [how-posts-are-picked](guide\u002Fhow-posts-are-picked.md) — 白话:帖子是怎么被选中的(选帖过程)\n- [operating-myths](guide\u002Foperating-myths.md) — 运营迷思 vs 源码真相:九个流行运营说法,逐条对源码行号\n- [posting-guide](guide\u002Fposting-guide.md) — 发帖指南:从算法机制反推发帖技巧,每条带源码出处与示例\n- [visibility-and-shadowban](guide\u002Fvisibility-and-shadowban.md) — 限流与 shadowban:源码级真相,民间说法逐条对质\n- [new-account-cold-start](guide\u002Fnew-account-cold-start.md) — 新号与冷启动:算法怎么区别对待新账号\n- [your-data](guide\u002Fyour-data.md) — 算法用了你的哪些数据:开源代码所示的输入清单\n- [open-source-vs-production](guide\u002Fopen-source-vs-production.md) — 开源版 vs 线上真实算法:已知差异清单\n\n### 总览(2 页)\n\n- [system-architecture](concepts\u002Fsystem-architecture.md) — For You 端到端:两层流水线嵌套、十阶段、召回+排序、五大组件\n- [end-to-end-dataflow](concepts\u002Fend-to-end-dataflow.md) — 端到端数据流:一条帖子从发布到被推荐,写入侧(异步)vs 读取侧(实时)\n\n### 在线服务 · Rust(6 页)\n\n- [candidate-pipeline-framework](concepts\u002Fcandidate-pipeline-framework.md) — 可复用流水线框架:7 个组件 trait、`enable()` 门、并行\u002F顺序执行模型\n- [home-mixer-orchestration](concepts\u002Fhome-mixer-orchestration.md) — 编排层:两条嵌套流水线、两个 gRPC 服务、候选源、数据模型\n- [scoring-and-ranking](concepts\u002Fscoring-and-ranking.md) — 3 个打分器:PhoenixScorer \u002F RankingScorer(加权+多样性+OON)\u002F VMRanker\n- [candidate-selection](concepts\u002Fcandidate-selection.md) — 选帖过程:TopK 选择 → 选后水合\u002F过滤 → 截断成型 → 外层组装\n- [filtering-pipeline](concepts\u002Ffiltering-pipeline.md) — 两道过滤:14 个预打分过滤器 + 3 个选后过滤器\n- [ads-blending](concepts\u002Fads-blending.md) — 广告混排:safe-gap \u002F partition-organic 两策略、品牌安全四档裁定\n\n### 站内库 · Thunder(2 页)\n\n- [thunder-in-network-store](concepts\u002Fthunder-in-network-store.md) — 站内帖子内存库:三套时间线、gRPC 服务、信号量限流、时效打分\n- [thunder-kafka-ingestion](concepts\u002Fthunder-kafka-ingestion.md) — Kafka 实时摄入:v1 feeder \u002F v2 serving 双 listener、反序列化、保留期裁剪\n\n### ML · Phoenix(5 页)\n\n- [phoenix-retrieval](concepts\u002Fphoenix-retrieval.md) — 双塔召回:用户塔 + 候选塔、L2 归一化、点积 top-K\n- [phoenix-ranking](concepts\u002Fphoenix-ranking.md) — Grok transformer 排序:`[用户|历史|候选]` 序列、多行为预测\n- [candidate-isolation-masking](concepts\u002Fcandidate-isolation-masking.md) — 候选隔离注意力掩码:候选互不可见,分数独立可缓存\n- [grok-transformer](concepts\u002Fgrok-transformer.md) — 移植自 Grok-1 的 transformer:RoPE、RMSNorm、GLU-FFN、GQA、软封顶,无 MoE\n- [hash-based-embeddings](concepts\u002Fhash-based-embeddings.md) — 哈希嵌入:多哈希函数、统一嵌入表、reduce 投影\n\n### 内容理解 · Grox(3 页)\n\n- [grox-architecture](concepts\u002Fgrox-architecture.md) — 内容理解服务:dispatcher\u002Fengine 三进程、Task\u002FPlan DAG、PlanMaster\n- [grox-classifiers](concepts\u002Fgrox-classifiers.md) — 基于 VLM 的内容分类器:垃圾、安全\u002FPTOS、banger 质量、回复打分\n- [multimodal-embedders](concepts\u002Fmultimodal-embedders.md) — 多模态帖子嵌入器:v5 主力(1024 维)与 v2 多模型实验型\n\n### 实体参考(5 页)\n\n- [candidate-pipeline](entities\u002Fcandidate-pipeline.md) — `CandidatePipeline` 执行器 trait,`execute()` 十阶段编排\n- [recsys-model](entities\u002Frecsys-model.md) — `PhoenixModel` 排序模型构件:配置、`block_*_reduce`、forward\n- [recsys-retrieval-model](entities\u002Frecsys-retrieval-model.md) — `PhoenixRetrievalModel` 召回模型构件:CandidateTower、用户塔\n- [post-store](entities\u002Fpost-store.md) — Thunder 的 `PostStore` 结构体:三套 DashMap、写入\u002F查询\u002F裁剪\n- [run-pipeline](entities\u002Frun-pipeline.md) — `run_pipeline.py` 端到端推理脚本:加载 → 召回 → 排序\n\n---\n\n## 统计信息\n\n| 指标 | 数值 |\n|------|------|\n| **白话导览页** | 11 |\n| **概念页面** | 18 |\n| **实体页面** | 5 |\n| **总行数** | 6800+ |\n| **源码版本** | `xai-org\u002Fx-algorithm` @ `0bfc279`(2026-05-15 release) |\n| **最后更新** | 2026-05-18 |\n\n## 内容特点\n\n- 每页含真实代码片段(Rust \u002F Python)、真实常量值、函数签名\n- 源码锚点附 `文件:行号`,结论可逐条追溯\n- Mermaid 流程图辅助说明架构与数据流\n- 每页附「设计决策」表,解释架构选型理由\n- 复杂页面附 FAQ;统一「相关页面」交叉引用\n- Wiki `[[links]]` 交叉链接,支持 Obsidian 导航\n- 核对中发现的源码\u002F文档出入已在 [changelog](changelog\u002F2026-05-16-initial-creation.md) 记录\n- 另有 11 页「白话导览」(`guide\u002F`):零代码、多类比,面向快速理解,与技术页双向链接\n\n## 使用方式\n\n- **Obsidian 本地知识库**:用 Obsidian 打开本目录,即可用 `[[wiki-link]]` 导航与关系图谱\n- **查询入口**:先读 [index.md](index.md) 定位相关页面,再读具体页\n- **规则**:页面格式、标签体系、命名规范见 [SCHEMA.md](SCHEMA.md)\n\n---\n\n*本 wiki 基于 `xai-org\u002Fx-algorithm` 源码深度分析生成,非 xAI 官方文档。*\n","X For You 推荐算法 Wiki 是一个基于 `xai-org\u002Fx-algorithm` 开源仓库的深度架构知识库，旨在解析Twitter的\"For You\"信息流推荐系统。该项目包含34个相互链接的页面，分为11页零代码的白话导览和技术细节页面，所有内容均追溯到源码并附有文件和行号锚点。其核心功能在于提供从系统概览到技术实现的全面解析，适合希望快速理解该推荐系统工作原理或深入研究其实现细节的技术人员、研究人员及开发者使用。无论是想了解系统整体运作机制还是具体组件如编排层、流水线框架等的工作方式，都能在此找到详尽资料。",2,"2026-06-11 03:55:30","CREATED_QUERY"]