ScriptedAlchemy/monolith-rs

Rust port of Tiktoks recommendation engine

Rust

10

333 commits

updated Mar 1, 2026

See the code

README

Monolith

What is it?

Monolith is a deep learning framework for large scale recommendation modeling. It introduces two important features which are crucial for advanced recommendation system:

  • collisionless embedding tables guarantees unique represeantion for different id features
  • real time training captures the latest hotspots and help users to discover new intersts rapidly

Monolith is built on the top of TensorFlow and supports batch/real-time training and serving.

Discussion Group

Join us at Discord

https://discord.gg/QYTDeKxGMX

Quick start

Build from source

Currently, we only support compilation on the Linux.

First, download bazel 3.1.0

wget https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-installer-linux-x86_64.sh && \
  chmod +x bazel-3.1.0-installer-linux-x86_64.sh && \
  ./bazel-3.1.0-installer-linux-x86_64.sh && \
  rm bazel-3.1.0-installer-linux-x86_64.sh

Then, prepare a python environment

pip install -U --user pip numpy wheel packaging requests opt_einsum
pip install -U --user keras_preprocessing --no-deps

Finally, you can build any target in the monolith. For example,

bazel run //monolith/native_training:demo --output_filter=IGNORE_LOGS

Demo and tutorials

There are a tutorial in markdown/demo on how to run distributed async training, and few guides on how to use the MonolithModel API here.

Contributors

ScriptedAlchemy

268 commits

zhangpiu

26 commits

hanzhi713

22 commits

zlqiszlqbd

17 commits

ScriptedAlchemy/monolith-rs

Rust port of Tiktoks recommendation engine

Rust

10

333 commits

updated Mar 1, 2026

See the code

README

Monolith

What is it?

Monolith is a deep learning framework for large scale recommendation modeling. It introduces two important features which are crucial for advanced recommendation system:

  • collisionless embedding tables guarantees unique represeantion for different id features
  • real time training captures the latest hotspots and help users to discover new intersts rapidly

Monolith is built on the top of TensorFlow and supports batch/real-time training and serving.

Discussion Group

Join us at Discord

https://discord.gg/QYTDeKxGMX

Quick start

Build from source

Currently, we only support compilation on the Linux.

First, download bazel 3.1.0

wget https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-installer-linux-x86_64.sh && \
  chmod +x bazel-3.1.0-installer-linux-x86_64.sh && \
  ./bazel-3.1.0-installer-linux-x86_64.sh && \
  rm bazel-3.1.0-installer-linux-x86_64.sh

Then, prepare a python environment

pip install -U --user pip numpy wheel packaging requests opt_einsum
pip install -U --user keras_preprocessing --no-deps

Finally, you can build any target in the monolith. For example,

bazel run //monolith/native_training:demo --output_filter=IGNORE_LOGS

Demo and tutorials

There are a tutorial in markdown/demo on how to run distributed async training, and few guides on how to use the MonolithModel API here.

Contributors

ScriptedAlchemy

268 commits

zhangpiu

26 commits

hanzhi713

22 commits

zlqiszlqbd

17 commits

Languages

Rust

37.5%

Python

35.4%

C++

23.9%

Starlark

2.0%