AI Inference

AI inference and hardware for running models

Inference is the use of an already trained model on new data: it answers a question, recognises a document or makes a prediction without changing its weights. A standard server CPU may be enough for small models and occasional requests, while larger language models usually need GPUs. Hardware is selected according to memory capacity, input length, the number of concurrent requests and acceptable latency: the most powerful system is far from necessary for every project.

What inference means in simple terms

Inference means drawing a conclusion. A model applies patterns learned during training: it receives data and returns a result, such as a support-ticket category or the probability of equipment failure. Its weights, the numerical parameters of the model, remain unchanged.

For example, a support chatbot receives a customer's question and extracts from a knowledge base. Generating the response is inference. Adding a new instruction to the knowledge base does not, by itself, retrain the model: the request context changes, while the parameters stay the same.

Inference in machine learning: how it differs from training

During training, a model changes its parameters to reduce errors on examples. During inference, it applies the parameters it already has. These tasks have different hardware requirements.

Comparison Inference Training
Goal Produce an answer, prediction or classification Change the model parameters and teach it to solve a task
Data Incoming requests or a prepared batch A training dataset, often with target answers
Computation Forward pass; repeated passes for new tokens during text generation Forward pass, backpropagation and parameter updates
Memory contents Weights, intermediate data and working buffers; language models also need a context cache Additionally, gradients, optimiser states and data saved for the backward pass
Numerical formats FP16, BF16, FP8, INT8, INT4 and other supported options Usually mixed precision; some operations and states require higher precision
Workload pattern Interactive serving or batch processing Separate training runs that may take a long time and recur regularly

Fine-tuning adapts an existing model to new examples. It often needs fewer resources than training from scratch, but it is still training: the parameters change. Hardware used to serve responses is therefore not necessarily suitable for fine-tuning.

How LLM inference works

What a large language model is

LLM stands for large language model. It continues text based on context, determining the next element of the response step by step. This is the basis of conversational assistants, document generation and information extraction.

Tokens and the two processing phases

Prefill and decode phases of LLM inference

Text is divided into tokens, elements of the model's vocabulary: parts of words, punctuation marks and other fragments. Word counts and token counts are different; their relationship depends on the language and tokenisation method.

Processing has two phases:

  1. Input-context processing, or prefill. The model processes the request tokens, including instructions, conversation history and supplied documents. A large input requires substantial computation; this phase is often limited by the accelerator's compute capability.
  2. Response generation, or decode. The model produces its continuation one token per step. With a small batch of requests, the bottleneck is often the speed at which weights and cache data can be read from memory.

This distinction is explained in NVIDIA's technical article on processing long prompts. It shows why both compute performance and memory bandwidth matter for a language model. The teraflops figure in a specification is not enough on its own.

Context cache and performance metrics

The KV cache stores attention keys and values for tokens that have already been processed, so they do not need to be recalculated at every step. It contains intermediate data for continuing a sequence, rather than an archive of completed answers.

The cache grows with context length and the number of active requests; shared fragments can sometimes be reused. A successful single-model run therefore does not establish that there is enough memory for a service with multiple users.

Several metrics are needed to assess a service:

  • Time to first token, or TTFT. How long a user waits for a response to start. This may include queueing, data preparation and input-context processing.
  • Generation speed per user. How many tokens per second an active request receives after the response starts. The inverse metric is the time between output tokens.
  • Total throughput. How many requests or output tokens the entire server handles per unit of time while meeting the specified latency limits.
Get Expert Help
Choosing the Right Equipment

Our specialists will contact you and answer all your questions

I agree to process my personal data

Where inference is used

Inference powers support chatbots, invoice recognition, shop recommendations, failure prediction and video analytics. A classifier may return a result in one forward pass, while a language assistant generates its response sequentially.

In an assistant that searches documents, using retrieval-augmented generation, or RAG, relevant passages are retrieved first and then passed to the model. Slow retrieval and unnecessary documents increase latency even when the accelerator has spare capacity.

Types of inference: online, batch, cloud and on-device

