• About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us
TechTrendFeed
  • Home
  • Tech News
  • Cybersecurity
  • Software
  • Gaming
  • Machine Learning
  • Smart Home & IoT
No Result
View All Result
  • Home
  • Tech News
  • Cybersecurity
  • Software
  • Gaming
  • Machine Learning
  • Smart Home & IoT
No Result
View All Result
TechTrendFeed
No Result
View All Result

Construct and practice a recommender system in 10 minutes utilizing Keras and JAX

Admin by Admin
May 19, 2025
Home Software
Share on FacebookShare on Twitter


At the moment, we’re excited to announce the launch of Keras Recommenders, a brand new library that places state-of-the-art advice methods at your fingertips.

Energy digital experiences with advice programs

Suggestion programs energy lots of the interactions you’ve got with expertise right now. Open up any app in your cellphone and also you’ll doubtless end up interacting with a advice mannequin immediately, from the homefeed in your go-to social media platform to video ideas on YouTube to even the advertisements that pop up in your favourite recreation. Because the world of AI continues to evolve, delivering customized experiences is extra vital than ever. Giant language fashions cannot do all the things, and recommender programs are liable for creating many top-tier digital experiences right now.

To assist builders create performant and correct recommender programs, Keras Recommenders (KerasRS) incorporates a set of APIs with constructing blocks designed for duties equivalent to rating and retrieval. For instance, at Google, we use KerasRS to assist energy the feed in Google Play.

Set up KerasRS with JAX, TensorFlow, or PyTorch

To get began, pip set up the keras-rs bundle. Then set the backend to JAX (or TensorFlow or PyTorch). Now you’re in your approach to crafting your personal state-of-the-art recommender system.

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

import keras
import keras_rs

class SequentialRetrievalModel(keras.Mannequin):
    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(ok=10)
        self.loss_fn = keras.losses.CategoricalCrossentropy(from_logits=True)

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

Python

On this instance, we present a preferred retrieval structure through which we determine a set of candidate suggestions. KerasRS supplies all the things you want to implement this structure, with specialised layers, losses, and metrics designed particularly for recommender duties. You may as well comply with alongside in this colab pocket book.

And naturally, all these constructing blocks work with the usual Keras APIs of mannequin.compile to construct your mannequin and mannequin.match to simply configure your coaching loop.

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

Python

Within the coming months, we plan to launch the keras_rs.layers.DistributedEmbedding class for leveraging SparseCore chips on TPU for doing giant embedding lookups distributed throughout machines. Moreover, we are going to add standard mannequin implementations to our library constantly, making it even simpler to construct state-of-the-art recommender programs.

Discover the KerasRS documentation and examples

We additionally wish to spotlight all of the documentation we’ve for Keras Recommenders on our just lately redesigned keras.io web site. On keras.io/keras_rs, you will discover starter examples involving the basic Deep and Cross Community (DCN) and two-tower embedding mannequin that present the step-by-step processes for writing and coaching your first recommender. There are additionally extra superior tutorials, equivalent to SASRec, displaying an end-to-end instance of coaching a transformer mannequin.

Get began

Go to our web site right now for extra examples, documentation, and guides to construct your very personal advice system. You may as well browse the code and contribute at https://github.com/keras-team/keras-rs (be at liberty to offer it a star ⭐ too when you’re there!).

We stay up for seeing all the wonderful advice programs that get constructed with Keras Recommenders.


Acknowledgements

Shout-out to Fabien Hertschuh and Abheesht Sharma for constructing Keras Recommenders. We additionally wish to thank the Keras and ML Frameworks groups in addition to all our collaborators and management for serving to us pull this off.

Tags: BuildJAXKerasminutesrecommenderSystemtrain
Admin

Admin

Next Post
What cybercriminals do with their cash (Half 5) – Sophos Information

What cybercriminals do with their cash (Half 5) – Sophos Information

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Trending.

Discover Vibrant Spring 2025 Kitchen Decor Colours and Equipment – Chefio

Discover Vibrant Spring 2025 Kitchen Decor Colours and Equipment – Chefio

May 17, 2025
Reconeyez Launches New Web site | SDM Journal

Reconeyez Launches New Web site | SDM Journal

May 15, 2025
Safety Amplified: Audio’s Affect Speaks Volumes About Preventive Safety

Safety Amplified: Audio’s Affect Speaks Volumes About Preventive Safety

May 18, 2025
Flip Your Toilet Right into a Good Oasis

Flip Your Toilet Right into a Good Oasis

May 15, 2025
Apollo joins the Works With House Assistant Program

Apollo joins the Works With House Assistant Program

May 17, 2025

TechTrendFeed

Welcome to TechTrendFeed, your go-to source for the latest news and insights from the world of technology. Our mission is to bring you the most relevant and up-to-date information on everything tech-related, from machine learning and artificial intelligence to cybersecurity, gaming, and the exciting world of smart home technology and IoT.

Categories

  • Cybersecurity
  • Gaming
  • Machine Learning
  • Smart Home & IoT
  • Software
  • Tech News

Recent News

Namal – Half 1: The Shattered Peace | by Javeria Jahangeer | Jul, 2025

Namal – Half 1: The Shattered Peace | by Javeria Jahangeer | Jul, 2025

July 9, 2025
Awakening Followers Are Combating A Useful resource Warfare With Containers

Awakening Followers Are Combating A Useful resource Warfare With Containers

July 9, 2025
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us

© 2025 https://techtrendfeed.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Tech News
  • Cybersecurity
  • Software
  • Gaming
  • Machine Learning
  • Smart Home & IoT

© 2025 https://techtrendfeed.com/ - All Rights Reserved