A brass music box mechanism with a punched paper roll feeding through it

Runtime

A runtime is the program that loads a model file and actually runs it. The weights sit on your disk as a large, inert file. The runtime opens that file, moves the numbers somewhere the hardware can reach them, and does the arithmetic of inference that turns your prompt into text, an image or a sound. Nothing happens without one, which is why the word turns up on nearly every page of this glossary and the sections it serves.

The word is overloaded, and it is worth saying so plainly. Elsewhere in computing, a runtime is a supporting environment or library: the CUDA runtime, a JavaScript runtime, the layer between a program and the operating system. If that is the meaning you arrived with, you will find local AI writing confusing, because here the runtime is an ordinary application you install and open. Both usages are in circulation and neither is going away.

Why it matters for local AI

Three different things get called runtimes, and they stack.

At the bottom is the engine doing the arithmetic. llama.cpp is one; PyTorch is the engine underneath most image and video tools. This is a runtime in the strict sense, and it is the layer that decides which file formats load, whether a GGUF file works, and how a given quantization is handled.

Above that is the manager. Ollama fetches models for you and drives an engine on your behalf, so you type a model name instead of a file path.

At the top is the application with a window and buttons: LM Studio, ComfyUI, InvokeAI, Stable Diffusion WebUI. These bundle or call an engine rather than being one.

Here is the useful part. Almost nobody needs to hold those layers apart, because what you install and open is an application and the engine is already inside it. The distinction only surfaces when someone tells you to "use llama.cpp" and you already are, without knowing it.

Rule of thumb

Pick an application, learn it, and stop thinking about the layer below. Three situations bring the engine back into view: you are chasing performance and want to change how the work is scheduled, you are running headless on a server where there is no window to open, or the same model behaves differently in two programs and the engine underneath is the reason.

Related