• About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
Saturday, August 23, 2025
mGrowTech
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
No Result
View All Result
mGrowTech
No Result
View All Result
Home Google Marketing

Build and train a recommender system in 10 minutes using Keras and JAX

Josh by Josh
June 8, 2025
in Google Marketing
0
Build and train a recommender system in 10 minutes using Keras and JAX
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter


Today, we are excited to announce the launch of Keras Recommenders, a new library that puts state-of-the-art recommendation techniques at your fingertips.

Power digital experiences with recommendation systems

Recommendation systems power many of the interactions you have with technology today. Open up any app on your phone and you’ll likely find yourself interacting with a recommendation model right away, from the homefeed on your go-to social media platform to video suggestions on YouTube to even the ads that pop up in your favorite game. As the world of AI continues to evolve, delivering personalized experiences is more important than ever. Large language models can’t do everything, and recommender systems are responsible for creating many top-tier digital experiences today.

To help developers create performant and accurate recommender systems, Keras Recommenders (KerasRS) contains a set of APIs with building blocks designed for tasks such as ranking and retrieval. For example, at Google, we use KerasRS to help power the feed in Google Play.

Install KerasRS with JAX, TensorFlow, or PyTorch

To get started, pip install the keras-rs package. Then set the backend to JAX (or TensorFlow or PyTorch). Now you are on your way to crafting your own state-of-the-art recommender system.

import os
os.environ["KERAS_BACKEND"] = "jax"

import keras
import keras_rs

class SequentialRetrievalModel(keras.Model):
    def __init__(self):
        self.query_model = keras.Sequential([
            keras.layers.Embedding(query_count, embed_dim),
            keras.layers.GRU(embed_dim),
        ])
        self.candidate_model = keras.layers.Embedding(candidate_count, embed_dim)
        self.retrieval = keras_rs.layers.BruteForceRetrieval(k=10)
        self.loss_fn = keras.losses.CategoricalCrossentropy(from_logits=True)

    def call(self, inputs):
        query_embeddings = self.query_model(inputs)
        predictions = self.retrieval(query_embeddings)
        return {"query_embeddings": query_embeddings, "predictions": predictions}

Python

In this example, we show a popular retrieval architecture in which we identify a set of candidate recommendations. KerasRS provides everything you need to implement this architecture, with specialized layers, losses, and metrics designed specifically for recommender tasks. You can also follow along in this colab notebook.

And of course, all these building blocks work with the standard Keras APIs of model.compile to build your model and model.fit to easily configure your training loop.

model.compile(
    loss=keras_rs.losses.PairwiseHingeLoss(),
    metrics=[keras_rs.metrics.NDCG(k=8, name="ndcg")],
    optimizer=keras.optimizers.Adagrad(learning_rate=3e-4),
)
model.fit(train_ds, validation_data=val_ds, epochs=5)

Python

In the coming months, we plan to release the keras_rs.layers.DistributedEmbedding class for leveraging SparseCore chips on TPU for doing large embedding lookups distributed across machines. Additionally, we will add popular model implementations to our library continuously, making it even easier to build state-of-the-art recommender systems.

Explore the KerasRS documentation and examples

We also want to highlight all the documentation we have for Keras Recommenders on our recently redesigned keras.io website. On keras.io/keras_rs, you can find starter examples involving the classic Deep and Cross Network (DCN) and two-tower embedding model that show the step-by-step processes for writing and training your first recommender. There are also more advanced tutorials, such as SASRec, showing an end-to-end example of training a transformer model.

Get started

Visit our website today for more examples, documentation, and guides to build your very own recommendation system. You can also browse the code and contribute at https://github.com/keras-team/keras-rs (feel free to give it a star ⭐ too while you’re there!).

We look forward to seeing all the excellent recommendation systems that get built with Keras Recommenders.

READ ALSO

Ruth Porat on AI and its applications in finance

Google’s AI-stuffed Pixel 10 event


Acknowledgements

Shout-out to Fabien Hertschuh and Abheesht Sharma for building Keras Recommenders. We also want to thank the Keras and ML Frameworks teams as well as all our collaborators and leadership for helping us pull this off.



Source_link

Related Posts

Ruth Porat on AI and its applications in finance
Google Marketing

Ruth Porat on AI and its applications in finance

August 23, 2025
Google’s AI-stuffed Pixel 10 event
Google Marketing

Google’s AI-stuffed Pixel 10 event

August 22, 2025
New Gemini feature and model updates for Pixels, smartphones
Google Marketing

New Gemini feature and model updates for Pixels, smartphones

August 22, 2025
Google made it easier to edit your Drive videos
Google Marketing

Google made it easier to edit your Drive videos

August 22, 2025
Train a GPT2 model with JAX on TPU for free
Google Marketing

Train a GPT2 model with JAX on TPU for free

August 22, 2025
Google shares Made by Google 2025 news in public NotebookLM notebook
Google Marketing

Google shares Made by Google 2025 news in public NotebookLM notebook

August 22, 2025
Next Post
New Orleans Local’s Guide: Food, Music, and More

New Orleans Local's Guide: Food, Music, and More

POPULAR NEWS

Communication Effectiveness Skills For Business Leaders

Communication Effectiveness Skills For Business Leaders

June 10, 2025
15 Trending Songs on TikTok in 2025 (+ How to Use Them)

15 Trending Songs on TikTok in 2025 (+ How to Use Them)

June 18, 2025
7 Best EOR Platforms for Software Companies in 2025

7 Best EOR Platforms for Software Companies in 2025

June 21, 2025
Trump ends trade talks with Canada over a digital services tax

Trump ends trade talks with Canada over a digital services tax

June 28, 2025
Refreshing a Legacy Brand for a Meaningful Future – Truly Deeply – Brand Strategy & Creative Agency Melbourne

Refreshing a Legacy Brand for a Meaningful Future – Truly Deeply – Brand Strategy & Creative Agency Melbourne

June 7, 2025

EDITOR'S PICK

Cost to Develop an App in Canada – A Comprehensive Guide

Cost to Develop an App in Canada – A Comprehensive Guide

July 25, 2025
Employee-Generated Content: Creating a Video First Strategy

Employee-Generated Content: Creating a Video First Strategy

June 1, 2025
Coffee Candy Brand Kopiko Fuels Gen Z Love (and Rides) in L.A.

Coffee Candy Brand Kopiko Fuels Gen Z Love (and Rides) in L.A.

June 12, 2025
How to Develop an Astrology App Like Co-star: Step-by-Step Guide

How to Develop an Astrology App Like Co-star: Step-by-Step Guide

August 18, 2025

About

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Follow us

Categories

  • Account Based Marketing
  • Ad Management
  • Al, Analytics and Automation
  • Brand Management
  • Channel Marketing
  • Digital Marketing
  • Direct Marketing
  • Event Management
  • Google Marketing
  • Marketing Attribution and Consulting
  • Marketing Automation
  • Mobile Marketing
  • PR Solutions
  • Social Media Management
  • Technology And Software
  • Uncategorized

Recent Posts

  • The US government is taking an $8.9 billion stake in Intel
  • Built for Speed, Designed for Scale: The Tech Architecture Powering VDO Shots
  • Seeing Images Through the Eyes of Decision Trees
  • What Is Omnichannel Pricing? How to Build a Winning Strategy
  • About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?