Most AI designs start with "how many GPUs?" and stop there. A production AI platform uses five kinds of processor, and each one is the right answer for a different part of the pipeline. Putting the wrong work on the wrong chip is the most common reason AI platforms are slow, expensive or both.
This guide explains why each processor exists, when to use it, and how to check and size it.
| Term | Stands for | What it is | Who makes it |
|---|---|---|---|
| CPU | Central Processing Unit | General-purpose server processor | Intel, AMD, Arm-based (AWS Graviton, NVIDIA Grace, Ampere) |
| GPU | Graphics Processing Unit | Parallel accelerator with high-bandwidth memory | NVIDIA, AMD, Intel |
| TPU | Tensor Processing Unit | Google's own AI accelerator, only rentable in Google Cloud | |
| LPU | Language Processing Unit | Groq's inference chip; "LPU" is Groq's product name, not an industry-wide category | Groq |
| DPU | Data Processing Unit | Programmable network/storage/security card (a "SmartNIC" with its own cores) | NVIDIA (BlueField), AMD (Pensando), Intel (IPU) |
Other clouds have their own custom AI chips that play a role similar to the TPU, for example AWS Trainium (training) and Inferentia (inference), which use the AWS Neuron SDK rather than CUDA. The TPU advice below applies to them in spirit: strong price-performance inside one cloud, in exchange for lock-in and a different software stack.
The one idea that explains all five: what limits the work
Every AI workload is limited by one of three things:
| Limit | What it means | Typical workload |
|---|---|---|
| Compute (FLOPS) | Big matrix multiplications, lots of reuse of each weight | Training, prompt prefill, batch embeddings |
| Memory bandwidth (bytes/s) | Each weight is read once per token, little reuse | LLM token generation (decode) at small batch |
| I/O and control (network, storage, branching) | Moving data, parsing, security, orchestration | Ingestion, tokenisation, RAG retrieval, east-west traffic |
Each processor wins on a different row:
- CPU: flexible, branch-heavy code and moderate memory bandwidth. Best at control and data work.
- GPU: massive parallel compute plus high-bandwidth memory (HBM). Best general-purpose accelerator.
- TPU: Google's matrix ASIC, built for large, regular tensor work at pod scale.
- LPU: Groq's inference ASIC, using on-chip SRAM to remove the memory-bandwidth limit on decode.
- DPU: a programmable network and storage processor that takes infrastructure work off the CPU and GPU.
CPU: the control plane and the data plane
Why. The CPU runs everything that is not dense tensor math: API gateways, tokenisers, chunking, PDF parsing, feature engineering, vector search, schedulers and the inference server's own process. Modern server CPUs also have AI instructions: Intel AMX matrix units on 4th-gen Xeon Scalable and later, and AVX-512 (with VNNI and BF16) on AMD EPYC from the 4th generation (Zen 4) onwards. That lets them run small models well.
When to use CPU for inference:
- Classic ML (XGBoost, scikit-learn), rerankers and small embedding models at modest QPS.
- Small quantised LLMs (roughly 1-8B parameters) for low-concurrency internal tools, batch jobs or edge sites.
- Any workload where GPU capacity is unavailable and latency of a few seconds is acceptable.
When not to: high-concurrency chat, long contexts, dense models much larger than about 8B parameters, or training beyond small models.
Check what your CPU can do:
# Matrix / vector extensions (amx_bf16, amx_int8, amx_tile = Intel AMX; avx512* = AVX-512)
lscpu | grep -o -E 'amx_[a-z0-9]+|avx512_bf16|avx512_vnni' | sort -u
# Memory channels and speed drive CPU inference speed more than core count
sudo dmidecode -t memory | grep -E 'Configured Memory Speed|Size: [0-9]' | sort | uniq -c
Tip
For CPU inference, memory bandwidth matters more than cores. A socket with 8 channels of DDR5-4800 gives about 307 GB/s (8 × 38.4 GB/s). Fill every memory channel, and pin the process to one NUMA node (
numactl --cpunodebind=0 --membind=0).
GPU: the default accelerator
Why. A data-centre GPU combines thousands of cores, tensor cores for low precision (BF16, FP8, and FP4 on the newest parts) and HBM with several TB/s of bandwidth. The software ecosystem (CUDA, ROCm, PyTorch, vLLM, TensorRT-LLM, Triton) is the most mature. One GPU fleet can train, fine-tune, embed and serve.
When to use:
- Training and fine-tuning of anything beyond small models.
- Serving open-weight LLMs at real concurrency, where continuous batching makes the GPU efficient.
- Batch embedding of large corpora, vision, speech and multimodal models.
- When you need portability across clouds and on-premises.
Watch for: capacity shortages, cost when GPUs sit idle, and multi-GPU scaling problems (NVLink vs PCIe topology matters for tensor parallelism).
# What GPUs, memory, and interconnect you have
nvidia-smi --query-gpu=index,name,memory.total,power.limit --format=csv
nvidia-smi topo -m # NV# = NVLink between GPUs; PHB/SYS = PCIe / cross-socket
# Which N-series VM sizes a region offers (NC/ND/NV are GPU; NP is FPGA - ignore it)
az vm list-skus --location eastus --resource-type virtualMachines \
--query "[?starts_with(name,'Standard_N')].name" -o tsv | sort -u
aws ec2 describe-instance-types --filters "Name=instance-type,Values=p5.*,g6.*" \
--query "InstanceTypes[].[InstanceType,GpuInfo.Gpus[0].Name,GpuInfo.Gpus[0].Count]" --output table
TPU: Google's tensor ASIC, at pod scale
Why. A TPU is a matrix-multiply engine (systolic arrays) with HBM, joined to other TPUs in the same slice by Google's dedicated inter-chip interconnect (ICI). Jobs larger than one slice ("multislice") also use the data-centre network between slices. Google runs all of this networking, so you don't build or operate an InfiniBand fabric. For large, regular workloads TPUs can give strong performance per dollar and per watt.
When to use:
- You are on Google Cloud and training or serving at large scale.
- Your stack is JAX, or PyTorch via PyTorch/XLA, or a serving engine with TPU support (vLLM has a TPU backend; check its current model coverage).
- Your models have static shapes. XLA compiles graphs, and dynamic shapes cause recompilation.
When not to: you need multi-cloud or on-premises, you depend on CUDA-only kernels, or your team has no XLA experience. TPUs are only available in Google Cloud, so plan for lock-in.
# What TPU types and runtime versions exist in a zone (names change between generations)
gcloud compute tpus accelerator-types list --zone=us-central1-a
gcloud compute tpus tpu-vm versions list --zone=us-central1-a
# Create a TPU VM - take ACCELERATOR_TYPE and RUNTIME_VERSION from the lists above
gcloud compute tpus tpu-vm create tpu-infer-01 --zone=us-central1-a \
--accelerator-type=ACCELERATOR_TYPE --version=RUNTIME_VERSION
LPU: deterministic, low-latency inference
Why. The Groq LPU (Language Processing Unit) is an inference-only chip. Instead of HBM it keeps model weights in on-chip SRAM (230 MB per chip on the first-generation GroqChip, with up to 80 TB/s of on-die bandwidth, per Groq's product brief), and a compiler schedules every operation in advance. That removes the external-memory bottleneck on token generation, so a single stream can generate tokens very fast with very consistent latency. The catch is capacity: 230 MB holds only a small fraction of a large model, so a 70B model is spread across hundreds of chips. In practice you use LPUs as a hosted service (GroqCloud), not as cards you buy for your own servers.
Note
In December 2025 Groq gave NVIDIA a non-exclusive licence to its inference technology, and several Groq leaders joined NVIDIA. Groq said it continues as an independent company and that GroqCloud keeps operating. Before you depend on it, check the current model list, regions, rate limits and data-retention terms.
When to use:
- Latency-critical, interactive inference: voice agents, real-time assistants, and agent loops that make many sequential LLM calls, where time to first token and tokens per second per user dominate the experience.
- Open-weight models that the provider already hosts.
When not to: training or fine-tuning, models the provider does not host, or data that cannot leave your network or region.
GroqCloud exposes an OpenAI-compatible API, so it can sit behind the same client code as other providers:
# List the models currently served (IDs change; never hard-code from a blog)
curl -s https://api.groq.com/openai/v1/models -H "Authorization: Bearer $GROQ_API_KEY" | jq -r '.data[].id'
from openai import OpenAI
import os, time
client = OpenAI(base_url="https://api.groq.com/openai/v1", api_key=os.environ["GROQ_API_KEY"])
t0 = time.time()
stream = client.chat.completions.create(
model=os.environ["LPU_MODEL_ID"], # pick from the /models list
messages=[{"role": "user", "content": "Summarise the RTO of our DR plan in 3 bullets."}],
stream=True)
first = None
for chunk in stream:
if first is None and chunk.choices and chunk.choices[0].delta.content:
first = time.time() - t0
print(f"time to first token: {first:.3f}s, total: {time.time() - t0:.3f}s")
Run the same script against your GPU endpoint (change base_url) to compare time to first token and total time on your own prompts.
DPU: the infrastructure processor
Why. A DPU (Data Processing Unit) is a SmartNIC with its own Arm cores and hardware engines, such as NVIDIA BlueField, AMD Pensando or Intel IPU. Cloud providers use the same idea inside their own platforms, for example AWS Nitro cards; there you get the benefit automatically and never manage the card yourself. It runs networking (virtual switching, RDMA, congestion control), storage (NVMe over Fabrics, encryption, compression) and security (firewalling, isolation between tenants) on the card, not on the host CPU.
When it matters in AI:
- GPU clusters: feeding GPUs at line rate over RoCE/InfiniBand. Every CPU cycle spent on packet processing is a cycle not spent feeding the GPU.
- Multi-tenant AI clouds: isolating tenants' traffic and storage in hardware, outside the host OS.
- Storage-heavy pipelines: checkpoints, dataset streaming and KV-cache offload over NVMe-oF.
- Zero-trust designs: encryption and policy enforced on the card even if the host is compromised.
When it doesn't: single-node inference, small clusters on standard cloud VMs (the provider's own offload already does this job), or teams without the network skills to run it.
# Is there a BlueField / ConnectX device, and which driver and firmware does it run?
lspci | grep -i -E 'bluefield|mellanox|connectx'
ethtool -i <interface> # driver, firmware-version, bus-info
ibv_devinfo | grep -E 'hca_id|fw_ver|link_layer|state' # RDMA devices (rdma-core / OFED)
The bandwidth math that decides CPU vs GPU vs LPU
For a dense model at batch size 1 (one user), each generated token reads every weight once. That gives a theoretical ceiling on decode speed for one stream. Mixture-of-experts models read only the active experts per token, so use the active parameter count for them:
def max_decode_tokens_per_s(params_billion, bytes_per_param, bandwidth_gb_s):
model_gb = params_billion * bytes_per_param
return bandwidth_gb_s / model_gb # theoretical ceiling for one stream; measured speed is always lower
print(max_decode_tokens_per_s(8, 0.5, 307)) # 8B 4-bit on 8-channel DDR5 CPU -> ~77 tok/s ceiling
print(max_decode_tokens_per_s(70, 1, 307)) # 70B FP8 on the same CPU -> ~4 tok/s
print(max_decode_tokens_per_s(70, 1, 3350)) # 70B FP8 at H100 SXM bandwidth (3.35 TB/s) -> ~48 tok/s per stream (in practice 70B is served on 2+ GPUs to leave room for KV cache)
What this tells you:
- The figures are illustrative ceilings from published memory bandwidth, not benchmarks. Measure your own setup.
- CPUs are fine for small quantised models and far too slow for large dense ones.
- GPUs win on throughput: batching many users shares each weight read, so total tokens per second grows far beyond the single-stream ceiling.
- LPUs and other SRAM-based designs raise the single-stream ceiling, which is why they stand out on latency rather than cost per token.
- Prefill (reading the prompt) is compute-bound, so long-context RAG prompts favour GPUs and TPUs with high FLOPS.
Decision table
| Workload | First choice | Also consider | Why |
|---|---|---|---|
| Ingestion, chunking, OCR orchestration, API layer | CPU | DPU for network/storage offload | Branch-heavy I/O work |
| Vector search (HNSW) | CPU (RAM-heavy) | GPU indexes for very high QPS | Random memory access |
| Embedding a large corpus (batch) | GPU | TPU on Google Cloud; CPU for small sets | Compute-bound, batches well |
| Small model, low QPS, internal tool | CPU | Small GPU | Cheapest acceptable latency |
| LLM serving, many concurrent users | GPU | TPU (Google Cloud) | Batching throughput, mature engines |
| Real-time voice / agent loops, low latency | LPU (hosted) | GPU with speculative decoding | Single-stream speed, steady latency |
| Pre-training / large fine-tuning | GPU cluster | TPU pods | Compute plus interconnect |
| Multi-tenant GPU cloud, high-speed storage | DPU on every node | - | Isolation and line-rate I/O |
Reference architecture: all five in one RAG platform
- CPU nodes run the API gateway, auth, document parsing, chunking, the vector database and the orchestration layer.
- GPU nodes run the embedding model, the reranker and the main self-hosted LLM, behind vLLM or Triton with autoscaling on queue depth.
- LPU (hosted) serves a latency-critical path, such as a voice assistant, through the same OpenAI-compatible client, with the GPU endpoint as fallback.
- TPU is used if the organisation trains or serves at large scale on Google Cloud. It is a second accelerator pool, not a replacement for everything.
- DPUs in the GPU servers handle RDMA networking, encrypted NVMe-oF storage for checkpoints and datasets, and tenant isolation.
Warning
Route every model call through one gateway that knows each backend's model ID, region and data-handling terms. A fallback from a private GPU endpoint to a public hosted LPU or API can move regulated data out of its approved region without anyone noticing.
Mistakes to avoid
| Mistake | Effect | Fix |
|---|---|---|
| Choosing accelerators from peak TFLOPS | Decode is bandwidth-bound, so you buy the wrong part | Size from bytes per token and concurrency |
| GPU nodes starved by CPU preprocessing | GPU utilisation below 40% | Profile the data loader; add CPU cores or move work off the GPU nodes |
| TPU with dynamic shapes | Constant recompilation, slow first requests | Pad or bucket sequence lengths |
| Hosted LPU for sensitive data without review | Compliance breach | Check data residency and retention terms first |
| DPUs without network skills on the team | Unused offload, complex outages | Start with the provider's managed networking |
| One pool for everything | Training jobs starve inference | Separate pools and quotas per workload |
Prevent it next time
- Write the limiting resource (compute, bandwidth or I/O) next to every workload in your design document before choosing hardware.
- Benchmark on your own prompts: measure time to first token, tokens per second per user and cost per million tokens at your real concurrency.
- Keep model access behind an OpenAI-compatible gateway so you can move work between CPU, GPU, TPU and LPU backends without rewriting applications.
- Review the mix twice a year. Accelerator generations, prices and hosted model lists change quickly, so check current specifications and limits rather than relying on figures from any blog, including this one.
Related: GPU basics for LLM inference: VRAM and model size math and GPU capacity and model quota planning.
Get the weekly HubDatAI email
One email a week with everything new: posts, learning sessions and videos. Free, no spam, unsubscribe in one click. What you get