TensorFlow Recommenders Addons
Key Takeaways
TensorFlow Recommenders Addons is a collection of projects for large-scale recommendation systems, leveraging dynamic embedding technologies for training, evaluating, and serving large-scale models. The video demonstrates how to use TensorFlow Recommenders Addons for building recommendation systems with dynamic embedding.
Full Transcript
hi there welcome back to our video series of building recommendation systems with sensorflow my name is way and I'm a developer Advocate at Google in this video we are going to talk about our community projects tfra tensorflow recommenders add-ons tensorflow recommenders add-ons is a collection of projects related to large-scale recommendation systems for example with model size exceeding one terabytes either leverages Dynamic embedding Technologies to make it easier to train evaluate and serve large-scale models for recommendation systems tfra has been successfully deployed into production in multiple companies with significant positive outcome for example vip.com an e-commerce company deployed the tfra in production and was able to see a 10 updates in customer converter tfra is fully maintained by the secret recommenders add-ons Community with support from the tensorflow team the special interest group currently has more than 500 members and you are welcome to join if you are looking to build large-scale recommendation models one of the biggest benefits of tfra is dynamic embedding if you recall from our last video we mentioned using the hashing trick to accommodate new user IDs or item IDs in your model that's one way to do it but tfra gives you another way to handle this tfra allows you to dynamically increase or decrease the embedding table size which often achieves a better recommendation results than the static embedding in Native tensorflow this is particularly useful for the online learning scenario in which the data arrives in a sequential Manner and is used to update the model continuously instead of in a batched mode tfra is a fully attention 402 compliant and supports all the tensorflow native components such as optimizers initializers save the model and so on there are two sub-modules inside tfra Dynamic embedding and the embedding variables we are going to focus only on Dynamic embedding today at a high level tfra Dynamic embedding expresses sparse weights which is very common in recommendation models in two layers via an efficient key value stored under the hood this enables you to train large and dynamically changing embedding tables the key value store has different implementations for example cuckoo hash redis and rocksdb and the community is working to add even more options you should definitely experiment and pick the one that suits your needs given all this context now you may be wondering how to use dynamic embeddings it's actually pretty straightforward since tfra tries to comply with existing tensorflow API interfaces and preserve compatibility by hiding all the implementation details under the hood if you look at this code snippet you can see that you can directly use our original tensorflow initializers to initialize your variables the main apis for dynamic embedding are very similar to the native tensorflow apis in terms of naming semantic and functionality you can also reuse all Native optimizers to train your model all you need to do is to wrap one with Dynamic embedding optimizer now let's walk through a concrete example this example uses the Amazon review data set for digital video game and it is available in the tfra repository this data set has a number of customer reviews along with contextual information such as product title and review body the label is verified purchase which is a binary our goal is to predict the purchase based on the review plus the customer and the product features now let's build a neural network with Dynamic embedding to tackle those from the dynamic embedding module we use the field wise embedding layer which encodes the feature IDs into fields a field means the category of a feature ID intuitively you can think of a field as a bucket every feature ID belongs to a specific field slot and feature IDs in the same field will be mapped into an embedding vector next we Define a flattened layer and three dense layers in the core function we stack them together and this becomes our neural network with our model in place we can instantiate it and wrap the native tensorflow atom Optimizer with Dynamic embedding optimizer in the training Loop we encode the features to fit into the our model and run the training with a familiar fit method what's new here is that we can restrict the size of our embedding table in the restricted method we are telling Dynamic embedding that when the embedding table reaches Max size shrinking it down to 80 percent of Max size and go on from there again now we run the code with a maximating size of 50 000 and Max steps of 500. in the top graph you can see that our embedding table keeps growing until its size reaches 50 000 then size shrinks down to 40 000 which is eighty percent of the maximating size we specified after 250 steps the embedding size bounces between forty thousand and fifty thousand which is exactly what we specified in the command line and the restricted method so to summarize today we introduced the tensorflow recommenders add-ons to you tfra is particularly useful when you want to train large-scale recommendation models or when you want to dynamically resize the embedding tables with that thank you for watching this video and see you next time [Music] [Music]
Original Description
TensorFlow Recommenders Addons is a collection of projects related to large-scale recommendation systems. It leverages dynamic embedding technologies to make it easier to train, evaluate, and serve large scale models for search, recommendations, and advertising use cases. Wei Wei, a developer advocate, shares the main features, benefits, and how to use dynamic embeddings.
Resources:
TensorFlow Recommenders Addons → https://goo.gle/3HEGju1
TFRA Dynamic Embedding original RFC → https://goo.gle/3hAijgZ
TFRA Dynamic Embedding Amazon Review example → https://goo.gle/3uTECBn
Amazon Digital Video Game dataset → https://goo.gle/3huv9gN
FieldWiseEmbedding implementation → https://goo.gle/3FzYRc6
Subscribe to TensorFlow → https://goo.gle/TensorFlow
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from TensorFlow · TensorFlow · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
The TensorFlow YouTube Channel is Here!
TensorFlow
Answering Your TF Questions #AskTensorFlow
TensorFlow
Chatting With the TensorFlow Community (TensorFlow Meets)
TensorFlow
All About TensorFlow Code (Coding TensorFlow)
TensorFlow
TensorFlow: an ML platform for solving impactful and challenging problems
TensorFlow
Keynote (TensorFlow Dev Summit 2018)
TensorFlow
tf.data: Fast, flexible, and easy-to-use input pipelines (TensorFlow Dev Summit 2018)
TensorFlow
Eager Execution (TensorFlow Dev Summit 2018)
TensorFlow
Machine Learning in JavaScript (TensorFlow Dev Summit 2018)
TensorFlow
Training Performance: A user’s guide to converge faster (TensorFlow Dev Summit 2018)
TensorFlow
The Practitioner's Guide with TF High Level APIs (TensorFlow Dev Summit 2018)
TensorFlow
Distributed TensorFlow (TensorFlow Dev Summit 2018)
TensorFlow
Debugging TensorFlow with TensorBoard plugins (TensorFlow Dev Summit 2018)
TensorFlow
TensorFlow Lite (TensorFlow Dev Summit 2018)
TensorFlow
Searching Over Ideas (TensorFlow Dev Summit 2018)
TensorFlow
Reconstructing Fusion Plasmas (TensorFlow Dev Summit 2018)
TensorFlow
Nucleus: TensorFlow toolkit for Genomics (TensorFlow Dev Summit 2018)
TensorFlow
Open Source Collaboration (TensorFlow Dev Summit 2018)
TensorFlow
Swift for TensorFlow - TFiwS (TensorFlow Dev Summit 2018)
TensorFlow
TensorFlow Hub (TensorFlow Dev Summit 2018)
TensorFlow
Applied AI at The Coca-Cola Company (TensorFlow Dev Summit 2018)
TensorFlow
Real-World Robot Learning (TensorFlow Dev Summit 2018)
TensorFlow
TensorFlow Extended (TFX) (TensorFlow Dev Summit 2018)
TensorFlow
Project Magenta (TensorFlow Dev Summit 2018)
TensorFlow
TensorFlow Dev Summit 2018 - Livestream
TensorFlow
Introducing TensorFlow Lite (Coding TensorFlow)
TensorFlow
TensorFlow Dev Summit 2018 Highlights
TensorFlow
Jeff Dean, Head of AI at Google discusses the impact of ML (TensorFlow Meets)
TensorFlow
TensorFlow Mobile vs. TF Lite and More! #AskTensorFlow
TensorFlow
Using TensorFlow to enable research & production across many fields (TensorFlow Meets)
TensorFlow
Teaching TensorFlow for Deep Learning at Stanford University (TensorFlow Meets)
TensorFlow
TensorFlow Lite for Android (Coding TensorFlow)
TensorFlow
Using the tf.data API to build input pipelines (TensorFlow Meets)
TensorFlow
Training Models in the Cloud & the Benefits of AI Toolkits #AskTensorFlow
TensorFlow
Execute operations immediately with TensorFlow's Eager Execution (TensorFlow Meets)
TensorFlow
TensorFlow Lite for iOS (Coding TensorFlow)
TensorFlow
Get started with TensorFlow's High-Level APIs (Google I/O '18)
TensorFlow
TensorFlow for JavaScript (Google I/O '18)
TensorFlow
TensorFlow in production: TF Extended, TF Hub, and TF Serving (Google I/O '18)
TensorFlow
Get started with TensorFlow's High-Level APIs in 5 mins | Google I/O 2018
TensorFlow
TensorFlow and deep reinforcement learning, without a PhD (Google I/O '18)
TensorFlow
TensorFlow Lite for mobile developers (Google I/O '18)
TensorFlow
Advances in machine learning and TensorFlow (Google I/O '18)
TensorFlow
Distributed TensorFlow training (Google I/O '18)
TensorFlow
Classification using neural networks & ML regression models #AskTensorFlow
TensorFlow
TensorFlow and Keras in R - Josh Gordon meets with J.J. Allaire (TensorFlow Meets)
TensorFlow
Focus on your experiment with TensorFlow Estimators (TensorFlow Meets)
TensorFlow
How to get started with AI/ML, retraining models, & more! #AskTensorFlow
TensorFlow
TensorFlow - the deep learning solution for mobile platforms (TensorFlow Meets)
TensorFlow
MiniGo: TensorFlow Meets Andrew Jackson (TensorFlow Meets)
TensorFlow
The growth of TensorFlow with added support for JS & Swift (TensorFlow Meets)
TensorFlow
At the intersection of TensorFlow & nuclear physics (TensorFlow Meets)
TensorFlow
NVidia TensorRT: high-performance deep learning inference accelerator (TensorFlow Meets)
TensorFlow
Try TensorFlow.js in your browser (Coding TensorFlow)
TensorFlow
TensorFlow Hub: reusing machine learning modules (TensorFlow Meets)
TensorFlow
How to use TensorFlow in PyCharm (TensorFlow Tip of the Week)
TensorFlow
Training models faster with TensorFlow Hub (TensorFlow Meets)
TensorFlow
Prepare your dataset for machine learning (Coding TensorFlow)
TensorFlow
Using ML to predict insulin use for Type 1 Diabetes (TensorFlow Meets)
TensorFlow
TFX: an end-to-end machine learning platform for TensorFlow (TensorFlow Meets)
TensorFlow
More on: RAG Basics
View skill →Related Reads
📰
📰
📰
📰
Optimizing RAG at Scale: Chunking, Retrieval, and the Bayesian Search That Cut Latency 40%
Dev.to AI
Optimizing RAG at Scale: Chunking, Retrieval, and the Bayesian Search That Cut Latency 40%
Dev.to · Imus
Optimizing RAG at Scale: Chunking, Retrieval, and the Bayesian Search That Cut Latency 40%
Dev.to AI
Optimizing RAG at Scale: Chunking, Retrieval, and the Bayesian Search That Cut Latency 40%
Dev.to · Imus
🎓
Tutor Explanation
DeepCamp AI