Solutions

How Many GPUs Do You Need for LLM Inference?

November 30, 2026
Authored by
Derrick Harris
Technology Storyteller
Ofir Zan
VP, AI Solutions & Enterprise Lead
How Many GPUs Do You Need for LLM Inference?

Building an AI factory is one of the most important things that any organization serious about artificial intelligence will do. Whether it’s deployed in a data center or a cloud, the AI factory directly impacts both the performance of models and the cost of running them. Starting from the right foundation also makes it easier to scale AI infrastructure along with usage.

This post will explain and define some key components of, and concepts behind, AI factories. And, because one of the first questions organizations face is how many GPUs they’ll need for LLM inference, it concludes with a cheat sheet for determining the right number of GPUs and data infrastructure to support inference traffic for a transformer-based AI model.

What is an AI Factory?

If you squint, it’s easy to see an AI factory as just another application infrastructure stack. All the same components are there - compute, storage, networking, data, runtime and serving environments, etc. - as are all the same concerns around things like performance, availability, and security. So rather than focus on what’s the same, it’s critical to understand what’s different.

Three obvious and intertwined starting points are: AI-specific computing hardware, most likely GPUs; AI models; and tokens.

Tokens: Measurable Units of Compute and Data

Because they’re intrinsically connected to the AI factory concept, tokens are a good starting point. In the world of AI, tokens are the units of measurement to evaluate models on capability and cost dimensions. It varies by model, but a language model token is roughly four characters in English (so slightly less than the average English word; it could vary significantly for other languages), whereas a single frame of video might contain dozens or even hundreds of tokens. 

AI models first break down their inputs (e.g., user prompts and uploaded documents) into tokens, and also generate their outputs (e.g., the answer to a question or the requested piece of code) one token at a time. The context window, or context length, that an AI model can handle is the combined number of both input and output tokens stored in the model's active memory (the KV cache). (Generally speaking, the closer a model instance is to reaching its context limit, the more it suffers from attention degradation, leading to lower-quality outputs.)

A popular way of explaining AI factories is that they’re analogous to any other factory, except that instead of producing, say, extruded aluminum, AI factories produce tokens - measurable units of computational work:

  • In one case, raw aluminum goes in and formed aluminum comes out. It will have a specific application depending on what the factory produces, such as becoming part of a lightweight boat trailer. Ideally, every single piece produced should be exactly the same. 
  • In the other case, input tokens go in and output tokens come out. Those output tokens will also perform a specific function, such as producing chat responses or code or video clips, depending on the model. However, because generative AI models are probabilistic by nature, no two outputs will ever be exactly the same without some serious context-engineering work.
  • In both cases, the factory owner is likely optimizing for maximum production, balanced against considerations like cost, safety, and quality. Ideally, each factory owner will have enough capacity to meet current demand, plus a little bumper capacity, and will be able to easily add new capacity when demand ramps up.

From a token perspective, building an self-hosted AI factory instead of relying on cloud-hosted SaaS models comes with a few key advantages:

  1. Choosing models that best meet an organization’s specific criteria for specific workloads. That includes using model-builder APIs where it makes sense, but optimizing for data security, governance, latency, and other concerns where they take precedence.
  2. Mitigating the problem of using models that promise lower per-token costs but end up using many more tokens to achieve the same result. Models can be tested and evaluated in real-world environments.
  3. Limiting the blast radius of trends like “token-maxxing,” where token consumption becomes a proxy for productivity. Because AI factories have (1) fixed costs and (2) a natural cap on token production — based largely, but not entirely, on the amount of installed compute capacity — individual teams or employees can’t generate massive, unexpected monthly bills. 

Of course, realizing these benefits requires careful analysis of models on an organization’s unique systems. Beyond standard benchmarks, this should include TCO of buying and running the system; performance on important workloads across a realistic number of concurrent users (human and/or agent); and intangible concerns such as developer experience.

GPUs: The Heart, and Cost Center, of AI Factories

GPUs are necessary for AI workloads because their speed at computing matrix multiplications is critical for executing both training runs and inference tasks in a reasonable amount of time. Although it’s technically possible to run AI workloads on CPUs, it would be painfully slow to do so at any reasonable scale. New AI-specific chip architectures emerged over the past several years, some of which have shown remarkable promise, but GPUs remain the default option for most AI jobs.

