skillfed

tensorflow-recommenders

Tensorflow Recommenders, a TensorFlow library for recommender systems.

tensorflow-recommenders v0.7.7 203.9K downloads/30d#9,618 on PyPI2,026
Permissive license Apache 2.0 Active released

What it is and what it does

TensorFlow Recommenders is a Keras-based library for building recommender systems on top of TensorFlow. It abstracts away common patterns in recommendation workflows—embedding layers, ranking tasks, retrieval metrics—so you can focus on model architecture rather than boilerplate. The library is designed with a gentle learning curve but retains flexibility for complex models; it handles data preparation, model formulation, training, evaluation, and deployment as an integrated workflow.

The package depends on tensorflow, tf-keras, and absl-py, and is built to work seamlessly within the TensorFlow ecosystem. It provides task abstractions (like Retrieval) and metric classes (like FactorizedTopK) that simplify the definition of loss functions and evaluation criteria for recommendation problems. The library is actively maintained, with recent commits and a permissive Apache 2.0 license.

Use it for:

  • Build a matrix factorization model to predict user ratings for unseen movies or products.
  • Train a two-tower neural network for candidate retrieval in a large-scale recommendation system.
  • Evaluate ranking quality using built-in metrics like FactorizedTopK across a full candidate set.
  • Combine user and item embeddings with custom Keras layers to model complex interaction patterns.
  • Deploy a trained recommender model using TensorFlow's standard serving infrastructure.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

TensorFlow Recommenders provides a Keras-based library for building recommender system models, covering the full workflow from data preparation through training, evaluation, and deployment.

Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and offers a well-structured abstraction for a common ML task. It is suitable for developers building recommender systems who want to leverage TensorFlow's ecosystem without writing boilerplate. The Apache 2.0 license is permissive for commercial use.

Install

tensorflow-recommenders on PyPI

pip

pip install tensorflow-recommenders

uv

uv add tensorflow-recommenders

poetry

poetry add tensorflow-recommenders

Installing tensorflow-recommenders

Before you install

Low install friction with a pure-Python wheel. The package is actively maintained with recent commits and depends on core TensorFlow ecosystem libraries (tensorflow, tf-keras, absl-py), all of which are well-established.

License in practice

Apache 2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install tensorflow-recommenders

import tensorflow_recommenders as tfrs
import tensorflow as tf

class Model(tfrs.Model):
  def __init__(self):
    super().__init__()
    self.user_model = tf.keras.layers.Embedding(input_dim=2000, output_dim=64)
    self.item_model = tf.keras.layers.Embedding(input_dim=2000, output_dim=64)
    self.task = tfrs.tasks.Retrieval()
  
  def compute_loss(self, features, training=False):
    user_embeddings = self.user_model(features["user_id"])
    item_embeddings = self.item_model(features["item_id"])
    return self.task(user_embeddings, item_embeddings)

model = Model()
model.compile(optimizer=tf.keras.optimizers.Adagrad(0.5))

Requires TensorFlow 2.x to be installed separately; the package does not bundle TensorFlow itself.

Verify before relying

  • Whether the package supports distributed training across multiple GPUs or TPUs.
  • Performance characteristics and scalability limits for large-scale datasets.
  • Availability of pre-built models or transfer learning capabilities.

Package facts

License Apache 2.0 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 4 — absl-py, tf-keras, tensorflow, tensorflow-macos
Maintenance actively maintained — 203 days since the last release
Last repo commit
First released
Downloads 203,882/month — #9,618 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tensorflow_recommenders-0.7.7-py3-none-any.whl

Keywords: tensorflow, recommenders, recommendations

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

recommendation system tensorflowcollaborative filtering kerasneural recommender modelsmatrix factorization tensorflowranking and retrieval modelsuser item embeddingrecommender system framework
recommendation-engineneural-networkskeras-framework

More Software Development packages