# TPU

> Google's chip designed specifically for the math of neural networks.

- Level: Intermediate
- Topics: Hardware, AI
- URL: https://tidbit.legios.com.ar/tpu/
- In Spanish: [TPU](https://tidbit.legios.com.ar/es/tpu/)

A **TPU** (Tensor Processing Unit) is a chip Google designed for one job: the arithmetic behind neural networks. Training and running an AI model comes down to multiplying huge tables of numbers, called **tensors** or matrices, over and over. A CPU can do it, slowly; a GPU does it well because it has thousands of small cores; a TPU goes a step further and is built almost entirely around that one operation.

Its heart is a **matrix unit**: a grid of multipliers where numbers flow from cell to cell, each one multiplying, adding and passing the result to its neighbor, so data is reused instead of being fetched from memory again and again. TPUs also work with lower-precision numbers, which are accurate enough for neural networks and much cheaper to compute. Google has run them in its data centers since 2015 for search, translation and its Gemini models, and rents them to other companies through Google Cloud.

You cannot buy a TPU for your PC. They come in large groups called **pods**, linked by very fast connections, and are available only as a cloud service. They are a clear example of a wider trend: big tech companies designing their own AI chips instead of relying only on NVIDIA's GPUs, to lower costs and control their supply. Each generation is faster, but the core idea stays the same.

## An analogy

A GPU is a big kitchen with many cooks who can make almost any dish. A TPU is a factory line built for a single recipe: it cannot do much else, but for that recipe each plate comes out fast and cheap.

## Keep in mind

- Designed by Google for the matrix math of neural networks.
- Used both to train models and to run them (inference).
- Available only through Google Cloud, in large groups called pods.
- Part of a trend of tech companies making their own AI chips.

## Go deeper

- [Introduction to Cloud TPU (Google Cloud)](https://cloud.google.com/tpu/docs/intro-to-tpu)
- [Tensor Processing Unit on Wikipedia](https://en.wikipedia.org/wiki/Tensor_Processing_Unit)

## Related terms

- [Chip](https://tidbit.legios.com.ar/semiconductor-chip/): A sliver of silicon carrying billions of tiny switches that compute and remember.
- [Google](https://tidbit.legios.com.ar/google/): The search company that gives most products away and makes its money on ads.
- [Neural network](https://tidbit.legios.com.ar/neural-network/): A pile of tiny math units that learns patterns from examples.
- [Training and inference](https://tidbit.legios.com.ar/training-and-inference/): Training builds the model once; inference is using it, millions of times a day.
- [Artificial intelligence](https://tidbit.legios.com.ar/artificial-intelligence/): Getting computers to do things that, until recently, only people could do.
- [CPU](https://tidbit.legios.com.ar/cpu/): The chip that runs your programs, one instruction after another, very fast.
- [GPU](https://tidbit.legios.com.ar/gpu/): The chip that does thousands of simple calculations at once.
- [Cores and threads](https://tidbit.legios.com.ar/cpu-cores-and-threads/): Why a CPU is really several processors, and why it can juggle even more tasks.