The relationship between GPUs and tokens is roughly this:

  • The higher the sheer performance of a GPU cluster (measured in FLOPS), the faster it can process  data. This is critical for foundation models and multimodal models that involve huge datasets, where higher performance might reduce the training time from months to weeks.
  • Compute performance is also critical for the first, or prefill, stage of AI inference in current transformer-based models. The faster the GPU, the faster the model can parse its input context and generate the first output token (often referred to as time-to-first-token, or TTFT). Although any given inference request won’t overwhelm an enterprise-class GPU, hundreds, thousands, or hundreds of thousands of concurrent ones certainly can slow things down. 
  • The more high-bandwidth memory (HBM) a GPU has, the more context (or tokens or concurrent requests) it can handle without having to flush older data. This is particularly critical for the decode stage of inference workloads, where techniques like KV cache mitigate the need for a model to recompute the entire context to predict the next token. Instead, GPUs rapidly fetch the cached context from memory and the model uses that to generate subsequent tokens.

GPUs are also expensive. Beyond the cost to produce them (with or without supply chain crunches) they run significantly hotter than the CPUs most organizations are used to, thus generating higher bills for the resources required to run and cool them. Much of the debate over data center construction stems from this reality, and it’s why there’s now a class of cloud GPU providers — often called AI clouds or neoclouds — that optimize their data centers for AI workloads.

AI Models: The X Factor for AI Workloads

If GPUs are the heart of an AI factory, then models are the brain. There’s not a lot left to say about them, other than that the speed of their inference output is governed in part by how they’re internally architected, and in part by the performance of the compute, network, and storage infrastructure surrounding them. Slow systems or inter-system latency can hamstring even the fastest GPUs and highest-performance models.

Today, finding a capable AI model, especially a capable language model, is not the difficult part. Rather, the challenge for an organization building an AI factory is finding a model that fits its needs around performance on available resources, efficiency, security, customization/optimization, and other concerns that might be more about operations than intelligence. Which wins: A model that’s 5% “more intelligent,” a model that’s 10% less expensive, or a model that’s 20% faster?

But there’s a catch: Even if an organization can select the ideal models for its systems and use cases today, the pace of model innovation doesn’t seem to be slowing down. This can make model evaluation a continuous practice, especially because intelligence is not like other measures of software performance. An AI model that can do more, and do it faster and better, is a greater competitive advantage than a faster database.

New Data Types for AI Factories

AI inference also adds two additional data layers to the AI factory concept: vector databases and context memory. 

Vector Embeddings and Vector Databases

Vector embeddings are numerical representations of data (text, video, etc.). Embedding models generate the vector embeddings and map data onto the vector space based on a representative data dictionary. Vector databases index, store, and retrieve the embeddings in response to a vector query. 

Crucially, embedded vectors naturally encode semantic meaning from the data. In AI models themselves, the vector space represents the model’s internal understanding of how concepts and words are related, often across many dimensions. In vector databases, the semantic allows for faster retrieval. In the case of a document RAG workflow (say, a user needs info from a massive store of technical documentation), the database can perform a targeted query rather than searching for keywords across millions of documents. Or in the case of a video RAG workflow (say, real-time video feeds of a factory floor), the database can flag incoming vectors that match the profiles of certain safety issues.

In an AI factory setting, the goal is to maximize throughput and minimize latency between the GPU-based embedding model and the vector database, as well as the vector database and the GPU-based language model. This way, the vector database can ingest and index vectors as fast as the embedding model can generate them, and can retrieve them as fast as language models request them. 

Context Memory

Context memory is a multi-faceted concept, one part of which (KV cache) we’ve already discussed. KV cache is primarily a concern for efficiently executing large-scale and immediate inference requests (i.e., it’s ephemeral; housed in GPU memory and eventually flushed). However, KV cache data can be offloaded to external storage. While this introduces I/O latency that can increase TTFT, it prevents out of memory errors and drastically increases overall system concurrency for overloaded GPUs.

Context memory, in general, can and probably will have a longer shelf life as AI usage matures. For example, running large numbers of AI agents will require a shared context layer from which they can access relevant information, and that can log their myriad interactions across the system, external systems, and each other. Truly personalized AI experiences will also benefit from long-term context memory, in the sense that every prompt, output, and turn provides valuable signals about a user’s interests and model-interaction preferences. 

