C.W.K.
Stream
Lesson 01 of 04 · published

What Are TPUs?

~10 min · tpu, hardware, xla

Level 0Level 0
0 XP0/78 lessons0/17 achievements
0/100 XP to next level100 XP to go0% complete

The hardware that trains Gemini

Tensor Processing Units (TPUs) are Google's custom ASICs designed specifically for neural network matrix multiplication. They're purpose-built for the dominant operation in deep learning, and they do it extraordinarily fast.

HardwarePeak TFLOPS (bfloat16)Memory bandwidthUsed for
NVIDIA A100~3122 TB/sGPT-scale research
Google TPU v4 (per chip)~2751.2 TB/sGemini/PaLM training
TPU v4 Pod (4096 chips)~1.1 exaFLOPS~4.9 PB/sLLM pretraining

Key differences from GPUs you must know:

  • No eager execution — all compute must be inside @tf.function to be traced into a graph. model.fit handles this automatically.
  • bfloat16 native — same exponent range as float32, fewer mantissa bits. Set mixed_precision.set_global_policy('mixed_bfloat16').
  • XLA compilation required — all ops run through XLA, which fuses operations for efficiency. Some TF ops without XLA implementations fall back to CPU.
  • Large batch sizes — TPUs are most efficient with batch sizes of 1024–8192 per chip.

Free TPU access is available in Google Colab and Kaggle notebooks — great for learning without a cloud bill.

External links

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.