Processing time and deployment location are independent characteristics: an online service can run on a company's own server, while a cloud system can process jobs overnight.

  • Online inference responds to requests as they arrive. It is used for conversational assistants, website recommendations and event detection. Latency, queueing and resilience to spikes in demand matter.
  • Batch inference processes an accumulated dataset, such as a document archive or product descriptions. Waiting is often acceptable, while processing cost and total work completed are important. Training and retraining do not belong to this category.
  • Cloud inference uses rented compute resources or a hosted model service. It enables a faster start, but charges, resource availability and data-transfer terms must be considered.
  • Inference on your own server gives you control over the model, data and hardware utilisation. Infrastructure maintenance also remains the responsibility of the owner or their contractor.
  • On-device inference runs close to the data source, on a phone, workstation or industrial computer. It reduces dependence on connectivity but is limited by local memory, power and cooling.

How inference is accelerated

Quantisation

Quantisation reduces the number of bits used to represent numbers. For the weights alone, moving from FP16 to FP8 or INT8 theoretically halves memory consumption; moving to INT4 reduces it to approximately one quarter. FP8 is a floating-point format, while INT8 and INT4 are integer formats.

Actual savings are smaller because of metadata; the KV cache and working buffers must be accounted for separately. Quality and speed must be tested with the selected model and hardware. GGUF is a model storage format, rather than a separate quantisation method.

Continuous batching

Continuous batching of inference requests

With conventional batch processing, short requests may have to wait for long ones. Continuous batching allows new requests to be added as previous ones finish. The accelerator can therefore handle a changing stream without waiting for the entire original batch to complete.

Inference engines

An engine manages computation, memory and the request queue. Server deployments use vLLM, TensorRT-LLM and SGLang; llama.cpp and Ollama are used for local execution. Model and hardware support must be checked.

The vLLM documentation describes continuous batching, reuse of shared prompt prefixes and PagedAttention, a KV-cache memory-management mechanism that reduces waste from inefficient allocation. These optimisations reduce wasted memory but do not increase its physical capacity.

Speculative decoding

The system proposes several tokens using a smaller model or another mechanism, and the main model verifies them. A correct acceptance algorithm preserves the main model's output distribution. The speedup depends on the proportion of accepted proposals and the verification overhead; there is no universal multiplier.

Distillation

Distillation transfers the behaviour of a large model to a smaller one through additional training. The compact model requires fewer resources, but its quality may differ. This approach is useful for narrowly defined tasks with verifiable results, such as classifying support requests or extracting fields from documents.

What hardware inference needs

When browsing the AI server catalogue, start with the model and its operating conditions. Weight size determines the initial memory requirement, while context length and the number of active requests add to the load. Next, assess memory speed, accelerator interconnects and service availability requirements.

How much GPU memory a model needs

The starting estimate is straightforward: memory for weights equals the number of parameters multiplied by the number of bytes per parameter. FP16 and BF16 use 2 bytes, FP8 and INT8 use 1 byte, and INT4 uses approximately half a byte, excluding metadata.

This gives the following estimates for weights alone:

  • an 8-billion-parameter model in FP16: approximately 16 GB;
  • a 70-billion-parameter model in FP16: approximately 140 GB;
  • the same 70-billion-parameter model in FP8: approximately 70 GB;
  • in INT4, its weights occupy approximately 35 GB before quantisation metadata is added.

These are decimal estimates, while software may report capacity in binary units. In addition to weights, memory is needed for the KV cache, intermediate data, the engine and operating headroom. Having 16 GB of weights therefore does not mean a 16 GB card is sufficient for the service.


In mixture-of-experts models, or MoE, only some parameters are active for each token, but all experts must be present when the model is fully resident in memory. Memory must be sized for the entire model, rather than just the active parameters. Offloading some weights to system RAM usually adds latency.

When choosing GPUs for AI, compare capacity, memory bandwidth and support for the required compute formats. Common capacities are discussed in detail in “How Much Video Memory Is Needed for Neural Networks”.

CPU servers