A great unknown at the moment is how much capacity is required for storing all this context. KV caches, for example, can be quite large due to the dense nature of language-model computations. On the other hand, each event log and prompt-response log is relatively small, but they can add up fast with heavy usage.

Everything Else: Storage, Networking, and All Those Agents

Beyond the parts of the AI inference stack that are actually new, a not-so-guarded secret is that production AI inference workloads might not look too different from other production workloads. That is:

  • They still require runtime and serving layers.
  • They still require numerous systems to store, move, and process data. 
  • They still require network infrastructure. 
  • They still require orchestration and observability.
  • They still require some sort of middleware layer(s) to handle things like policy management and interactions among various systems.

The big differences are that workload orchestration can be more complex across both GPU and CPU clusters, and that AI workloads prioritize scale and performance more than most traditional enterprise workloads.

Sizing an AI Factory: How Many GPUs for LLM Inference?

Given all of this, one might ask what’s the best way to get started building out an AI factory. As one might expect, the answer is that it’s complicated, particularly when it comes to sizing GPU capacity for inference. 

But VAST Data takes its role as a partner with our customers very seriously, and we’ve helped many of them right-size their AI factories to match their AI strategies. Not only do we operate across multiple levels of the AI stack, we also work with the world’s leading GPU providers to optimize storage system performance across their hardware platforms. Assuming someone has already determined their target use cases, we can help them hone in on the capacity considerations they’ll need to make. 

However, because model architectures and approaches for increasing efficiency are always evolving, determining the right number of GPUs for LLM inference requires assessing the specific architectures and behaviors of target models. AI-factory sizing for any given model is a more predictable exercise when using standard transformer models, but is markedly more fluid when incorporating MoE architectures, alternative model types (e.g., state space models), and techniques like quantization for minimizing KV cache capacity. 

Sample AI Factory Calculation: GPU Count

Let’s say, for example, that an organization wants to run AI inference workloads using a particular language model. Below are the steps we’d traditionally recommend for determining the GPU capacity required by the language model alone (i.e., not an entire AI factory that might also include infrastructure for training, additional models, and agentic workloads, as well as data storage capacity). We say “traditionally” because, for ease of calculations, we’re assuming a standard transformer model.

The first step is determining the base VRAM capacity needed to store context in the KV cache.

Once base VRAM capacity is calculated, you can determine the total number of GPUs you’ll need.

Sample AI Factory Calculation: Vector Database Capacity

Another common consideration when building out an AI factory is the infrastructure required for a vector database, which is a key component of large-scale document- and/or video-RAG applications, as well as semantic search functions. The workflow below walks you through sizing vector database capacity, which is universally applicable. It does not address the infrastructure required to meet target system throughput (e.g., vectors per second) or system traffic (e.g., the max number of concurrent queries), both of which are functions of the chosen database and CPU platform. (Naturally, VAST assumes customers are using its native - and high-performance - vector database backed by VAST CNodes.)

If you’re planning an AI factory and want to explore how VAST Data can support your GPU infrastructure, inference workloads, and data services, learn more about the VAST AI OS.

Share this

More from this topic

From Batch Jobs to Self-Service HPC: The New Shape of HPC Infrastructure

From Batch Jobs to Self-Service HPC: The New Shape of HPC Infrastructure

For decades, high-performance computing was built around a relatively stable model. Expert users worked within centrally managed systems, submitted jobs into schedulers and waited for infrastructure to allocate the resources they needed.
November 16, 2026
FAIR Data Platform: Curating Research Data Where It Lands

FAIR Data Platform: Curating Research Data Where It Lands

Every research computing centre has the same problem.
November 16, 2026
Rethinking KV Cache Offloading: The Architectural Imperative of Shared vs. Local NVMe Storage

Rethinking KV Cache Offloading: The Architectural Imperative of Shared vs. Local NVMe Storage

In modern scale-out LLM inference architectures, managing KV cache capacity is a primary driver of throughput and overall cost efficiency, with DeepInfer publishing that KV cache optimizations helped...
November 11, 2026

Let’s talk about your data

Whether you want to speak with sales, see a personalized demo, or work through your architecture with a systems engineer, we’re here to help. Choose how you’d like to connect.