This document describes the Compute Engine instances in the
accelerator-optimized machine family that have Tensor Processing Units (TPUs).
TPUs are Google's custom-developed, application-specific integrated
circuits (ASICs) that are optimized specifically for artificial intelligence
(AI) and machine learning (ML) workloads.

Compute Engine supports the following TPU versions:

- TPU7x
- TPU v6e
- TPU v5p

Each machine type within a version has a specific topology and a number of
TPU chips attached.

## Fundamentals of TPU architecture

Understanding the fundamentals of TPU architecture helps you to choose the
TPU version and machine type for your workload.

- **TPU chip**: A TPU chip is a specialized accelerator designed by Google for
  machine learning. Each TPU chip contains one or more TensorCores to handle
  massive matrix operations. Each TensorCore consists of one or more
  matrix-multiply units (MXUs), which use a systolic array architecture to
  perform thousands of multiply-accumulate operations per cycle without
  constant memory access. While primarily used for high-speed matrix
  processing, the TPU chip also includes vector and scalar units for general
  computation and control flow operations.

- **TPU Pod**: A TPU Pod is a contiguous set of TPUs grouped together over a
  specialized network. The number of TPU chips in a TPU Pod is dependent on the
  TPU version.

- **TPU instance**: a Linux compute instance that runs on a TPU host
  and has direct access to the underlying TPU hardware, offering access to
  high-performance libraries, SSH connectivity, and runtime debug logs.

- **TPU slice**: A logical group of interconnected TPU chips, accessed through
  one or more TPU instances. Slices have one of the following scopes:

  - **Single-host slice**: A slice consisting of one host machine. In general, this maps to one TPU instance.
  - **Multi-host slice**: A slice consisting of multiple TPU instances interconnected using a high-speed inter-chip interconnect (ICI).
- **TPU cube**: A 4x4x4 topology of interconnected TPU chips. This is only
  applicable to 3D topologies.


- **SparseCore**: SparseCores are dataflow processors that accelerate models
  using sparse operations. A primary use case is accelerating recommendation
  models, which rely heavily on embeddings.

- **TPU versions**: The exact architecture of a TPU chip depends on the TPU
  version that you use. Each TPU version also supports different slice sizes
  and configurations.

