AI Glossary / AI foundations / Intermediate

Tensor processing unit (TPU)

Tensor Processing Unit (TPU) (AI foundations)

Definition

A tensor processing unit (TPU) is a specialized computer chip designed to run the matrix and tensor arithmetic that sits at the core of machine learning. The term usually refers to chips built by Google and offered mainly through its cloud service. It is not a general-purpose processor, and it is not the same thing as a GPU, although both are used as AI accelerators.

What it means

Training and running modern AI models comes down to multiplying very large grids of numbers, over and over. A general-purpose processor can do this, but slowly. A TPU is built around that one job, so it can do far more of this kind of arithmetic for a given amount of time and power.

For a business reader, the practical point is that a TPU is a rental option, not a product you usually buy and install. You reach it through a cloud provider, and the choice between a TPU, a GPU or an ordinary processor affects cost, speed and which software tools you can use. Most business users never pick a chip directly. They pick a service, and the chip is a detail of how that service is run.

How it works

A neural network stores what it has learned as large arrays of numbers, called tensors. Each step of training or answering a question multiplies these arrays together and adds up the results. A TPU contains a dense block of arithmetic units arranged so that numbers flow through them in a steady pattern, which reduces the time spent moving data back and forth to memory.

TPUs also tend to use lower-precision number formats for much of this work. Using fewer digits per number makes each calculation cheaper and lets more of them run at once. For most model workloads the small loss in precision does not change the result in a way that matters, though this is a design trade-off and not a guarantee.

In practice, many TPU chips are linked together in groups so a single large job can be spread across them. Software frameworks translate a model into instructions the chip understands. Support varies by framework and by model type, so a model written for one kind of chip may need changes before it runs well on another.

Three practical examples

  • Finance team: An analytics group at a mid-sized lender trains a model to flag unusual payment patterns. They rent TPU capacity from a cloud provider for the training run, then switch it off when the model is finished, so they pay only for the hours used.
  • Retailer: An online store retrains a product recommendation model every week on fresh sales data. The retailer compares the cost of a TPU run against a GPU run for the same job and picks whichever finishes cheaper at acceptable speed.
  • Support desk: A software company runs a language model that drafts replies to customer tickets. Its cloud provider serves the model on TPU hardware behind the scenes, and the support team only sees faster draft times and a per-request price.

Think of it this way

A TPU is like a bakery oven built to bake only one size of loaf in huge batches: it turns out far more bread per hour than a home kitchen, but it is not much use for cooking anything else. The analogy stops working in that a TPU's flexibility is a matter of software support, and that support changes over time, whereas an oven's limits are physical and fixed.

Worked example

Suppose a team needs to run a training job that takes 100 hours on a rented GPU setup at $12 per hour. The GPU cost is 100 x 12 = $1,200.

The same job on rented TPU capacity finishes in 60 hours at $15 per hour. The TPU cost is 60 x 15 = $900.

The saving is 1,200 - 900 = $300, which is 300 / 1,200 = 25 percent. But the team also spends 10 hours of engineer time adapting the code to run on TPUs, valued at $80 per hour, which is 10 x 80 = $800. For a single job, the total TPU cost is 900 + 800 = $1,700, which is more than the GPU route at $1,200. If the same job will be repeated 5 times with the one-time code change, the TPU total is 5 x 900 + 800 = $5,300, against 5 x 1,200 = $6,000 for the GPU route. The switch only pays off with repeated use. All figures here are invented for illustration.

Illustrative case study

Fictional case: Harbor Lane Insurance, a small made-up insurer, wanted to retrain its claims-triage model each month. Its data team heard that TPUs could cut training cost and moved the job to rented TPU capacity without testing first.

The first run failed. One of the libraries the team relied on did not support the chip, and the engineers spent two weeks rewriting parts of the pipeline. The cost savings they had expected were wiped out by the extra labor, and the project ran late.

