Home / Learn / Chiplets and Memory / Memory Bandwidth Bottlenecks in AI Chips
On this page
Two different limitsThe memory wallWhy language model inference is memory-boundBatching changes the balanceCapacity is a separate limitWhat limits memory bandwidthWhat designers do about itTiers of memoryTraining is affected as wellWhy peak figures misleadImplications for chip architectureCommon questionsRelated guidesMemory Bandwidth Bottlenecks in AI Chips
In many AI workloads, the speed of reading memory limits performance more than arithmetic does. An accelerator’s compute units can multiply and add far faster than memory can supply the numbers. When that happens, the chip is memory-bound: its expensive arithmetic hardware waits for data. Designers respond with faster memory placed close to the processor, with smaller number formats and with architectures that reduce how far and how often data has to move.
Two different limits
A processor’s throughput on a given task is capped by one of two things.
- Compute-bound. The arithmetic units are fully busy. Adding more of them, or making them faster, would help.
- Memory-bound. The arithmetic units are idle part of the time, waiting for data. Making them faster would change nothing.
Which limit applies depends on the workload. A useful way to tell is to compare how much arithmetic a task performs for each byte of data it reads. Tasks that do a lot of computation on a small amount of data are compute-bound. Tasks that touch a great deal of data and do only a little arithmetic on each piece are memory-bound.
The memory wall
Processor speed and memory speed have improved at different rates for decades. The growing gap is known as the memory wall. AI has made it more visible, because models have become enormous and accelerators have added arithmetic capacity very quickly.
Why language model inference is memory-bound
Generating text with a large language model is a clear example.
To produce each output token, the model must read essentially all of its weights from memory. For a large model, that is tens or hundreds of gigabytes. The arithmetic performed on those weights for a single token is comparatively light.
So the time to generate a token is close to the time needed to read the model from memory once. If a model occupies 100 gigabytes and memory can deliver 1,000 gigabytes per second, the chip can produce on the order of ten tokens per second for one request, however much arithmetic capacity it has.
This is why memory bandwidth, not peak arithmetic speed, usually determines how fast a model generates text.
Batching changes the balance
When several requests are processed together, the weights are read once and used for all of them. More arithmetic is done per byte read, and the workload moves toward being compute-bound.
Batching therefore raises total throughput. It also increases memory use, since each request needs its own working data, and can lengthen the wait for each individual request.
Capacity is a separate limit
Bandwidth is how fast memory can be read. Capacity is how much it holds. Both constrain AI chips.
- The model’s weights must fit.
- Each request needs working memory.
- In language models, cached state for each conversation grows with context length.
When capacity runs out, the options are smaller batches, splitting the model across several accelerators, or moving some data to slower memory outside the package.
What limits memory bandwidth
- The number of connections between memory and processor.
- The speed of each connection.
- Distance. Longer connections must run slower or use more power.
- Power. Moving data costs energy, and at very high rates the memory interface uses a meaningful part of the chip’s power budget.
- Heat. Memory is sensitive to temperature, and it sits next to a hot processor.
- Die edge. The memory interface occupies space along the edge of the processor die, which is limited.
What designers do about it
Use high-bandwidth memory. HBM stacks memory dies and connects them to the processor through thousands of short links inside the package. It provides far more bandwidth than conventional memory and is used on nearly all high-end AI accelerators.
Add more memory stacks. Bandwidth and capacity scale with the number of stacks placed around the processor, within what the package allows.
Use smaller numbers. Storing weights in 8-bit or 4-bit formats instead of 16-bit ones cuts the data to be read by a factor of two or four. For a memory-bound workload, that translates almost directly into speed.
Keep data on the chip. Large on-chip memories hold frequently used data so it need not be fetched repeatedly.
Arrange compute near memory. Architectures that place arithmetic units close to the data they use reduce the distance data travels.
Reduce data movement in software. Compilers and runtimes can reorder operations, combine steps and reuse data that is already loaded.
Compress. Sparse or compressed representations reduce what must be read, at the cost of extra logic to unpack them.
Stack memory on logic. Placing memory directly above the processor shortens the path further.
Compute in or near memory. A research direction that performs some arithmetic within the memory itself, avoiding the transfer.
Tiers of memory
No single kind of memory is both fast enough and large enough for everything. Systems use several.
| Tier | Role |
|---|---|
| On-chip memory | Data in immediate use |
| HBM in the package | Model weights and active working data |
| Host memory | Data being prepared, recently used state |
| Expanded or pooled memory | Additional capacity shared across servers |
| Storage | Models not loaded, idle state, datasets |
The aim is to have the right data in the fastest tier at the moment it is needed. Moving data between tiers quickly is its own engineering problem.
Training is affected as well
Training performs more arithmetic per byte than inference and is more often compute-bound. Memory still matters. Training keeps intermediate results from the forward pass for use in the backward pass, which consumes a great deal of capacity. Large batches and large models are frequently limited by how much memory is available.
Why peak figures mislead
A chip’s headline arithmetic rating says what it can do when data is always available. A memory-bound workload never reaches it.
Two accelerators with the same peak rating can differ widely in real throughput if one has more memory bandwidth. For language model inference in particular, memory bandwidth and capacity are better predictors of performance than peak arithmetic speed.
Implications for chip architecture
Designers of AI chips balance compute against memory.
- Match the two. Arithmetic capacity that memory cannot feed is wasted silicon and power.
- Plan the memory interface first. It determines die edge use, package size and cost.
- Choose number formats with memory in mind.
- Consider the target workload. A chip for large-batch training and a chip for low-latency inference call for different balances.
- Account for the whole data path. Memory inside the package is only one stage. Data also has to arrive from the network and storage.
Common questions
What does memory-bound mean?
It means a chip’s performance on a task is limited by how fast it can read data from memory, not by how fast it can compute. Faster arithmetic would not improve it.
Why is language model inference limited by memory?
Generating each token requires reading most of the model’s weights, which is a very large amount of data, while doing relatively little arithmetic on it. The time is dominated by memory access.
Does more memory make an AI chip faster?
More capacity lets it hold larger models or more simultaneous requests. More bandwidth lets it generate output faster. Both matter, and they are different properties.