// the find
bytedance/monolith
A Lightweight Recommendation System
Monolith is ByteDance's internal recommendation system framework, open-sourced after powering TikTok's feed ranking. It solves a specific problem that standard TensorFlow embedding tables have: hash collisions mean two different IDs can share the same embedding vector. Monolith uses a cuckoo hash-based approach to guarantee each ID gets a unique representation, combined with online/real-time training from Kafka streams.
The collisionless embedding table is a genuine technical contribution — at billion-ID scale, hash collisions in standard frameworks measurably degrade model quality, and this solves it without requiring you to pre-allocate a fixed vocabulary. The real-time training pipeline (Kafka → parameter server → serving) reflects production architecture that actually ran at TikTok scale, not a toy design. The codebase includes the full serving stack with a Go-based Kubernetes operator, so it's not just a training library abandoned at the checkpoint stage. There's a published arxiv paper (2209.07663) backing the design decisions, which is more than most ML infra repos offer.
Building from source requires Bazel 3.1.0 specifically — that's a four-year-old release, and the ecosystem has moved to Bzlmod; expect dependency resolution pain before you write a single line of model code. Linux-only compilation is a hard wall; no Mac support, no prebuilt wheels, no Docker image for the training components (the serving Docker is there but not the trainer). The codebase is still heavily shaped around ByteDance's internal data format (the `line_id` proto, the `PBDataset` format) — adapting it to your own data pipeline is non-trivial work, not a config change. Last meaningful commit activity appears to have tapered, and the Discord community is small; if you hit an obscure Bazel/TF compatibility issue, you're likely solving it alone.