← Back to list
Lex Fridman PodcastPodcast3 Jun 2019Source: lexfridman.comHost: Lex Fridman

Rajat Monga: TensorFlow

In plain words

This interview covers Rajat Monga, head of Google's TensorFlow team, discussing the framework's evolution. He sees TensorFlow's open-source decision as a defining moment for tech, proving open innovation works. He's optimistic about TensorFlow's future, aiming to run machine learning on any device. Key items: TensorFlow (41 million downloads, a top framework), Keras (integrated as TensorFlow 2.0's recommended API for simplicity), and PyTorch (seen as a helpful competitor that sped up TensorFlow's improvements).

AI SummaryAI-generated · may contain errors · verify against the original

This report is based on Lex Fridman’s interview with Rajat Monga, Engineering Director at Google and head of the TensorFlow team. It focuses on the evolution of TensorFlow from an internal Google Brain project to an open-source ecosystem. Key insights include: TensorFlow originated from the propriet

~11 min full read · 8 sections
Deep Analysis

At a Glance

Rajat Monga, Engineering Director at Google and head of the TensorFlow team, has been involved since the inception of Google Brain in 2011. The main thread of this episode traces the evolution of TensorFlow from Google's internal proprietary library, Disbelief, to the world's most popular deep learning framework, along with the design philosophy behind version 2.0. The most significant takeaway from the entire episode: Monga believes that the decision to open-source TensorFlow was a "defining moment for the tech industry," demonstrating that open innovation can succeed and inspiring many companies to open-source their code ("It showed that open innovation can be successful and inspire many companies to open source their code").


1. From Disbelief to TensorFlow: Early Validation of Scale

Rajat Monga believes that the core proposition of Google Brain at its inception was "whether deep learning research could be scaled using Google's compute and data"—and this proposition was validated within the first year or two.

  • Historical Context: In 2011, Andrew Ng and Jeff Dean launched the Google Brain project, when deep learning had not yet exploded but was already showing potential. The team first built a proprietary library called Disbelief, with the goal being "scale the compute, scale the data, it does better."
  • Early Achievements: Two key victories—collaboration with the speech research team and the famous "cat paper." Monga recalls that the team quickly scaled computation to hundreds and thousands of machines, and even recorded a run on 10,000 machines.
  • Inference: These early successes led Google internally to see that deep learning would "impact lots of things." Speech was the first product to be deployed, followed by images (Google Photos) and other products. By 2014, the team was convinced that "this is a big thing, it's going to grow."

2. The Open-Source Decision: A Turning Point from Internal Tool to Global Ecosystem

Monga points out that the idea to open-source TensorFlow came from Jeff Dean, driven by two core motivations: advancing research and lessons learned from Google's previous open-source efforts.

  • Mechanism Breakdown: As a research team, Google Brain had been publicly publishing research results, and open-sourcing software was a natural extension of "sharing research." At the same time, Google had previously open-sourced projects like Hadoop—these were based on Google's internal technology, but the open-source versions were far inferior to the internal ones. Monga says: "We knew the technology we built was much better... but what we ended up providing was an API on the edge, not as good, but people were already used to it." The goal of open-sourcing TensorFlow was "to make something better, truly help the community, and push a good standard forward."
  • Competitive Landscape: At the time, there were academic projects like Theano, Torch, and Caffe, but "the level was significantly different"—TensorFlow was clearly ahead in documentation and production deployment support. Monga acknowledges that the design of these existing libraries (e.g., graph vs. non-graph, Python interfaces) influenced TensorFlow's design decisions.
  • Data Support: TensorFlow was open-sourced in November 2015, and as of the interview, it had accumulated 41 million downloads. Monga admits: "41 million? I definitely didn't imagine that number at the time."

3. Design Philosophy of 2.0: Balancing Simplification, Unification, and Backward Compatibility

Monga emphasizes that the core goal of TensorFlow 2.0 was "simplification"—by making Keras the recommended API and enabling Eager Execution by default, significantly lowering the barrier to entry.

  • Decision Process for Keras Integration: François Chollet created Keras before joining Google, initially supporting only the Theano backend. After joining Google, he first worked in the research team and maintained Keras in his spare time. Monga's team found that "people seemed to like this API, and he was right here," so they borrowed him for a quarter to integrate it—only for that "quarter" to turn into over two years. Monga says the community had been complaining about "which API should I use?" and 2.0 had to "pick one," with Keras being the community's favorite.
  • Trade-offs in Backward Compatibility: Monga acknowledges that 2.0 would break some backward compatibility, but this was a "tricky balance." He proposes a design principle: "When you want to do something new, start with a clean slate to design it, and then figure out how to make other things compatible. If you worry about compatibility from the start, you'll never get to a good place."
  • Technical Challenges: The TensorFlow core remains "large and monolithic," and the team is working to break it into a more modular structure. Monga likens this to "changing the engine on a speeding car"—the system has been running for four years and is still evolving rapidly, making the overhaul extremely difficult.

4. Competition and Community: PyTorch's Push and Building the Open-Source Ecosystem

Monga candidly admits that competition from PyTorch accelerated TensorFlow's progress on Eager Execution—"Without PyTorch, it might have taken much longer."

  • Value of Competition: PyTorch focuses on research scenarios, "don't need to worry about graphs, let me just run things." Monga believes this competition was "definitely interesting," prompting TensorFlow to re-evaluate Eager Execution and ultimately achieve a "graph + eager" fusion in 2.0.
  • Key to Community Building: TensorFlow has 50,000 commits, nearly 10,000 pull requests, and 1,800 contributors. Monga summarizes the success factors: timing (synchronized with the deep learning explosion), listening to the community, accepting external contributions, and increasing transparency (RFC process, special interest groups). He says: "It's easy as a small project, but once it scales, you need to consider processes, documentation, and developer tools."
  • Ecosystem Vision: Monga defines TensorFlow's mission as "making machine learning run on every device with computing power"—from data centers to phones to tiny chips. The ecosystem includes TensorFlow.js, TensorFlow Lite, TensorFlow Extended (TFX), TensorBoard, etc., with the goal of making all components "work well together."

5. Team Management and Personal Reflections

Monga believes that in a project as massive as TensorFlow, "the team's output is far greater than the sum of individuals"—even a superstar can be a problem if they harm team collaboration.

  • Hiring Criteria: Beyond technical skills, Monga particularly values "motivation"—what the candidate wants to do and whether it aligns with the team's direction. "Even for junior engineers, if they lack the motivation to do the task at hand, no matter how smart they are, it's hard to succeed."
  • Hardest Part: Monga identifies it as "striking that fine balance"—speed vs. perfection, when to involve the community vs. when to make decisions alone, when to say "no." These balancing decisions are often the most difficult.
  • Reflections on the Advertising Business: Monga previously led Google's search advertising team. He views search ads as an extension of search—"the goal is to make information accessible, while ads make products or services accessible." He emphasizes that Google has minimum quality standards; ads that don't meet them are not shown, even at the cost of revenue. He predicts a future mix of "free + ads" and "paid" models.

Mentioned Positions

Position Guest Sentiment Key Data
TensorFlow (Framework) Bullish (Core Product) 41 million downloads, 50,000 commits, 1,800 contributors
Keras Bullish (Integrated as 2.0 Recommended API) Created by François Chollet, initially only supported Theano backend
PyTorch Neutral (Viewed as Beneficial Competitor) Accelerated the development of TensorFlow Eager Execution
TPU (Google Custom Chip) Bullish (Co-evolves with TensorFlow) Now in its 3rd generation
Google Cloud Neutral (TensorFlow Runs on Any Platform) Colab offers free TPU usage
Theano / Torch / Caffe Neutral (Historical Reference Points) Academic projects, less documentation and stability than TensorFlow

Judgments Worth Remembering

1. Rajat Monga: The open-sourcing of TensorFlow was a "defining moment for the tech industry" — It proved that open innovation can succeed and inspired many companies to open-source their code. Supporting evidence: Google had previously open-sourced projects like Hadoop, but the open-source versions were far inferior to the internal ones. TensorFlow's goal was to "build something better."

2. Rajat Monga: When designing new features, start with a "clean slate" before considering compatibility — "If you worry about compatibility from the start, you'll never get to a good place." Supporting evidence: This was the core principle the team used to handle backward compatibility issues in 2.0.

3. Rajat Monga: Competition from PyTorch accelerated the launch of Eager Execution — "Without PyTorch, it might have taken much longer." Supporting evidence: TensorFlow had discussed Eager Execution multiple times before, but competitive pressure ultimately pushed the team to make the final decision.

4. Rajat Monga: TensorFlow's mission is "to make ML run on every device with computing power" — From data centers to phones to the smallest chips. Supporting evidence: The ecosystem includes TensorFlow.js, TensorFlow Lite, TFX, etc., with the goal of making all components "work well together."

5. Rajat Monga: The team's output is far greater than the sum of its individuals — Even a superstar can be a problem if they harm team collaboration. Supporting evidence: In a project as massive as TensorFlow, individual capabilities are limited, and team collaboration is the key.

6. Rajat Monga: The Keras integration is a story of "one quarter turning into over two years" — François Chollet initially maintained Keras in his spare time while on Google's research team, and after the integration was borrowed, he never went back. Supporting evidence: Community confusion over "which API to use" was the key driver behind unifying the API in 2.0.

7. Rajat Monga: TensorFlow's core being "large and monolithic" is the biggest current technical challenge — The team is working to break it down into a more modular structure, likening it to "changing the engine on a speeding car." Supporting evidence: The system has been running for four years and is still evolving rapidly, making the overhaul extremely difficult.

8. Rajat Monga: Search ads have a minimum quality standard; substandard ads are not shown — "Even if it means losing revenue, we will not display low-quality ads." Supporting evidence: This is a core principle of Google's search ads, where ads are seen as an extension of search, not an interruption.