February 23, 2020

310 words 2 mins read

How Criteo optimized and sped up its TensorFlow models by 10x and served them under 5 ms

How Criteo optimized and sped up its TensorFlow models by 10x and served them under 5 ms

Criteo's real-time bidding of ad spaces requires its TensorFlow (TF) models to make online predictions in less than 5 ms. Nicolas Kowalski and Axel Antoniotti explain why Criteo moved away from high-level APIs and rewrote its models from scratch, reimplementing cross-features and hashing functions using low-level TF operations in order to factorize as much as possible all TF nodes in its model.

Talk Title How Criteo optimized and sped up its TensorFlow models by 10x and served them under 5 ms
Speakers Nicolas kowalski (Criteo), Axel Antoniotti (Criteo)
Conference O’Reilly TensorFlow World
Conf Tag
Location Santa Clara, California
Date October 28-31, 2019
URL Talk Page
Slides Talk Slides
Video

When you access a web page, bidders such as Criteo must determine in a few dozens of milliseconds if they want to purchase the advertising space on the page. At that moment, a real-time auction takes place, and once you remove all the communication exchange delays, it leaves a handful of milliseconds to compute exactly how much to bid. In the past year, Criteo has put a large amount of effort into reshaping its in-house machine learning stack responsible for making such predictions—in particular, opening it to new technologies such as TensorFlow. Unfortunately, even for simple logistic regression models and small neural networks, Criteo’s initial TensorFlow implementations saw inference time increase by 100, going from 300 microseconds to 30 milliseconds. Nicolas Kowalski and Axel Antoniotti outline how Criteo approached this issue, discussing how Criteo profiled its model to understand its bottleneck; why commonly shared solutions such as optimizing TensorFlow build for the target hardware, freezing and cleaning up the model, and using accelerated linear algebra (XLA) ended up being lackluster; and how Criteo rewrote is models from scratch, reimplementing cross-features and hashing functions using low-level TF operations in order to factorize as much as possible all TensorFlow nodes in its model.

comments powered by Disqus