What is inference engineering?
Training a model happens once; inference happens every time a user sends a request. Inference engineers make that step fast, reliable and affordable, especially for large language models where a single GPU can cost thousands of dollars a month.
The role mixes systems engineering, GPU knowledge and machine learning. It has grown quickly as companies move from calling hosted APIs to running open-weight models themselves.
How to use this Inference Engineering roadmap
You need solid Python and some machine learning background before step 3. If you lack those, finish the Python and machine learning roadmaps first.
Rent GPUs by the hour from a cloud provider for practice, and always measure before and after every change: tokens per second, time to first token and cost per million tokens.
1Step 1: Python, systems and ML basics
The base layer for everything else.
What is it?
You need fluent Python, a working knowledge of how neural networks run a forward pass, and enough systems knowledge to reason about memory and throughput.
What to learn
Profile everything. Guessing where time goes is almost always wrong.
Learn each topic here
Python and PyTorch
Tensors, modules, devices and running a forward pass.
Why it matters: Most inference code starts here.
Transformer architecture
Attention, layers, tokens, context length and why memory grows with sequence length.
Why it matters: You cannot optimise what you do not understand.
Concurrency
Async code, threads, processes and queues.
Why it matters: Servers handle many requests at once.
Profiling
cProfile, PyTorch profiler and timing tools.
Why it matters: Find the real bottleneck.
Linux and containers
Drivers, Docker with GPU support and process monitoring.
Why it matters: Production runs in containers.
Example
python
import torch, time
x = torch.randn(64, 4096, device="cuda")
w = torch.randn(4096, 4096, device="cuda")
torch.cuda.synchronize(); t = time.time()
for _ in range(100): y = x @ w
torch.cuda.synchronize(); print((time.time() - t) / 100 * 1000, "ms")Timing a GPU matrix multiply correctly, including synchronisation.
Helpful resource: PyTorch tutorials
2Step 2: GPU hardware and performance
Know the machine you are paying for.
What is it?
Inference speed is often limited by memory bandwidth, not raw compute. Understanding GPU memory, bandwidth and interconnects explains most performance results.
What to learn
Learn to tell compute-bound from memory-bound. It decides which optimisation will help.
Learn each topic here
GPU memory and bandwidth
HBM size, bandwidth and why decoding one token at a time is memory-bound.
Why it matters: Explains why batching helps.
CUDA basics
Kernels, threads, blocks and streams at a conceptual level.
Why it matters: Needed to read performance traces.
Multi-GPU and interconnects
NVLink, PCIe and network links between servers.
Why it matters: Large models span several GPUs.
Roofline thinking
Compare arithmetic intensity to hardware limits.
Why it matters: A quick way to spot the bottleneck.
Accelerator options
NVIDIA GPUs, AMD, and cloud chips such as TPUs and Trainium/Inferentia.
Why it matters: Price and availability vary widely.
Example
bash
nvidia-smi --query-gpu=name,memory.used,memory.total,utilization.gpu --format=csv -l 2Watching GPU memory and utilisation every two seconds while a model serves traffic.
Helpful resource: NVIDIA CUDA programming guide
3Step 3: Core LLM inference techniques
The ideas behind every fast serving stack.
What is it?
Modern LLM serving relies on a handful of techniques: KV caching, continuous batching, paged attention and efficient attention kernels.
What to learn
Measure time to first token and inter-token latency separately. Users feel both.
Learn each topic here
Prefill and decode
Prefill processes the prompt in parallel; decode generates one token at a time.
Why it matters: They have very different performance profiles.
KV cache
Storing attention keys and values so earlier tokens are not recomputed.
Why it matters: The main memory cost of serving.
Continuous batching
Adding and removing requests from a running batch each step.
Why it matters: Large throughput gains.
Paged attention
Managing the KV cache in blocks to avoid wasted memory.
Why it matters: More concurrent users per GPU.
FlashAttention
Attention kernels that reduce memory traffic.
Why it matters: Faster long-context inference.
Example
text
Metrics to track per deployment:
- TTFT (time to first token), p50 / p95
- ITL (inter-token latency), p50 / p95
- Throughput: output tokens/sec per GPU
- Max concurrent requests before p95 TTFT > 1s
- Cost per 1M output tokensThe core metrics every inference benchmark should report.
Helpful resource: vLLM paper and docs
4Step 4: Serving frameworks
Use the tools teams run in production.
What is it?
Frameworks such as vLLM, SGLang, TensorRT-LLM, Hugging Face TGI and NVIDIA Triton package the techniques from step 3 behind an API.
What to learn
Start with vLLM because it is widely used and well documented, then compare one alternative.
Learn each topic here
vLLM
Open-source serving with paged attention and an OpenAI-compatible API.
Why it matters: A common default.
TensorRT-LLM and Triton
NVIDIA-optimised engines and a general model server.
Why it matters: Top performance on NVIDIA hardware.
SGLang and TGI
Other popular open serving stacks with their own strengths.
Why it matters: Choice depends on workload.
Tensor and pipeline parallelism
Splitting a model across GPUs.
Why it matters: Required for big models.
Configuration tuning
Max batch size, context length and GPU memory fraction.
Why it matters: Defaults are rarely best.
Example
bash
vllm serve meta-llama/Llama-3.1-8B-Instruct \
--max-model-len 8192 \
--gpu-memory-utilization 0.90
curl localhost:8000/v1/completions -H "Content-Type: application/json" \
-d '{"model":"meta-llama/Llama-3.1-8B-Instruct","prompt":"Hello","max_tokens":32}'Serving an open model with vLLM and calling its API. Check model licence terms before use.
Helpful resource: Hugging Face TGI docs
5Step 5: Model optimisation
Make the model itself cheaper to run.
What is it?
Quantisation, speculative decoding, distillation and prompt caching reduce the work per token, usually with a small quality trade-off that must be measured.
What to learn
Never ship an optimisation without an accuracy check on your own evaluation set.
Learn each topic here
Quantisation
Running weights in 8-bit or 4-bit formats such as FP8, INT8, AWQ or GPTQ.
Why it matters: Fits bigger models on fewer GPUs.
Speculative decoding
A small draft model proposes tokens that the large model verifies.
Why it matters: Lower latency with the same output.
Distillation
Training a smaller model to copy a larger one.
Why it matters: Big cost savings for narrow tasks.
Prefix and prompt caching
Reusing computation for shared prompt prefixes.
Why it matters: Long system prompts get cheap.
Quality evaluation
Benchmarks and task-specific tests before and after.
Why it matters: Speed is useless if answers get worse.
Example
text
Model: 8B instruct
BF16: 16 GB weights, 42 tok/s, eval score 81.2
FP8: 8 GB weights, 63 tok/s, eval score 80.9
Decision: ship FP8, 0.3 point drop is within toleranceA quantisation decision written as numbers, not opinion.
Helpful resource: Hugging Face quantization guide
6Step 6: Production inference at scale
Expert level: run fleets of models reliably and cheaply.
What is it?
At scale the work becomes autoscaling, routing, multi-tenant scheduling, observability and cost modelling across many GPUs and regions.
What to learn
Build a cost model per request type. It drives hardware, model and batching decisions.
Learn each topic here
Autoscaling on GPUs
Scale on queue depth or token load, with warm pools to hide cold starts.
Why it matters: GPUs are slow to start and expensive to idle.
Request routing
Route by model, prompt length or priority, and use prefix-aware routing to reuse caches.
Why it matters: Better utilisation and latency.
Kubernetes for inference
GPU scheduling, node pools and operators such as KServe.
Why it matters: Standard way to run fleets.
Observability
Per-model latency, error rates, GPU utilisation and cost dashboards.
Why it matters: Catch regressions early.
Capacity and cost planning
Forecast demand, reserved versus on-demand GPUs, and cost per token targets.
Why it matters: Inference bills can sink a product.
Example
text
Cost model
GPU: $2.50/hour, sustained 2,400 output tok/s at target latency
Tokens/hour: 8.64M
Cost per 1M output tokens: $0.29
Target utilisation: 65% -> effective $0.45 per 1MA simple cost-per-token calculation every inference team should know by heart.
Helpful resource: KServe documentation
Inference Engineering roadmap project ideas
Publish benchmark numbers with each project. In this field, clear measurements are the portfolio.
Local LLM benchmark
Measure tokens per second for a small model on CPU and GPU.
Load tester
A script that reports TTFT, latency percentiles and throughput.
Framework comparison
vLLM versus another server on the same model and hardware.
Quantisation study
Speed, memory and quality across three precisions.
Speculative decoding demo
Draft-model setup with measured latency gains.
Autoscaled inference service
Kubernetes deployment with routing, dashboards and a cost model.
Tips to finish this inference engineering roadmap
- Measure first. Every claim about speed needs a reproducible benchmark.
- Read release notes. Serving frameworks change monthly and add big wins often.
- Watch the bill. Shut down rented GPUs the moment you finish a session.
- Respect licences. Check each open model’s licence before commercial use.
Career paths and next steps
Roles include inference engineer, ML infrastructure engineer, ML platform engineer and AI performance engineer. AI labs, cloud providers and companies running their own models are the main employers.
From here you can go deeper into GPU kernel work, distributed training, or ML platform leadership.
Related roadmaps
Inference Engineering Roadmap FAQs
What is an inference engineer?
An engineer who makes trained AI models run quickly, reliably and cheaply in production.
Do I need CUDA programming for inference engineering?
Not at first. You need to understand GPU basics; writing custom kernels is a later specialisation.
Is inference engineering a good career?
Demand has grown fast as companies serve their own models, and the skills are scarce, so pay is strong.
Which serving framework should I learn?
vLLM is a good first choice. Learn TensorRT-LLM or SGLang after.