# Glossary

Each word in two sentences: what it is, then why it matters to someone who runs infrastructure. The definitions are background ([Conventions](<https://ai.ozarland.com/start/conventions/index.md#background>)); the pages of each step go further. The glossary grows with the steps.

## Models

**Model**

A program whose behaviour is learned from data instead of written by hand. For infrastructure, a model is mostly a large file of numbers that must be loaded into memory before it can answer ([What a model is](<https://ai.ozarland.com/understand/what-is-a-model/index.md>)).

**Parameter (weight)**

One of the numbers a model learned; a model has billions of them. The number of parameters, multiplied by the size of each one, gives the memory the model needs.

**Training**

Computing the parameters of a model from data, over days or weeks on many GPUs. It needs the most compute and the fastest links between GPUs.

**Inference**

Using a trained model to answer a request. It is what most private clouds will host, and it is limited mostly by GPU memory and memory bandwidth.

**Fine-tuning**

Training an existing model a little more, on your own data, to adapt it. It needs far less compute than training from scratch, but more than inference.

**Large language model (LLM)**

A model trained on text that predicts the next piece of text. Chat assistants are built on LLMs.

**Token**

The piece of text a language model reads and writes, often part of a word. Speed and cost are counted in tokens per second ([How a large language model answers](<https://ai.ozarland.com/understand/how-an-llm-answers/index.md>)).

**Prefill and decode**

The two phases of answering: reading the whole prompt at once (prefill), then writing the answer one token at a time (decode). Prefill is limited by compute, decode by memory bandwidth.

**Context window**

The number of tokens a model can take into account at once: the question, the documents given to it and its own answer. A longer context needs more GPU memory while the model runs.

**KV cache**

What a language model keeps in GPU memory for every token already processed, so that it does not recompute it. It grows with the context and the number of users, and can outgrow the weights ([How much memory a model needs](<https://ai.ozarland.com/hardware/memory-a-model-needs/index.md#the-kv-cache>)).

**Quantization**

Storing each parameter with fewer bits (for example 8 or 4 instead of 16). The model then needs less GPU memory, usually with a small loss of quality.

**LoRA**

A way to fine-tune a model by training a small set of extra parameters instead of all of them. It needs far less GPU memory than a full fine-tuning.

**Embedding**

A list of numbers that represents the meaning of a text; texts with close meanings get close embeddings. RAG uses embeddings to find the passages that match a question.

**RAG (retrieval-augmented generation)**

Giving a model the passages of your own documents that match a question, before it answers. It lets a model answer from your runbooks without being trained on them ([Four uses](<https://ai.ozarland.com/understand/four-uses/index.md>)).

**Agent**

A model that can call tools (run a command, read a file, query an API) to reach a goal over several steps. On a production cloud, what it is allowed to call is the main question.

## Hardware

**GPU**

A processor made of thousands of small cores that run the same operation on many numbers at once. The calculations of a model are of that kind, so they run much faster on a GPU than on a CPU ([Why GPUs](<https://ai.ozarland.com/hardware/why-gpus/index.md>)).

**HBM (high-bandwidth memory)**

The memory stacked next to a data-centre GPU, read at several terabytes per second. Its bandwidth sets the speed of decoding.

**GPU memory (VRAM)**

The memory on the GPU board itself, separate from the server's RAM. A model must fit in it, which makes it the first limit to check.

**NVLink**

NVIDIA's direct link between GPUs, much faster than PCIe. It matters when one model is split over several GPUs ([Linking GPUs](<https://ai.ozarland.com/hardware/linking-gpus/index.md>)).

**Tensor parallelism**

Splitting every layer of a model over several GPUs, which then exchange data at every layer. It needs the fastest links between those GPUs.

**RDMA**

Remote direct memory access: a network card reads or writes another machine's memory without its CPU. Training across servers relies on it, over InfiniBand or RoCE.

**Passthrough**

Giving a whole physical device, such as a GPU, to one virtual machine. The guest drives it directly, with almost no loss of performance, and no other guest can use it.

**vGPU**

A slice of a physical GPU presented to a virtual machine as a GPU of its own, by the vendor's driver on the host. Several guests share one physical GPU, in turns (time-sliced) or on MIG instances (MIG-backed) ([Sharing a GPU](<https://ai.ozarland.com/hardware/sharing-a-gpu/index.md>)).

**MIG (Multi-Instance GPU)**

A feature of some NVIDIA data-centre GPUs that cuts one GPU into isolated instances, each with its own memory and cores. Unlike time-sharing, one instance cannot slow down another.

## OpenStack

**Nova**

The OpenStack compute service: it creates instances and decides on which host each one runs. Giving a GPU to an instance is configured in Nova.

**Placement**

The OpenStack service that counts the resources of each host (CPU, memory, GPUs) and what is used. Nova asks it which hosts can take an instance.

**Flavor**

The size of an instance: CPUs, memory, disk, and extra requirements such as a GPU. Users get a GPU by choosing a flavor that asks for one.
