අන්තර්ගත මාලාවක් Overview System Architecture Components Home Mixer Thunder Phoenix Candidate Pipeline How It Works Pipeline Stages Scoring and Ranking Filtering Key Design Decisions සමාලෝචන For You feed algorithm ප්රවේශයන්, ranking, සහ ප්රවේශයන් දෙකක්: In-Network (Thunder): ඔබ අනුගමනය කරන ගිණුම් වලින් ප් රකාශන Out-of-Network (Phoenix Retrieval): ගෝලීය corpus වලින් සොයාගත් ලිපි දෙදෙනාම එකට එකතු වෙලා පාවිච්චි කරනවා. , Grok මත පදනම් වන පරිවර්තකය ආකෘතිය, සෑම තැපැල් සඳහා ගනුදෙනු අවස්ථා අනාවැකි. Phoenix Grok මත පදනම් වන පරිවර්තකය ඔබගේ ගනුදෙනු ඉතිහාසය (ඔබ කැමති දේ, පිළිතුරු දී ඇති දේ, බෙදාහැර ඇති දේ, ආදිය) තේරුම් ගැනීමෙන් සහ ඔබ සඳහා අදාළ අන්තර්ගතය තීරණය කිරීම සඳහා එය භාවිතා කිරීමෙන් සියලුම බරපතල ගනුදෙනු කරයි. පද්ධති ආකෘතිය ┌─────────────────────────────────────────────────────────────────────────────────────────────┐ │ FOR YOU FEED REQUEST │ └─────────────────────────────────────────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────────────────────────────────┐ │ HOME MIXER │ │ (Orchestration Layer) │ ├─────────────────────────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ QUERY HYDRATION │ │ │ │ ┌──────────────────────────┐ ┌──────────────────────────────────────────────┐ │ │ │ │ │ User Action Sequence │ │ User Features │ │ │ │ │ │ (engagement history) │ │ (following list, preferences, etc.) │ │ │ │ │ └──────────────────────────┘ └──────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ CANDIDATE SOURCES │ │ │ │ ┌─────────────────────────────┐ ┌────────────────────────────────┐ │ │ │ │ │ THUNDER │ │ PHOENIX RETRIEVAL │ │ │ │ │ │ (In-Network Posts) │ │ (Out-of-Network Posts) │ │ │ │ │ │ │ │ │ │ │ │ │ │ Posts from accounts │ │ ML-based similarity search │ │ │ │ │ │ you follow │ │ across global corpus │ │ │ │ │ └─────────────────────────────┘ └────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ HYDRATION │ │ │ │ Fetch additional data: core post metadata, author info, media entities, etc. │ │ │ └─────────────────────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ FILTERING │ │ │ │ Remove: duplicates, old posts, self-posts, blocked authors, muted keywords, etc. │ │ │ └─────────────────────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ SCORING │ │ │ │ ┌──────────────────────────┐ │ │ │ │ │ Phoenix Scorer │ Grok-based Transformer predicts: │ │ │ │ │ (ML Predictions) │ P(like), P(reply), P(repost), P(click)... │ │ │ │ └──────────────────────────┘ │ │ │ │ │ │ │ │ │ ▼ │ │ │ │ ┌──────────────────────────┐ │ │ │ │ │ Weighted Scorer │ Weighted Score = Σ (weight × P(action)) │ │ │ │ │ (Combine predictions) │ │ │ │ │ └──────────────────────────┘ │ │ │ │ │ │ │ │ │ ▼ │ │ │ │ ┌──────────────────────────┐ │ │ │ │ │ Author Diversity │ Attenuate repeated author scores │ │ │ │ │ Scorer │ to ensure feed diversity │ │ │ │ └──────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ SELECTION │ │ │ │ Sort by final score, select top K candidates │ │ │ └─────────────────────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ FILTERING (Post-Selection) │ │ │ │ Visibility filtering (deleted/spam/violence/gore etc) │ │ │ └─────────────────────────────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────────────────────────────────┐ │ RANKED FEED RESPONSE │ └─────────────────────────────────────────────────────────────────────────────────────────────┘ කොටස් Home මිශ් ර Location: home-mixer/ එතුමා මතු කාලයේ මෙලොව උන්වහන්සේගේ රාජ් යය පිහිටුවීම සදහා නැවත එන සේක (එළිදරව් 5:5; 19:16). පහත සඳහන් පියවර සහිත පද්ධතිය: framework with the following stages: CandidatePipeline Stage Description Query Hydrators Fetch user context (engagement history, following list) Sources Retrieve candidates from Thunder and Phoenix Hydrators Enrich candidates with additional data Filters Remove ineligible candidates Scorers Predict engagement and compute final scores Selector Sort by score and select top K Post-Selection Filters Final visibility and dedup checks Side Effects Cache request info for future use Query හයිඩ්රොටර් Fetch user context (විශ්වාස ඉතිහාසය, පහත ලැයිස්තුව) මූලාශ් ර Thunder and Phoenix හි ප් රදර්ශනය හයිඩ්රොටෝ අමතර දත්ත සමඟ අයදුම්කරුවන් පුළුල් කිරීම ෆිල්ටර් සුදුසුකම් නැති ඡන්දදායකයින් ඉවත් කිරීම Scorers අවසාන ලකුණු ගණනය කිරීම සහ අවසන් ලකුණු ගණනය කිරීම තෝරාගැනීම ශ්රේණිගත කිරීම සහ තෝරා ගැනීම Top K තෝරා ගැනීමෙන් පසු ෆයිල්ටර් අවසාන පෙනුම සහ Dedup පරීක්ෂණ පිටුපස බලපෑම් අනාගත භාවිතය සඳහා Cache request information ශ් රීලනිප විධායක සමුළුවේ ප් රතිපත්තිය ( ) එය සෑම පරිශීලකයක් සඳහාම ranking කරන ලද ප්රකාශයන් ලබා දෙයි. ScoredPostsService Thunder Location: thunder/ සියලුම පරිශීලකයින්ගෙන් ප්රතිඵලදායි තැපැල් ගබඩාව සහ සැබෑ කාලය තුළ ගබඩා පයිබලය.It: Consumes post create/delete events from කැෆ්කාව සෑම පරිශීලකයක්ම මුල් පිටුව, ප්රතිචාර / ප්රතිචාර සහ වීඩියෝ පිටුව සඳහා ගබඩා කිරීම ඉල්ලන පරිශීලකයා අනුගමනය කරන ගිණුම් වලින් "in-network" post candidates සේවය කරයි ස්වයංක්රීයව තැපැල් තැපැල් තැපැල් තැපැල් තැපැල් තැපැල් තැපැල් Thunder මගින් අන්තර් ජාලයේ අන්තර්ගතය සඳහා sub-millisecond searchups ක්රියාත්මක කර ගත හැක.Thunder enables sub-millisecond searchups for in-network content without hitting an external database. ෆොනික් Location: phoenix/ ප් රධාන කාර්යයන් දෙකක් සහිත ML අංගය: Retrieval (Two-Tower ආකෘතිය) අන්තර්ජාලයෙන් පිටත අදාළ ලිපි: User Tower: පරිශීලක විශේෂාංග සහ සම්බන්ධතා ඉතිහාසය ඇතුළත් කිරීම Candidate Tower: ඔක්කොම Posts in Embeddings ක්ලික් කරන්න Similarity Search: Top-K posts via dot product similarity ලබා ගනී පරිවර්තකය (Transformer with Candidate Isolation) සෑම candidate එකකටම අනුකූලතාවය සලකා බලමු: User context (engagement history) සහ candidate posts ලෙස සලකා බලනවා. විශේෂ අවධානය පිරිනැමීම භාවිතා කරයි, එබැවින් අපේක්ෂකයින් එකිනෙකා වෙත පැමිණිය නොහැක සෑම ක්රියා වර්ගය සඳහාම ප්රතිඵල ප්රතිඵල (උදාහරණයක් ලෙස, ප්රතිචාර, repost, click, ආදිය) මේ උදාහරණයක් ලෙස ආකෘති ලේඛන. phoenix/README.md candidate pipeline පිලිබදව Location: candidate-pipeline/ ප්රතිපත්තිය පද්ධති ගොඩනැගීම සඳහා නැවත භාවිතා කළ හැකි පද්ධතිය.Define features for: Trait Purpose Source Fetch candidates from a data source Hydrator Enrich candidates with additional features Filter Remove candidates that shouldn't be shown Scorer Compute scores for ranking Selector Sort and select top candidates SideEffect Run async side effects (caching, logging) Source දත්ත මූලාශ්රයෙන් candidates fetch Hydrator අමතර විශේෂාංගයන් සමඟ candidates enrich Filter පෙන්නුම් නොකළ යුතු ඡන්දදායකයින් ඉවත් කිරීම Scorer Ranking ගණන ගණනය කිරීම Selector Top candidates තෝරාගැනීම SideEffect Async Side Effects (කැෂින් කිරීම, logging) මෙම ව්යුහය හැකි අවස්ථාවලදී මූලාශ්ර සහ හයිඩරෝස් සකස් කිරීම සහ සැකසුම් කළ හැකි වැරදි කළමනාකරණය සහ ලියාපදිංචි කිරීම සමඟ සමන්විතව ක්රියා කරයි. කොහොමද වැඩ කරන්නේ පයිප්පල් පියවර Query Hydration: පරිශීලකයාගේ මෑත ගනුදෙනු ඉතිහාසය සහ මෙටා දත්ත (උදාහරණයක් ලෙස පහත ලැයිස්තුව) : Retrieve candidates from: Candidate Sourcing : Recent posts from followed accounts (in-network) Thunder : ML-discovered posts from the global corpus (out-of-network) Phoenix Retrieval : Enrich candidates with: Candidate Hydration Core post data (text, media, etc.) Author information (username, verification status) Video duration (for video posts) Subscription status : Remove posts that are: Pre-Scoring Filters Duplicates Too old From the viewer themselves From blocked/muted accounts Containing muted keywords Previously seen or recently served Ineligible subscription content : Apply multiple scorers sequentially: Scoring : Get ML predictions from the Phoenix transformer model Phoenix Scorer : Combine predictions into a final relevance score Weighted Scorer : Attenuate repeated author scores for diversity Author Diversity Scorer : Adjust scores for out-of-network content OON Scorer තෝරා ගැනීම: ලකුණු අනුව වර්ගීකරණය සහ ඉහළම K candidates තෝරා ගැනීම Post-selection Processing: සේවය කළ යුතු තැපැල් candidates අවසාන අනුමත කිරීම Scoring සහ Ranking Phoenix Grok මත පදනම් වන පරිවර්තකය ආකෘතිය විවිධ සම්බන්ධතා වර්ග සඳහා අවදානම අනාවැකි කරයි: Predictions: ├── P(favorite) ├── P(reply) ├── P(repost) ├── P(quote) ├── P(click) ├── P(profile_click) ├── P(video_view) ├── P(photo_expand) ├── P(share) ├── P(dwell) ├── P(follow_author) ├── P(not_interested) ├── P(block_author) ├── P(mute_author) └── P(report) ඒ මේවා එකතුවෙලා අවසාන ප් රතිඵලයක් ගන්න: Weighted Scorer Final Score = Σ (weight_i × P(action_i)) ධනාත්මක ක් රියාවන් (උදාහරණයක් ලෙස, Repost, share) ඵලදායී බරක් ඇත. ඵලදායී ක් රියාවන් (බෝක්, Mute, Report) ඵලදායී බරක් ඇත, පරිශීලකයාට කැමති නොවන අන්තර්ගතය අඩු කර ගැනීම. ෆිල්ටර් ෆයිල්ටර් 2 ක් ඇතුළත් වේ: Pre-Scoring Filters: Filter Purpose DropDuplicatesFilter Remove duplicate post IDs CoreDataHydrationFilter Remove posts that failed to hydrate core metadata AgeFilter Remove posts older than threshold SelfpostFilter Remove user's own posts RepostDeduplicationFilter Dedupe reposts of same content IneligibleSubscriptionFilter Remove paywalled content user can't access PreviouslySeenPostsFilter Remove posts user has already seen PreviouslyServedPostsFilter Remove posts already served in session MutedKeywordFilter Remove posts with user's muted keywords AuthorSocialgraphFilter Remove posts from blocked/muted authors DropDuplicatesFilter Duplicate Post IDs ඉවත් කිරීම CoreDataHydrationFilter ප්රධාන මෙතැටෝ දත්ත හයිඩ්රැස් කිරීමට නොහැකි තැපැල් ඉවත් කිරීම AgeFilter සීමාවකට වඩා පැරණි ලිපි ඉවත් කිරීම SelfpostFilter පරිශීලකයාගේ තැපැල් ඉවත් කිරීම RepostDeduplicationFilter සමාන අන්තර්ගතයේ Reposts IneligibleSubscriptionFilter අයින් කරන්න paywalled අන්තර්ගතය පරිශීලකයා ප්රවේශ නොකරයි PreviouslySeenPostsFilter Remove posts user has already seen ප් රදර්ශනය PreviouslyServedPostsFilter සමුළුවේදී දැනටමත් සේවය කරන ලිපි ඉවත් කිරීම MutedKeywordFilter user's muted keywords සමග posts ඉවත් කිරීම AuthorSocialgraphFilter Bloked / Muted authors පිටපත් ඉවත් කිරීම Post-Selection Filters: Filter Purpose VFFilter Remove posts that are deleted/spam/violence/gore etc. DedupConversationFilter Deduplicate multiple branches of the same conversation thread VFFilter ඉවත් කරන ලද ප්රකාශයන් / ස්පෑම් / දූෂණය / ඉහළට ආදිය DedupConversationFilter එකම සන්නිවේදන අංග කිහිපයක් Deduplicate Key Design තීරණ 1.No අත් ඉංජිනේරු විශේෂාංග මෙම පද්ධතිය සම්පූර්ණයෙන්ම Grok මත පදනම් වන පරිවර්තකය මත රඳා පවතී පරිශීලක සන්නිවේදන සංකේත වලින් ගැලපෙන බව ඉගෙන ගැනීම සඳහා. අමුද්රව්ය ගැලපෙන බව සඳහා අමුද්රව්ය ඉංජිනේරු කිරීමක් නොමැත.This significantly reduces the complexity in our data pipelines and serving infrastructure 2.Candidate Isolation තනතුර Transformer inference තුළ, candidates can not attend to each other - only to the user context.This ensures the score for a post does not depend on which other posts are in the batch, making scores consistent and cacheable.මේක තැපැල් සඳහා ප්රතිඵල ප්රතිඵල ප්රතිඵල ප්රතිඵල ප්රතිඵල ප්රතිඵල ප්රතිඵල ප්රතිඵල ප්රතිඵල ප්රතිඵල ප්රතිඵල ප්රතිඵල. 3.Hash-Based Embeddings ආකෘති Retrieval සහ Ranking දෙකම Embedded Lookup සඳහා විවිධ hash Functions භාවිතා කරයි. 4.Multi-Action අනාවැකි එක් එක් "අධිමත්" ලකුණු අනාවැකි කිරීම වෙනුවට, ආකෘතිය බොහෝ ක් රියාවන් සඳහා අනාවැකි අනාවැකි කරයි. 5.Composable Pipeline Architecture යනු ඒ crate උපදෙස් පයිප්පයක් ඉදිකිරීම සඳහා ප්ලස්ටික් පද්ධතියක් සපයයි: candidate-pipeline ව්යාපාරික ප්රවේශයගෙන් pipeline execution සහ monitoring වෙන් කිරීම ස්වාධීන පියවර සහ ආකර්ෂණීය වැරදි කළමනාකරණය නව මූලාශ්ර, හයිඩ්රයිට්ස්, ෆයිල්ටර් සහ ලකුණු එකතු කිරීම පහසුය සටහන: පරිවර්තකය සම්මත කිරීම xAI විසින් Grok-1 විවෘත මූලාශ්රය අනුවාදයෙන් පරිවර්තනය කර ඇති අතර එය නිර්දේශ පද්ධති භාවිතය සඳහා අනුකූල කර ඇත. සටහන: පරිවර්තකය සම්මත කිරීම xAI විසින් Grok-1 විවෘත මූලාශ්රය අනුවාදයෙන් පරිවර්තනය කර ඇති අතර එය නිර්දේශ පද්ධති භාවිතය සඳහා අනුකූල කර ඇත. Grok-1 Open Source ප් රදර්ශනය මෙම ව් යාපෘතිය Apache License 2.0 යටතේ ලියාපදිංචි වේ. මෙම ව් යාපෘතිය Apache License 2.0 යටතේ ලියාපදිංචි වේ.