A central processing unit, or CPU, is suitable for many traditional machine-learning models, tabular-data processing and some embedding workloads: embeddings are numerical representations of text used for search and comparison. Small language models can also run on CPUs, particularly after quantisation and when requests are infrequent.

A CPU makes sense when requests are infrequent, response times are acceptable and spare resources are available. System-memory speed, populated memory channels and support for the necessary instructions matter alongside core count.

The limits of this approach and the conditions for moving to a GPU are covered in our article on Intel Xeon servers for AI inference.

Servers with one or two GPUs

Liquid-cooled NVIDIA RTX PRO 6000 Blackwell Server Edition

RTX PRO 6000 Blackwell Server Edition with liquid cooling. Image source: NVIDIA.

GPU servers are suitable for internal assistants, document recognition and search across corporate materials. Memory-capacity reference points include NVIDIA L4 at 24 GB, L40S at 48 GB and RTX PRO 6000 Blackwell Server Edition at 96 GB. For models with a few billion to tens of billions of parameters, assess memory requirements and acceptable latency first.

Servers with two GPUs can host independent model replicas, separate workloads or distribute one large model across the cards. In the last case, communication speed between GPUs is particularly important.

Two 48 GB cards do not automatically become a single 96 GB card: the engine must support distributing the model. Power, cooling, card dimensions and PCIe connectivity must also be considered.


Servers with four or eight GPUs

Servers with four GPUs and systems with eight GPUs are needed as model count, overall request volume or the size of one model grows. However, the number of cards alone does not determine how the system operates.

There are three common scenarios:

  1. Several independent model replicas handle different requests. The load is distributed between them.
  2. One model is split across accelerators. There is enough memory to hold it, but communication overhead is added.
  3. Different cards perform different tasks, such as retrieval, image recognition and response generation.

For smaller models, the opposite approach is also possible: dividing a single GPU into isolated instances using MIG. According to NVIDIA's documentation, supported GPUs include H200, B200, B300 and RTX PRO 6000 Blackwell Server Edition; the last supports up to four instances. L4 and L40S are not on the supported-model list. Partition sizes depend on the GPU and software environment.

Partitioning helps allocate resources to smaller services but does not increase the card's total memory. Different ways of using multiple accelerators are compared in “1, 2, 4 or 8 GPUs in a Server”.

Get Expert Help
Choosing the Right Equipment

Our specialists will contact you and answer all your questions

I agree to process my personal data

HGX and NVIDIA DGX

Supermicro SYS-822GS-NB3RT NVIDIA HGX B300 server

Supermicro SYS-822GS-NB3RT based on the NVIDIA HGX B300 platform. Image source: Supermicro.

HGX is NVIDIA's platform with accelerators and high-speed interconnects for partner-built servers. DGX is a complete NVIDIA system with a validated configuration, software and support. The systems differ in layout, components and support arrangements.

In eight-accelerator HGX and DGX systems from the H200, B200 and B300 generations, NVLink and NVSwitch provide GPU-to-GPU connectivity. Fast communication is particularly useful when one model is distributed across several accelerators: its parts need to communicate during processing, as well as during loading.

According to NVIDIA's documentation for HGX platforms, H200 SXM has 141 GB of HBM3e per GPU, B200 has 180 GB and B300 has 288 GB. For eight accelerators, total nominal memory capacity is 1,128, 1,440 and 2,304 GB respectively. HBM is high-bandwidth memory located close to the compute dies.

Memory is distributed between GPUs. A single model requires a supported distribution strategy, and some capacity is used by cache and overhead. Model size cannot be equated with the entire stated memory capacity.


You can compare complete systems in the NVIDIA server section. Options for large models and multi-user inference include:

System Accelerators and nominal memory When to consider it
NVIDIA DGX B200 8 × B200 with 180 GB each; 1,440 GB of HBM3e in total A complete NVIDIA system is needed for large models and high overall load
NVIDIA DGX B300 8 × B300 with 288 GB each; 2,304 GB of HBM3e in total More memory headroom is needed for weights, context and concurrent requests
Supermicro SYS-822GS-NB3RT HGX B300 NVL8 HGX B300 platform with 8 GPUs of 288 GB each A partner-built server using NVIDIA's eight-accelerator platform is needed

