APX AI
Online
When a model outgrows the VRAM of a single GPU, operators must distribute the parameters across multiple hardware devices. A 70B parameter dense model loaded in FP16 precision requires approximately 140GB of memory just for the static weights. This footprint exceeds the capacity of enterprise accelerators like an 80GB A100 or H100 and completely dwarfs consumer hardware like dual 24GB RTX 3090 setups. While tensor parallelism splits individual matrix operations within a single layer, pipeline parallelism takes a macroscopic approach. It slices the entire transformer architecture sequentially, placing groups of consecutive layers onto separate GPUs or physical servers.
Transformer models are built from identically structured, repeating blocks. Pipeline parallelism assigns continuous ranges of these blocks to distinct processing stages. During the forward pass, a device processes its assigned layers and transmits only the final output activations to the next device in the chain.
For example, deploying meta-llama/Meta-Llama-3.1-70B-Instruct, which contains 80 transformer layers, across four 80GB A100 GPUs using pure pipeline parallelism. The model is partitioned into four stages of 20 layers each:
Each GPU holds exactly one quarter of the model weights, amounting to about 35GB of static VRAM per device. Because the sequential dependencies of the layers remain intact, GPU 1 cannot begin computing its forward pass until GPU 0 finishes processing the batch and transmits the intermediate tensor over the network.
Physical to logical layer mapping for a 4-stage pipeline distributed across two distinct servers. Forward passes move sequentially down the stack, while gradients flow in reverse during training.
Pipeline parallelism requires significantly less communication bandwidth than tensor parallelism. Instead of synchronizing partial matrix products at every attention head, GPUs in a pipeline only exchange a single activation tensor at the boundary between layer partitions.
The payload size of this boundary tensor is calculated as:
If you process a batch of 8 sequences, each 4096 tokens long, using meta-llama/Meta-Llama-3.1-70B-Instruct (which has a hidden dimension of 8192) in FP16 (2 bytes per element):
Moving 536 MB across the network is a trivial task for standard data center infrastructure. A standard 100 Gbps Ethernet connection (capable of transferring ~12.5 GB/s) can move this tensor between physical servers in about 43 milliseconds. Because it tolerates higher latency and lower bandwidth, pipeline parallelism is the standard strategy for splitting models across separate physical machines, while tensor parallelism is strictly reserved for GPUs connected by ultra-fast NVLink (300 to 1800 GB/s) within the same motherboard.
The strict sequential nature of the pipeline introduces a major hardware utilization problem. If you send a single batch through the four GPUs, three GPUs will always sit idle waiting for their turn to process the data. This idle time is known as the pipeline bubble.
To increase compute throughput, operators divide the total global batch into smaller, sequential segments called micro-batches (). By continuously feeding new micro-batches into the first GPU, all GPUs can eventually work in parallel on different stages of the sequence. However, a startup and teardown delay always exists at the beginning and end of the step.
The idle time fraction for a pipeline setup is calculated using the number of pipeline stages () and the number of micro-batches ():
If you deploy Qwen/Qwen2.5-32B across 4 pipeline stages () and split the input into 8 micro-batches ():
Under these conditions, 27.2% of your cluster's total Tensor Core compute capacity is wasted waiting for data. To shrink the bubble down to a more acceptable 8.5%, you must increase the number of micro-batches to 32 ().
While increasing the number of micro-batches solves the compute utilization problem, it creates a severe memory capacity problem during fine-tuning.
In a training scenario, the 1F1B (One-Forward-One-Backward) schedule dictates that a GPU must store the forward activations for every micro-batch it processes until the backward pass reaches it from the end of the pipeline. If GPU 0 processes 32 micro-batches before receiving the first gradient update from GPU 3, GPU 0 must hold the intermediate activations for all 32 micro-batches simultaneously in VRAM.
This means that activation memory scales linearly with the number of micro-batches:
If a single micro-batch of 2 sequences at a 4096 context length consumes 1.5GB of activation memory on a given stage, increasing the pipeline depth to 32 micro-batches will instantly require 48GB of VRAM dedicated purely to activations. On an 80GB accelerator, combining this 48GB activation footprint with the 35GB static weight footprint will cause an Out-Of-Memory (OOM) crash. System operators must carefully balance the parameter to minimize the pipeline bubble without breaching the physical VRAM capacity limits of the hardware.
Modern inference servers natively support combining pipeline and tensor parallelism, which is known as 3D Parallelism when combined with data parallelism. This hybrid topology is necessary when running massive architectures like a 100B+ parameter dense model or a large Mixture of Experts (MoE) system over multiple physical servers.
Combining tensor parallelism within nodes and pipeline parallelism across nodes distributes the 70B model cleanly across multiple servers:
vllm serve meta-llama/Meta-Llama-3.1-70B-Instruct \
--tensor-parallel-size 4 \
--pipeline-parallel-size 2 \
--max-model-len 8192 \
--dtype bfloat16
In this layout, Server 1 loads layers 0 to 39, sharding the matrix multiplications of those specific layers across its 4 GPUs. Server 2 loads layers 40 to 79, sharding them across its local 4 GPUs. Server 1 completes the first half of the inference step and transmits the boundary activations over the network to Server 2, which finishes processing the tokens. This configuration maximizes memory bandwidth where it matters most and bypasses interconnect bottlenecks between nodes.
Wei-Ming Thor
• Founder & Engineer, ApX Machine Learning
Specializes in model architecture analysis and hardware capacity sizing for LLM infrastructure. Maintains the ApX VRAM Calculator.
© 2026 ApX Machine LearningContent Integrity & Transparency•