Topic 12 of 20 · 41 words
AI Infrastructure & Runtime
Production engines, parallelism strategies, kernels, and local runners—from vLLM, SGLang, and TensorRT-LLM to llama.cpp and Ollama.
✎ Napkin Diagram · Topic 12AI Runtime Engines: Sharing the Oven So Nobody Waits in Line
PNG ↗The 41 words, in learning order
Start at 1. Each word builds on the ones before it.
- RuntimeA runtime is the software environment that actually executes a program or AI model while it is running.
- Inference ServerAn inference server is a program that runs AI models and answers requests from apps over a network.
- Inference EngineAn inference engine is software built to run trained AI models quickly and efficiently.
- Model LoaderA model loader is the part of AI software that reads model files and puts the weights into memory in the right format.
- Model ServingModel serving is running a trained model so people or apps can use it reliably, usually through an API.
- Model DeploymentModel deployment is the process of putting a trained model into real use, in an app, server or device.
- Model ShardingModel sharding splits a model's weights into pieces, called shards, that are stored or run on different devices or files.
- Tensor ParallelismTensor parallelism splits individual layers of a model across several GPUs, so each GPU computes part of every layer.
- Pipeline ParallelismPipeline parallelism splits a model by layers, giving each GPU a group of consecutive layers.
- Data ParallelismData parallelism trains copies of the same model on different GPUs, each with different data, then combines what they learned.
- Expert ParallelismExpert parallelism spreads the experts of an MoE model across different GPUs, so each GPU holds and runs some of the experts.
- Distributed InferenceDistributed inference runs a single model across multiple GPUs or machines to answer requests.
- Distributed TrainingDistributed training spreads the work of training a model across many GPUs or machines.
- Model OffloadingModel offloading moves parts of a model out of fast GPU memory into slower memory, like system RAM or disk, so it can still run.
- CPU OffloadingCPU offloading moves some model layers or data from the GPU to the CPU and system RAM.
- GPU OffloadingGPU offloading moves work from the CPU to the GPU to make it faster.
- Memory Mapping (mmap)Memory mapping, or mmap, lets a program treat a file on disk as if it were already in memory, loading pieces only when needed.
- Model LoadingModel loading is the step of reading a model's weights from storage into memory so it can run.
- Cold StartA cold start is the delay when a model or server has to start from scratch before it can answer a request.
- Warm StartA warm start is when a model is already loaded and ready, so requests are answered right away.
- Batch ProcessingBatch processing runs many tasks together as a group, often not in real time.
- Request QueueA request queue is a waiting line where incoming AI requests sit until the server can process them.
- SchedulingScheduling is deciding which requests run when, and on which hardware.
- ConcurrencyConcurrency is handling many requests or tasks at the same time.
- ThroughputThroughput is the total amount of work a system completes over time, like the number of tokens or requests per second across all users.
- LatencyLatency is the delay between asking for something and getting a response.
- Quantization BackendA quantization backend is the software that implements a particular quantization format and runs quantized models.
- KernelIn AI computing, a kernel is a small, highly optimized program that runs one operation on a GPU or other accelerator.
- CUDA KernelA CUDA kernel is a GPU program written with NVIDIA's CUDA that runs in parallel across thousands of GPU threads.
- MetalMetal is Apple's graphics and computing platform that lets software use the GPU on Macs, iPhones and iPads.
- VulkanVulkan is a cross-platform graphics and compute standard that works on GPUs from many companies.
- ROCmROCm is AMD's software platform for running AI and other computing work on AMD GPUs, similar to NVIDIA's CUDA.
- OpenCLOpenCL is an older open standard for running parallel computations on many kinds of processors, including GPUs and CPUs.
- MLXMLX is Apple's open-source machine learning framework built for Apple silicon chips.
- llama.cppllama.cpp is a popular open-source program for running large language models efficiently on ordinary computers.
- vLLMvLLM is an open-source, high-performance inference engine for serving LLMs to many users at once.
- SGLangSGLang is an open-source framework for fast LLM serving and for structuring complex prompts and generation.
- TensorRT-LLMTensorRT-LLM is NVIDIA's library for running LLMs as fast as possible on NVIDIA GPUs.
- OllamaOllama is a free app that makes it easy to download and run open-weight LLMs on your own computer.
- LM StudioLM Studio is a desktop app with a friendly interface for finding, downloading and chatting with local AI models.
- Hugging Face TransformersHugging Face Transformers is a widely used Python library for downloading, running and fine-tuning thousands of AI models.
How AI Infrastructure & Runtime fits together
A raw model weight file cannot answer requests on its own; it needs an inference runtime to load weights, schedule GPU kernels (CUDA, Metal, ROCm), batch incoming users, and stream responses. Server engines like vLLM, SGLang, and TensorRT-LLM maximize multi-user throughput across GPU clusters using tensor and pipeline parallelism.
On personal laptops and workstations, lightweight runtimes like llama.cpp, MLX, Ollama, and LM Studio use quantized weights and unified memory so models start quickly and run offline.