← all repositories
tensorflow/recommenders-addons

TensorFlow's missing piece for billion-row embeddings

A community extension that makes TensorFlow's embedding layers grow dynamically, so you don't have to pre-size your vocabulary for every new user or item.

recommenders-addons
Velocity · 7d
+0.3
★ / day
Trend
steady
star history

What it does

TensorFlow Recommenders Add-ons (TFRA) adds dynamic embedding tables to TensorFlow. Instead of fixing vocabulary size upfront and hashing into a static matrix, embeddings grow as new keys appear during training. It targets search, recommendation, and advertising models where user/item counts shift constantly.

The interesting bit

The project swaps TensorFlow’s native embedding with pluggable key-value backends: CPU-side cuckoo hashing from CMU, GPU-side HierarchicalKV from NVIDIA Merlin, or Redis for external storage. Dense weights train synchronously via Horovod while sparse embeddings update asynchronously—a split that acknowledges the actual communication patterns in recommender training.

Key highlights

  • Embeddings expand on demand; no hash collisions from fixed-size tables
  • Pluggable storage: libcuckoo (CPU), HierarchicalKV (GPU), or Redis
  • Compatible with native TensorFlow optimizers, initializers, Checkpoint, and SavedModel
  • Supports TF Serving and Triton Inference Server
  • GPU support from version 0.2.0 onward; Apple Silicon supported with significant limitations

Caveats

  • Strict version lock with TensorFlow; pip-installed TF only—conda builds and custom-compiled TensorFlow risk crashes
  • Apple Silicon build lacks float16, Horovod sync training, HKV, file-system save/load, and warm-start utilities
  • Building from source requires Bazel 5.1.1 and matching CUDA/cuDNN toolchain

Verdict

Worth a look if you’re hitting vocabulary size limits or collision noise in large-scale recommenders. Skip it if you’re on conda TensorFlow, need Apple Silicon parity, or aren’t operating at the scale where static embeddings actually hurt.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.