What is an AI memory-bound workload?

A memory-bound workload is one whose runtime is set less by the processor's compute power than by how fast data moves to and from memory, its memory bandwidth; with few operations per byte read, compute units sit idle waiting for data.

Unlike a compute-bound workload, which does many operations per byte and is limited by processing capacity, a memory-bound workload is limited by bandwidth. Which applies is found by comparing the work's arithmetic intensity with the hardware's balance.

Topic
Infrastructure and runtime
Also known as
Memory bound
Origin
Roofline model, 2009

How an AI memory-bound workload works

  1. A workload's arithmetic intensity is its floating point operations divided by bytes moved to and from memory.
  2. The roofline model compares this with the ratio of the hardware's peak compute to memory bandwidth; work below it is memory-bound.
  3. In language models, token-by-token generation reads all weights and the KV cache each step with little computation, a typical memory-bound task.
  4. Larger batches, quantisation and cache compression ease the bottleneck.

In more detail

Prefill versus decode asymmetry and the batching effect

LLM serving splits into two sharply different performance regimes: prefill, which processes all input prompt tokens in parallel and is typically compute-bound, while autoregressive decode, which generates one token per step and is strongly memory-bandwidth-bound at small batch sizes. Increasing batch size amortises weight reads across many requests, shifting decode closer to the hardware's compute roof.

The ridge point and a worked example

In the Roofline model, the hardware's ridge point is peak FLOP/s divided by memory bandwidth in bytes per second. For example, a GPU delivering 1,000 TFLOP/s (FP16) with 3 TB/s of HBM bandwidth has a ridge point of roughly 333 FLOPs/byte; single-request LLM decode often achieves only 1 to 2 FLOPs/byte, leaving over 99% of peak compute idle.

Current mitigations: GQA, MLA, FlashAttention and speculative decoding

Beyond larger batches and weight quantisation, modern inference stacks mitigate the memory wall through architectural and systems techniques such as Grouped-Query Attention (GQA) or Multi-Head Latent Attention (MLA) to shrink the KV cache, FlashAttention to avoid materialising intermediate attention matrices in HBM and speculative decoding to compute multiple candidate tokens per weight load.

Commonly confused terms

TermHow it differs
Memory-capacity-bound workloadA memory-bandwidth-bound workload is limited by how fast bytes can move between memory and compute units (slow throughput), whereas a memory-capacity-bound workload fails or spills because weights and KV cache exceed total available VRAM/HBM size.
Communication-bound workloadIn distributed multi-GPU serving, interconnect/communication-bound workloads are bottlenecked by NVLink, InfiniBand or Ethernet all-reduce latency and bandwidth rather than on-chip HBM bandwidth.

Why an AI memory-bound workload matters for on-premises AI

Buying more compute does not speed up memory-bound work; the bottleneck's location must be known for sound hardware choices and tuning. One study notes that over twenty years peak server compute grew 3 times every two years while memory bandwidth grew 1.6 times and interconnect bandwidth 1.4 times, making memory the main bottleneck especially in serving. So for language model inference, bandwidth often matters more than compute when choosing GPUs.

ON-PREMISES EXAMPLE

Choosing GPUs for its in-house chat assistant, a public body finds generation speed is memory-bound; it picks a high-bandwidth card over a high-compute, low-bandwidth one and quantises weights.

Common questions

How do you tell a workload is memory-bound?

When its operations per byte fall below the hardware's compute to bandwidth ratio. Low compute with high bandwidth use in profilers is another sign.

Why is language model inference memory-bound?

Each generation step reads all weights and the cache but does little work per token, so speed often depends on bandwidth.

Sources

In the glossary: Glossary, M to Q

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.