The team stepped back and ran a small benchmark on a sample of their own data, comparing cost per finished training run on both chip types. TPUs did win, but only after the code change was done once and reused. They documented the setup, kept a GPU fallback, and agreed to re-check the comparison each year, since prices and software support change.

Common misconceptions and mistakes

A TPU is always faster and cheaper than a GPU. Results depend on the model, the software and the provider's pricing, so the only reliable answer comes from testing your own workload.

TPUs are something a business buys and installs. They are mainly accessed as a rented cloud service, so most organizations never handle the hardware.

A TPU makes a model more accurate. A TPU changes how fast and how cheaply a model runs, not how good its answers are.

You need to understand TPUs to use AI at work. Most business users only choose a service or a vendor, and the chip is handled behind the scenes.

Business use

To start, ask your cloud or AI vendor which hardware sits behind a service and whether you have a choice. If you train or run your own models, benchmark a small, representative job on each chip type and compare cost per finished run, not just hourly price. Include the one-time cost of adapting code, since that can decide the outcome.

Measure total cost per job, time to finish, and how much engineering effort the switch needs. The risks are lock-in to one provider's tooling, software that is not fully supported, and capacity that may be limited at busy times. Prices and availability change, so treat any comparison as a snapshot and revisit it on a regular schedule.

People also ask

What is the difference between a TPU and a GPU?

A GPU is a flexible chip first built for graphics and now widely used for AI. A TPU is designed more narrowly around machine learning arithmetic. Both are accelerators, and which is better depends on the workload.

Can I buy a TPU for my office?

Generally not in the way you would buy a computer. TPUs are mostly offered as a rented cloud service, so you pay for time on them as needed.

Does my business need a TPU to use AI?

No. Most businesses use AI through software and services that handle the hardware for them. A TPU only becomes a decision if you train or host large models yourself.

Check your understanding

What kind of calculation is a TPU built to speed up?

Answer: The large matrix and tensor arithmetic used in training and running machine learning models.

In the worked example, why did the TPU not pay off for a single job?

Answer: The $300 saving on compute was outweighed by the $800 cost of adapting the code, so the TPU route cost $1,700 against $1,200.

In the worked example, what changed when the job was repeated 5 times?

Answer: The one-time $800 code change was spread over five runs, so the TPU total of $5,300 beat the GPU total of $6,000.

Why did Harbor Lane Insurance benchmark before committing?

Answer: Software support and real cost vary by workload, so testing on their own data showed whether the switch was worth the effort.

Related terms

  • AI accelerator
  • Training
  • Inference
  • Neural network
  • Cloud computing
  • Compute
  • Model Deployment
  • GPU

Learn next

Try listing which of your AI workloads are training and which are inference, since the hardware choice differs for each. Then read about GPUs and inference costs to see how cloud pricing is usually structured. Compute and model deployment are good follow-on topics.

  • Model Deployment
  • Training
  • Inference
  • Compute

More in AI foundations

  • Supervision signal - A supervision signal is the feedback a machine learning system uses to judge and improve its own outputs during training.
  • Synthetic media - Synthetic media is content such as images, audio, video or text that is generated or substantially altered by artificial intelligence rather than captured...
  • Technological singularity - The technological singularity is a hypothetical transition in which technological change, often associated with intelligence exceeding human capabilities...
  • Test set - A test set is a collection of examples reserved for assessing a model after its development choices have been made.
  • Text-to-image model - A text-to-image model is a machine learning system that generates a new image from a written description, called a prompt.
  • Token - A token is a unit of information that an AI model processes.

Sources

Google, Machine Learning Glossary: https://developers.google.com/machine-learning/glossary Goodfellow, Bengio and Courville, Deep Learning: https://www.deeplearningbook.org/ IBM, Think topics: https://www.ibm.com/think/topics The sources were consulted for the definition of tensors, accelerators and machine learning workloads; the examples, analogy, worked example and case are original educational illustrations. Checked 5 Nov 2026.

Previous: Tensor Parallelism Next: Tensor product network

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer