Read page 1 as text
What actually hosts an LLM?
Downloading weights is not the same as running a service.
WHAT WE WILL FIGURE OUT
01
Follow the serving stack
02
Split one model instance
03
Replicate the service
OUR EXAMPLE
A toy 140 GB weight payload split across four GPUs.
Follow the steps. Ask the obvious questions. Check the result.
Part 13 of 18 · Challenge: page 5 · Suggested answers: page 6
Read page 2 as text
Follow the serving stack
1
THE DOWNLOADED FILE
FOLLOW THE CHANGE
artifacts
engine
API
artifacts
→
engine
→
API
Can my app just call the weights?
Weights need architecture code, tokenization, configuration and an execution runtime. A service also needs request handling.
Artifacts → engine → API → application
2
THE INFERENCE ENGINE
kernels
scheduler
cache
kernels
scheduler
cache
The engine runs kernels and manages scheduling and cache memory. Runtime capabilities vary by model and hardware.
Example engine: vLLM; evaluate required features
3
THE API AND GATEWAY
FOLLOW THE CHANGE
client
gateway
engine
client
→
gateway
→
engine
The API formats requests and streams results. A gateway can add authentication, limits, routing and observability.
Client → gateway → API → engine
4
COMPATIBLE IS NOT IDENTICAL
FOLLOW THE CHANGE
compatible API
integration test
compatible API
→
integration test
An OpenAI-compatible interface can ease client migration. Verify supported fields, chat templates, tool use and behavior.
Changing a base URL still needs integration tests
Read page 3 as text
Split one model instance
5
THE MODEL WILL NOT FIT
ONE MODEL, FOUR COOPERATING SHARDS
GPU 1 35 GB
GPU 2 35 GB
GPU 3 35 GB
GPU 4 35 GB
Together: 140 GB raw weights
140 GB / 4
→
35 GB each
Do four GPUs mean four copies?
Not when one instance is sharded. Tensor parallelism divides tensor computation across cooperating GPUs.
Toy raw payload: 140 GB / 4 = 35 GB each
6
TENSOR PARALLELISM
FOLLOW THE CHANGE
partial results
communication
partial results
→
communication
The GPUs combine partial results frequently. Communication bandwidth and latency can limit the benefit.
Each layer can involve cross-device communication
7
PIPELINE PARALLELISM
TOY: 32 LAYERS, FOUR PIPELINE STAGES
layers 1-8
›
layers 9-16
›
layers 17-24
›
layers 25-32
Each stage holds different layers
1-8
→
9-16
→
17-24
→
25-32
Different devices hold different groups of layers. A sequence flows through stages; idle pipeline bubbles can waste capacity.
Stage 1 → stage 2 → stage 3 → stage 4
8
CHOOSE THE TOPOLOGY
tensor split
pipeline split
tensor split
pipeline split
Fast links help tightly coupled work. Tensor and pipeline strategies can be combined across nodes and devices.
There is no absolute single-node-only rule
Read page 4 as text
Replicate the service
9
NOW ADD REPLICAS
TWO REPLICAS: TWO MODEL COPIES
Replica A 140 GB
Replica B 140 GB
Raw weights, before state and overhead
router
replica A
replica B
How do I handle more requests?
Data parallel serving runs additional model instances. Each replica has its own loaded weights and request capacity.
Replica A + replica B behind a router
10
ROUTE WITH LOAD IN MIND
warm prefix
queue pressure
warm prefix
queue pressure
A router can consider queue depth, cache capacity and eligible warm prefixes. Cache locality must be balanced against overload.
A warm but overloaded replica may still be slower
11
PREFILL AND DECODE POOLS
FOLLOW THE CHANGE
prefill worker
KV transfer
decode
prefill worker
→
KV transfer
→
decode
Some designs separate prompt processing from decode workers. Moving KV state introduces its own network and scheduling costs.
Disaggregation is a tradeoff, not free capacity
12
MY NEW MENTAL MODEL
shards
replicas
shards
replicas
Sharding fits one instance; replicas add capacity.
Budget weights, request state and communication for each deployed layout. Then benchmark the complete service.
Four shards are not automatically four replicas
Read page 5 as text
Your turn. Can you explain what happens?
Use the same example. Change one detail. What follows?
KEEP THIS EXAMPLE IN MIND
A toy 140 GB weight payload split across four GPUs.
Try first. Suggested answers are on the next page.
1
In the toy four-way split, what is each GPU’s raw weight share?
What makes you say that?
2
Which strategy assigns different groups of layers to stages?
What makes you say that?
3
Why can API compatibility fail to guarantee identical application behavior?
What makes you say that?
Write your answers in the comments.
Read page 6 as text
Suggested answers
What actually hosts an LLM?
01
In the toy four-way split, what is each GPU’s raw weight share?
35 decimal GB before overhead and uneven partition details.
02
Which strategy assigns different groups of layers to stages?
Pipeline parallelism.
03
Why can API compatibility fail to guarantee identical application behavior?
Supported features, templates, tokenizers and model behavior can differ.