DGX can be justified for large models, heavy workloads or strict latency requirements. “Hundreds of concurrent requests” is not a sufficient workload description: short classification tasks and long responses place different demands on a system. The result must be verified by testing the application.

Consider rack power and cooling, networking, deployment location and service redundancy. One powerful node is still a single point of failure. Platform differences are covered in “PCIe, SXM, HGX and DGX”, while generations of complete systems are discussed in our comparison of DGX B300, B200, H200 and H100.

DGX Spark and workstations

NVIDIA DGX Spark uses the GB10 chip and memory shared by the CPU and GPU. NVIDIA's guide specifies 128 GB of LPDDR5x and bandwidth of 273 GB/s. This capacity is also used by the operating system and applications: the full 128 GB cannot be allocated to weights alone.

The advertised support for models with up to 200 billion parameters requires an appropriate weight format. This describes the ability to fit a model, rather than a guarantee of speed. Spark's shared-memory bandwidth is substantially lower than that of HBM in server systems.

Compact size and convenience matter for development; availability and resilience under load matter for a service running around the clock. These scenarios are compared in our article on DGX Spark, DGX Station and DGX servers.

Alternatives to NVIDIA

AMD Instinct and Huawei Ascend are also used for inference: the catalogue includes servers with AMD GPUs and systems with Huawei Ascend. Before choosing, check support for the model, engine, quantisation and distributed execution. Equal memory capacity does not guarantee equal speed or compatibility.

Once the platform class has been determined, size the configuration for actual operating conditions. How to choose an LLM server for the required users, context and latency is covered in detail in a separate Servermall article.

Your own server or the cloud

On-premises and cloud AI inference

The cloud is convenient for experiments and demand peaks: you can test different configurations before buying hardware. Renting GPUs and paying for a hosted model according to processing volume are different pricing models.

Your own server suits sustained workloads, data-location requirements and control over the software environment. The financial benefit depends on actual utilisation: idle hardware can cost more than renting.

When comparing costs, account for:

  • actual operating time and accelerator utilisation;
  • electricity, cooling and hosting;
  • administration, software maintenance and updates;
  • spare hardware and recovery after failures;
  • network traffic, data storage and possible data-transfer charges.

A hybrid approach is also possible: steady workloads run on your own hardware, while permitted tasks are sent to the cloud during peaks. Costs and deployment considerations are discussed in more detail in “On-Premise vs. Cloud in 2026: When Is an On-Premise Server More Profitable?”.

Frequently asked questions

What does inference mean in neural networks?

Inference means drawing a conclusion and refers to applying a trained neural network to new data, such as recognising a document or generating a response. The model's weights remain unchanged.

How does inference differ from training?

Training changes a model's parameters; inference uses existing ones. Training requires additional computation and memory for gradients and the optimiser. Fine-tuning also changes parameters.

Can models run on a CPU?

Yes. A CPU can be sufficient for traditional models, small language models and occasional requests. Being able to load weights into system RAM does not guarantee fast generation.

How much GPU memory does a 70-billion-parameter model need?

Approximately 140 GB for FP16 weights, 70 GB for FP8 or around 35 GB for INT4, before overhead. Additional memory is needed for the KV cache, intermediate data and the engine. Required capacity therefore depends on context length, the number of concurrent requests and the model implementation.

Is DGX necessary for inference?

No. A CPU or a conventional GPU server is often enough. HGX and DGX are useful when large amounts of fast memory, intensive GPU-to-GPU communication and heavy workloads are required. Validate the choice by testing the intended model.

How to choose a platform for your project

Choose a model with acceptable quality, define acceptable latency and estimate memory requirements including context and concurrent requests. Then test the platform with a representative workload. This will show where DGX is needed and where a CPU, one GPU or a smaller model is sufficient.


Get Expert Help
Choosing the Right Equipment

Our specialists will contact you and answer all your questions

I agree to process my personal data
Comments
(0)
No comments
Write the comment
I agree to process my personal data

Next news

Be the first to know about new posts and earn 50  €