For information about how TPUs work, see [TPU architecture](https://docs.cloud.google.com/tpu/docs/system-architecture-tpu-vm.md.txt)
document in the Cloud TPU documentation.

## Recommended TPU versions by workload types

Choosing the right TPU model depends on the computational characteristics,
memory requirements, and scalability needs of your workload. Select one of the
following tabs to view the recommendations.

### AI/ML training

- **Pre-training large models**: training massive models from scratch.
  These workloads are compute and communication bound.

  - Required TPU capability: high peak FLOPS, low-precision support, and high interconnect bandwidth.
  - Recommended TPU versions:
    - [TPU7x](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#tpu7x). This version provides high FP8 performance.
    - [TPU v5p](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#v5p). This version supports large-scale cluster configurations.
- **Fine-tuning and distilling models**: adapting existing models using
  parameter-efficient methods or training smaller model variants.

  - Required TPU capability: moderate compute and sufficient memory capacity.
  - Recommended TPU versions:
    - [TPU v6e](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#v6e). This version is cost-efficient for standard training tasks.
    - [TPU7x](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#tpu7x). This version offers high performance for large-scale fine-tuning.

### AI/ML inference

- **Serving models online**: deploying models for real-time interaction
  where low latency is critical. These workloads are memory-bandwidth
  bound during the sequential generation of tokens.

  - Required TPU capability: high HBM bandwidth and large on-chip SRAM to minimize data retrieval latency.
  - Recommended TPU versions:
    - [TPU v6e](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#v6e). This version is optimized for cost-effective serving at scale.
    - [TPU7x](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#tpu7x). This version provides high HBM bandwidth and large SRAM to accelerate token generation.
- **Running batch inference**: processing large datasets offline where
  high throughput is the primary goal. These workloads are compute-bound
  during the prompt prefill phase.

  - Required TPU capability: high compute density to maximize throughput per dollar.
  - Recommended TPU versions:
    - [TPU v6e](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#v6e). This version is cost-efficient for high-throughput batch processing.
    - [TPU7x](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#tpu7x). This version offers high compute density to process large batches quickly.

### Recommender systems

- **Processing large embeddings** : training and serving recommendation models that use massive embedding tables. These workloads are capacity and communication bound.
  - Required TPU capability: specialized SparseCore hardware to process sparse operations in parallel, large HBM capacity, and support for offloading to host memory.
  - Recommended TPU versions:
    - [TPU7x](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#tpu7x). This version includes four SparseCores per chip and offers the largest HBM capacity.
    - [TPU v6e](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#v6e). This version includes two SparseCores per chip for cost-effective serving.
    - [TPU v5p](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#v5p). This version includes four SparseCores per chip for large-scale training.

### Reinforcement learning

- **Running reinforcement learning loops**: managing hybrid workloads that
  require tight loops of generating samples and updating policy weights.

  - Required TPU capability: low-latency ICI for fast weight and activation transfers between chips, and high-bandwidth host connections.
  - Recommended TPU versions:

    - [TPU7x](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#tpu7x)
    - [TPU v5p](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#v5p)

    These TPU versions use a high-speed 3D torus interconnect.

## Consumption options

To help increase your chances of obtaining TPUs and optimize cost and workload
performance, use Flex-start, Spot, future reservations in calendar mode, or
future reservations for capacity blocks instead of on-demand capacity.
Compute Engine supports the following TPU consumption options:

- **Flex-start** : provisions Flex-start VMs for up to seven days.
  Compute Engine allocates the hardware when capacity becomes available,
  and provides discounts of up to 53%. For more information, see
  [About Flex-start VMs](https://docs.cloud.google.com/compute/docs/instances/about-flex-start-vms.md.txt).

- **Future reservation in calendar mode** : reserves TPU resources for up to 90
  days for a specified time period. For more information, see
  [About future reservation requests in calendar mode](https://docs.cloud.google.com/compute/docs/instances/future-reservations-calendar-mode-overview.md.txt).

- **Future reservation for capacity blocks** : reserves TPU capacity for one year
  or longer. For more information, see
  [Request a future reservation for one year or longer](https://docs.cloud.google.com/tpu/docs/long-term-reservation.md.txt)
  in the Cloud TPU documentation.

- **Spot** : provisions Spot VMs at significant discounts, but
  Compute Engine can preempt Spot VMs at any time with a
  30-second warning. For more information, see
  [Spot VMs](https://docs.cloud.google.com/compute/docs/instances/spot.md.txt).

- **On-demand** : requests TPUs without a future reservation. Before you
  request resources, you must have sufficient
  [on-demand quota](https://docs.cloud.google.com/compute/resource-usage.md.txt#tpu_quota) for the specific type and
  quantity of TPU instances. Because on-demand capacity depends on available
  physical hardware in each zone, use on-demand only if your workload can
  tolerate delays or if you can't use other consumption options.

Compute Engine doesn't support on-demand reservations or standard future
reservations for TPUs. If you don't specify a consumption option, then
Compute Engine uses on-demand by default.

For information about the underlying provisioning models for these consumption
options, see
[Compute Engine instances provisioning models](https://docs.cloud.google.com/compute/docs/instances/provisioning-models.md.txt).

### Consumption option availability by TPU versions

The following table summarizes the availability of each consumption option by
TPU versions.

| TPU version | On-demand | [Spot](https://docs.cloud.google.com/compute/docs/instances/spot.md.txt) | [Flex-start](https://docs.cloud.google.com/compute/docs/instances/about-flex-start-vms.md.txt) | [On-demand reservations](https://docs.cloud.google.com/compute/docs/instances/reservations-overview.md.txt) | [Future reservations](https://docs.cloud.google.com/compute/docs/instances/future-reservations-overview.md.txt) | [Future reservations in calendar mode^1^](https://docs.cloud.google.com/compute/docs/instances/future-reservations-calendar-mode-overview.md.txt) | [Future reservations for capacity blocks](https://docs.cloud.google.com/tpu/docs/long-term-reservation.md.txt) |
|---|---|---|---|---|---|---|---|
| **TPU7x** | Yes | Yes^2^ | Yes^2^ | No | No | Yes^2^ | Yes^2^ |
| **TPU v6e** | Yes | Yes | Yes | No | No | Yes | Yes |
| **TPU v5p** | Yes | Yes | Yes | No | No | Yes | Yes |

^1^ You can't create future reservation requests in calendar mode when using the All Capacity mode.
^2^ Spot, Flex-start, future reservations in
calendar mode, and future reservations for capacity blocks for TPU7x are
restricted by an allowlist. To request access,
contact your [account team](https://cloud.google.com/tam) or the [sales team](https://cloud.google.com/contact).

<br />

### All Capacity mode

By default, TPU reservations include automatic failure recovery.
Google Cloud manages this process by automatically replacing faulty TPU
machines with healthy ones from the reserved capacity to ensure resources are
available to restart your TPU slices.

Alternatively, for TPU v6e and TPU7x, you can request TPU capacity in *All
Capacity mode*. This mode grants access to your full reserved capacity and full
topology visibility. In this mode, you can also target specific blocks or
sub-blocks for precise, topology-aware workload placement. However, you are
responsible for managing hardware failures and maintenance.

For more information about these modes, see
[TPU capacity modes](https://docs.cloud.google.com/tpu/docs/capacity-modes.md.txt) in the
Cloud TPU documentation.

## TPU versions comparison

Compare the characteristics of different TPU versions.
You can select specific properties in the **Choose properties to
compare** field to compare those properties across all TPU versions in
the following table.
Workload type Instance type CPU type Architecture vCPUs vCPU definition Memory Shared memory architecture Custom machine types Extended memory Sole tenancy Nested virtualization Confidential Computing Disk interface type Hyperdisk Balanced Hyperdisk Balanced HA Hyperdisk Extreme Hyperdisk ML Hyperdisk Throughput Local SSD Standard PD Balanced PD SSD PD Extreme PD Network interfaces Maximum network bandwidth Max TPUs per VM Sustained use discounts Resource-based committed use discounts (CUDs) Compute flexible CUDs Spot VM discounts <button class="clear-all">Clear all</button>

<br />

|   | [TPU7x](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#tpu7x) | [v6e](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#v6e) | [v5p](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#v5p) |
| **Workload type** | Accelerator optimized | Accelerator optimized | Accelerator optimized |
| **Instance type** | VM | VM | VM |
| **CPU type** | Intel Emerald Rapids | AMD EPYC Genoa | Intel Sapphire Rapids |
| **Architecture** | x86 | x86 | x86 |
| **vCPUs** | 224 | 44 to 180 | 208 |
| **vCPU definition** | Thread | Thread | Thread |
| **Memory** | 960 GB | 176 to 1440 GB | 448 GB |
| **Shared memory architecture** | NUMA | NUMA | NUMA |
| **Custom machine types** | **---** | **---** | **---** |
| **Extended memory** | **---** | **---** | **---** |
| **Sole tenancy** | **---** | **---** | **---** |
| **Nested virtualization** | **---** | **---** | **---** |
| **Confidential Computing** | **---** | Yes | **---** |
| **Disk interface type** | NVMe | NVMe | NVMe |
| **Hyperdisk Balanced** | Yes | Yes | **---** |
| **Hyperdisk Balanced HA** | **---** | **---** | **---** |
| **Hyperdisk Extreme** | **---** | **---** | **---** |
| **Hyperdisk ML** | Yes | Yes | Yes |
| **Hyperdisk Throughput** | **---** | **---** | **---** |
| **Local SSD** | **---** | **---** | **---** |
| **Standard PD** | **---** | **---** | **---** |
| **Balanced PD** | **---** | **---** | Yes |
| **SSD PD** | **---** | **---** | **---** |
| **Extreme PD** | **---** | **---** | **---** |
| **Network interfaces** | gVNIC | gVNIC | gVNIC |
| **Maximum network bandwidth** | 400 Gbps | 50 to 400 Gbps | 200 Gbps |
| **Max TPUs per VM** | 4 | 8 | 4 |
| **Sustained use discounts** | **---** | **---** | **---** |
| **Resource-based committed use discounts (CUDs)** | Yes discounts | Yes discounts | Yes discounts |
| **Compute flexible CUDs** | **---** discounts | **---** discounts | **---** discounts |
| **Spot VM discounts** | Yes | Yes | Yes |
|---|---|---|---|

<br />


<br />

### TPU architecture specifications

The following table lists the key specifications for each TPU version.

| Specification | TPU7x | TPU v6e | TPU v5p |
|---|---|---|---|
| Number of chips per pod | 9216 | 256 | 8960 |
| Peak compute per chip (BF16) (TFLOPs) | 2307 | 918 | 459 |
| Peak compute per chip (FP8) (TFLOPs) | 4614 | 918 | 459 |
| HBM capacity per chip (GiB) | 192 | 32 | 95 |
| HBM bandwidth per chip (GBps) | 7380 | 1638 | 2765 |
| Number of vCPUs (4-chip VM) | 224 | 180 | 208 |
| RAM (GiB) (4-chip VM) | 960 | 720 | 448 |
| Number of TensorCores per chip | 2 | 1 | 2 |
| Number of SparseCores per chip | 4 | 2 | 4 |
| Bidirectional inter-chip interconnect (ICI) bandwidth per chip (GBps) | 1200 | 800 | 1200 |
| Data center network (DCN) bandwidth per chip (Gbps) | 100 | 100 | 50 |

## TPU machine types

The following sections describe the machine types available for each TPU
version.

### TPU7x (Ironwood)

Each TPU7x virtual machine (VM) contains 4 TPU chips. All TPU7x slices use
full-host, 4-chip VMs.

Each TPU7x chip contains two TensorCores and four
SparseCores.

The Ironwood programming model lets you access two TPU devices instead of the
single logical core architecture that was used in previous generations.
For more information, see
[Dual-chiplet architecture](https://docs.cloud.google.com/tpu/docs/tpu7x.md.txt#dual-chiplet_architecture)
in the Cloud TPU documentation.

The following table lists the specifications for the TPU7x machine type:

| Machine type | Number of vCPUs | Instance memory (GiB) | Physical NIC count | Maximum network bandwidth (Gbps) | Number of TPU chips per VM | Number of NUMA nodes | Total TPU memory (GiB HBM) |
|---|---|---|---|---|---|---|---|
| `tpu7x-standard-4t` | 224 | 960 | 2 | 400 | 4 | 2 | 768 |

For more information about the TPU7x architecture, see
[TPU7x (Ironwood)](https://docs.cloud.google.com/tpu/docs/tpu7x.md.txt) in the Cloud TPU documentation.

### TPU v6e (Trillium)

Each TPU v6e VM can contain 1, 4, or 8 TPU chips. 4-chip and smaller slices have
the same non-uniform memory access (NUMA) node.

TPU v6e slices use half-host VMs, each with 4 TPU chips, except for the
following machine types:

- `ct6e-standard-1t` contains a single TPU chip for testing workloads.
- `ct6e-standard-8t` is a full-host VM optimized for inference workloads. This machine type lets you use all 8 TPU chips that are attached to a single VM in a single serving workload.

The following table lists the specifications for the TPU v6e machine
types:

| Machine type | Number of vCPUs | Instance memory (GiB) | Physical NIC count | Maximum network bandwidth (Gbps) | Number of TPU chips per VM | Number of NUMA nodes | Total TPU memory (GiB HBM) |
|---|---|---|---|---|---|---|---|
| `ct6e-standard-1t` | 44 | 176 | 1/4 | 50 | 1 | 1 | 32 |
| `ct6e-standard-4t` | 180 | 720 | 2 | 400 | 4 | 1 | 128 |
| `ct6e-standard-8t` | 360 | 1440 | 1 | 200 | 8 | 2 | 256 |

For more information about the TPU v6e architecture, see
[TPU v6e](https://docs.cloud.google.com/tpu/docs/v6e.md.txt) in the Cloud TPU documentation.

### TPU v5p

A TPU v5p Pod contains 8,960 TPU chips that are interconnected with
reconfigurable high-speed links. TPU v5p's flexible networking lets you connect
the TPU chips in a same-sized slice in multiple ways and train models on a
single slice of up to 6,144 TPU chips.

The following table lists the specifications for the TPU v5p machine
type:

| Machine type | Number of vCPUs | Instance memory (GiB) | Physical NIC count | Maximum network bandwidth (Gbps) | Number of TPU chips per VM | Number of NUMA nodes | Total TPU memory (GiB HBM) |
|---|---|---|---|---|---|---|---|
| `ct5p-hightpu-4t` | 208 | 448 | 1 | 200 | 4 | 2 | 380 |

For more information about the TPU v5p architecture, see
[TPU v5p](https://docs.cloud.google.com/tpu/docs/v5p.md.txt) in the Cloud TPU documentation.

## TPU topology

The topology defines the physical arrangement of TPUs within a TPU slice.
Depending on the TPU version, the topology is two- or three-dimensional. You can
identify the number of TPU chips in a slice by calculating the product of each
size in the topology. For example:

- The `tpu7x-standard-4t` machine type with a `2x2x2` topology is an 8-chip multi-host TPU7x slice.

The following table lists the topologies available for each TPU version.
TPU7x (Ironwood) TPU v6e (Trillium) TPU v5p Single-host Multi-host <button class="clear-all">Clear all</button>

| TPU version | Machine type | Scope | Technical specifications |
|---|---|---|---|
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Single-host | - Topology: 2x2x1 - Number of TPU chips for the topology: 4 - Number of hosts: 1 - Number of VMs: 1 - Cubes count: 1/16 |
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Multi-host | - Topology: 2x2x2 - Number of TPU chips for the topology: 8 - Number of hosts: 2 - Number of VMs: 2 - Cubes count: 1/8 |
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Multi-host | - Topology: 2x2x4 - Number of TPU chips for the topology: 16 - Number of hosts: 4 - Number of VMs: 4 - Cubes count: 1/4 |
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Multi-host | - Topology: 2x4x4 - Number of TPU chips for the topology: 32 - Number of hosts: 8 - Number of VMs: 8 - Cubes count: 1/2 |
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Multi-host | - Topology: 4x4x4 - Number of TPU chips for the topology: 64 - Number of hosts: 16 - Number of VMs: 16 - Cubes count: 1 |
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Multi-host | - Topology: 4x4x8 - Number of TPU chips for the topology: 128 - Number of hosts: 32 - Number of VMs: 32 - Cubes count: 2 |
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Multi-host | - Topology: 4x8x8 - Number of TPU chips for the topology: 256 - Number of hosts: 64 - Number of VMs: 64 - Cubes count: 4 |
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Multi-host | - Topology: 8x8x8 - Number of TPU chips for the topology: 512 - Number of hosts: 128 - Number of VMs: 128 - Cubes count: 8 |
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Multi-host | - Topology: 8x8x16 - Number of TPU chips for the topology: 1024 - Number of hosts: 256 - Number of VMs: 256 - Cubes count: 16 |
| TPU7x (Ironwood) | `tpu7x-standard-4t` | Multi-host | - Topology: {A}x{B}x{C} (where A, B, and C are multiples of two) - Number of TPU chips for the topology: A\*B\*C - Number of hosts: (A\*B\*C)/4 - Number of VMs: (A\*B\*C/4) - Cubes count: (A\*B\*C/64) |
| TPU v6e (Trillium) | `ct6e-standard-1t` | Single-host | - Topology: 1x1 - Number of TPU chips for the topology: 1 - Number of VMs: 1 |
| TPU v6e (Trillium) | `ct6e-standard-8t` | Single-host | - Topology: 2x4 - Number of TPU chips for the topology: 8 - Number of VMs: 1 |
| TPU v6e (Trillium) | `ct6e-standard-4t` | Single-host | - Topology: 2x2 - Number of TPU chips for the topology: 4 - Number of VMs: 1 |
| TPU v6e (Trillium) | `ct6e-standard-4t` | Multi-host | - Topology: 2x4 - Number of TPU chips for the topology: 8 - Number of VMs: 2 |
| TPU v6e (Trillium) | `ct6e-standard-4t` | Multi-host | - Topology: 4x4 - Number of TPU chips for the topology: 16 - Number of VMs: 4 |
| TPU v6e (Trillium) | `ct6e-standard-4t` | Multi-host | - Topology: 4x8 - Number of TPU chips for the topology: 32 - Number of VMs: 8 |
| TPU v6e (Trillium) | `ct6e-standard-4t` | Multi-host | - Topology: 8x8 - Number of TPU chips for the topology: 64 - Number of VMs: 16 |
| TPU v6e (Trillium) | `ct6e-standard-4t` | Multi-host | - Topology: 8x16 - Number of TPU chips for the topology: 128 - Number of VMs: 32 |
| TPU v6e (Trillium) | `ct6e-standard-4t` | Multi-host | - Topology: 16x16 - Number of TPU chips for the topology: 256 - Number of VMs: 64 |
| TPU v5p | `ct5p-hightpu-4t` | Single-host | - Topology: 2x2x1 - Number of TPU chips for the topology: 4 - Number of VMs: 1 |
| TPU v5p | `ct5p-hightpu-4t` | Multi-host | - Topology: 2x2x2 - Number of TPU chips for the topology: 8 - Number of VMs: 2 |
| TPU v5p | `ct5p-hightpu-4t` | Multi-host | - Topology: 2x2x4 - Number of TPU chips for the topology: 16 - Number of VMs: 4 |
| TPU v5p | `ct5p-hightpu-4t` | Multi-host | - Topology: 2x4x4 - Number of TPU chips for the topology: 32 - Number of VMs: 8 |
| TPU v5p | `ct5p-hightpu-4t` | Multi-host | - Topology: {A}x{B}x{C} (where A, B, and C are multiples of two) - Number of TPU chips for the topology: A\*B\*C - Number of VMs: (A\*B\*C/4)^[1](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#fn2)^ |

1. Calculated by the topology product divided by four.
   [↩](https://docs.cloud.google.com/compute/docs/tpus/tpu-machines.md.txt#fnref2)

## What's next

- Learn about [TPU resources in Compute Engine](https://docs.cloud.google.com/compute/docs/tpus/tpu-resources-in-compute-engine.md.txt)
- Try the quickstart: [Create a single TPU VM](https://docs.cloud.google.com/compute/docs/tpus/quickstart-create-tpu-instance.md.txt)