A 27B-parameter model that fits on a single 80 GB GPU is usually served on an eight-GPU node as eight independent replicas. When per-token latency matters more, each layer is instead sharded across GPUs with tensor parallelism. Pipeline parallelism, which partitions the model by layer, is generally reserved for training or for models too large for one device. We measured seven ways of partitioning eight A100 80GB GPUs across these three strategies. Under long-context coding-agent traffic, a single eight-stage pipeline delivered the highest throughput of any layout tested.
- 1.74× the decode throughput of eight replicas (DP8), and 4.3× that of TP8, with 32k-token prompts and 512 concurrent requests.
- 2.8× the KV-cache capacity of DP8 on identical hardware, and 1.8× that of TP8.
- One flag:
--pipeline-parallel-size 8. Model, weights and inference engine are unchanged.
With 2k-token prompts the picture is different. PP8 did not lead at any load level and had the lowest throughput at 32 and 128 concurrent requests. Both regimes are reported below, together with the mechanisms that account for each.
Experimental setup
Table 1. Model, hardware, engine and workload configuration.
Parameter | Configuration |
|---|---|
Model |
|
Adapter |
|
Hardware | 8× A100-SXM4-80GB with all-to-all NVLink (NV12) on a single Shadeform node, $1.35/gpu/hr |
Engine | vLLM 0.34.0 with prefix caching enabled, a maximum context of 40,960 tokens and GPU memory utilization of 0.92 |
Load | Closed loop at 32, 128 or 512 concurrent requests, with a 60 s warm-up followed by a 180 s measurement window |
Requests | 2,048 or 32,768 random prompt tokens (no shared prefixes) and exactly 512 output tokens |
Layouts with a data-parallel component run one vLLM server per replica, and the client distributes requests across them round-robin. In this notation, DP4×PP2 denotes four replicas, each split into two pipeline stages over two GPUs. Every layout uses all eight GPUs. The full matrix (7 layouts × 2 prompt lengths × 3 load levels) took about four hours and cost $60.20.
Qwen3.8-27B has a hybrid architecture. Of its 64 layers, 48 use Gated DeltaNet linear attention, which keeps a fixed-size state for each sequence. The other 16 use full attention, whose KV cache grows with context length. The model has only 4 KV heads. This detail turns out to be important in the memory analysis that follows.
Memory allocation by layout
All layouts have the same 596 GiB of HBM available. They differ in how much of it is consumed by weights and how much remains for cache.

Figure 1. HBM allocation per layout, summed across eight GPUs (GiB). The value at right is the KV-cache capacity in tokens reported by vLLM at startup. One copy of the weights occupies 50.7 GiB.
Data parallelism stores the weights eight times. Each DP8 replica holds a complete copy, leaving roughly 22 GiB per GPU for everything else. Across the node, 405 GiB of HBM is occupied by eight identical copies of the weights. Model-parallel layouts store the weights once and make the remaining memory available for cache.
Tensor parallelism cannot divide 4 KV heads among 8 GPUs. Under TP8, vLLM replicates each KV head on two GPUs. As a result, TP8 has nearly the same free memory as PP8 (62.5 vs 64.5 GiB per GPU) yet holds only 56% as many tokens. TP4 places exactly one head on each GPU, which is why DP2×TP4 comes close to PP8 in capacity. Pipeline stages never split heads. Most current open-weight models have eight or fewer KV heads, so the constraint is not specific to this model.
Coding agents produce long prompts made up of a system prompt, tool definitions, file contents and an accumulating history of tool calls. For workloads of this kind, KV-cache capacity sets the achievable concurrency.
Long-prompt workload: 32k input, 512 output tokens

Figure 2. Node-level output throughput (tokens/s) at 512 concurrent requests. Bar color indicates the model-parallel dimension of each layout: pipeline (blue), tensor (light gray) or none, replicas only (dark gray).
Table 2. Output throughput (tokens/s) by concurrency level, with median inter-token latency (ITL) at 512 concurrent requests and median time to first token (TTFT) at 128.
Layout | 32 concurrent | 128 concurrent | 512 concurrent | ITL p50 @512 | TTFT p50 @128 |
|---|---|---|---|---|---|
DP8 | 218 | 341 | 297 | 54 ms | 56.0 s |
DP4×PP2 | 214 | 332 | 185 | n/a¹ | 14.3 s |
DP4×TP2 | 220 | 270 | 206 | 363 ms | 3.0 s |
DP2×PP4 | 221 | 328 | 142 | n/a¹ | 11.8 s |
DP2×TP4 | 239 | 242 | 201 | 232 ms | 24.6 s |
PP8 | 239 | 314 | 518 | 108 ms | 3.9 s |
TP8 | 124 | 165 | 120 | 211 ms | 6.8 s |
¹ No request completed within the measurement window, so per-request latency is undefined. Throughput still includes every streamed token.
At 32 and 128 concurrent requests most layouts fall within a narrow range, and DP8 is competitive. The layouts separate as the queue deepens. vLLM engine logs taken near the end of the 512-concurrency runs show why (Table 3).
Table 3. vLLM engine state near the end of the 32k-prompt runs at 512 concurrent requests.
Engine | Prompt tok/s | Decoding | Waiting | KV in use |
|---|---|---|---|---|
DP8, one of 8 replicas | 3,276 | 9 | 33 | 91% |
DP2×PP4, one of 2 replicas | 9,830 | 96 | 98 | 99.6% |
TP8 | 6,554 | 29 | 409 | 26% |
PP8 | 16,383 | 180 | 273 | 87% |
DP8: memory-limited
Collectively the replicas prefill quickly, at about 26k tokens/s, but each GPU can hold only nine long sequences. Once the cache is full, new prompts queue and the decode batch stays small.
TP8: compute-limited
About three quarters of the cache is unused, yet only 29 sequences decode at once. Prefill is slow and each decode step takes more than 200 ms. Our working hypothesis is that long prefill chunks and decode share every forward pass, and that each pass is synchronized across all eight GPUs.
PP8: neither limit reached
PP8 has the largest cache, prefills at 16.4k tokens/s and sustains 180 decoding sequences. A prefill chunk occupies one stage while the other seven continue working, and the deep queue keeps every stage supplied.
Partial pipelines
The partial pipelines (DP4×PP2 and DP2×PP4) fill their cache and stall at 512 concurrent requests, as DP8 does. Their advantage appears at moderate load. At 128 concurrent requests, median time to first token for a 32k-token prompt was 14 s for DP4×PP2 compared with 56 s for DP8, at nearly the same throughput.
Short-prompt workload: 2k input, 512 output tokens
Table 4. Output throughput (tokens/s) by concurrency level, with median inter-token latency at 32 and at 512 concurrent requests.
Layout | 32 concurrent | 128 concurrent | 512 concurrent | ITL p50, 32 → 512 |
|---|---|---|---|---|
DP8 | 691 | 1,999 | 3,231 | 41 → 67 ms |
DP4×PP2 | 603 | 1,904 | 3,207 | 47 → 69 ms |
DP4×TP2 | 943 | 2,507 | 3,551 | 27 → 60 ms |
DP2×PP4 | 560 | 1,708 | 3,303 | 53 → 79 ms |
DP2×TP4 | 1,143 | 2,282 | 2,792 | 20 → 216 ms |
PP8 | 491 | 1,430 | 2,831 | 60 → 94 ms |
TP8 | 934 | 1,756 | 1,736 | 18 → 222 ms |
With short prompts, memory is not the binding constraint and the conventional trade-offs hold. Tensor parallelism gives the lowest inter-token latency at light load. TP8 reaches 18 ms, but at 512 concurrent requests its latency rises to 222 ms while throughput stays flat. DP4×TP2 achieves the highest peak throughput. PP8 is the slowest layout at light load, because every token passes through eight stages in sequence and 32 requests are too few to keep eight stages occupied.
Recommendations
Workload | Recommended layout |
|---|---|
Long contexts at high concurrency (agents, RAG, codebase Q&A) | PP8 |
Long contexts at moderate concurrency | DP4×PP2 or DP2×PP4 |
Short prompts, maximum throughput | DP4×TP2 |
Short prompts, lowest inter-token latency at light load | TP4 or TP8 |
Short prompts only, simplest deployment | DP8 |
A tensor-parallel degree higher than the model's KV-head count should be avoided unless the duplicated cache can be afforded. Pipeline parallelism does not make any individual request faster. Its value lies in avoiding redundant copies of the weights and of the KV heads. On a memory-bound workload, the memory recovered in this way raises achievable concurrency, and higher concurrency raises throughput.
Limitations
- Each configuration was run once, on one node, with one engine version. Differences smaller than about 10% should be treated as noise.
- The traffic is synthetic. Random-token prompts defeat the prefix cache. Real agent traffic reuses long prefixes, which would favor the layout with the most cache. vLLM nonetheless reported nonzero prefix-cache hit rates, up to 28% for PP8. We believe these reflect earlier chunks of the same prompt but have not confirmed it. The throughput figures in this report are counted by the client and do not depend on this metric.
- The 32k runs at 512 concurrent requests did not reach steady state. Their latency figures are biased toward the requests that completed, so throughput is the reliable measure for those runs.
- Server-side token counters were added partway through the study. DP8 and DP4×PP2 therefore have client-side figures only.
- Data-parallel routing used our own round-robin client rather than a cache-aware router.
- The explanation offered for TP8's decode latency is based on engine logs and has not been verified by profiling.
Reproducibility
All code, results and logs are in benchmarks/qwen38-27b-pi-a100x8-parallelism/:
setup.shinstalls vLLM and downloads the model and LoRA adapter.run_matrix.shlaunches each layout and runs the full sweep.bench.pyis the load generator.results/contains one JSON record per data point, along with every server log.
bash setup.sh && bash run_matrix.sh # on an 8×A100 node, approximately 4 h
Run it on your own model. The scripts need one 8×A100 80GB node. Choose an SXM4 node with NVLink to match this setup, since tensor- and pipeline-parallel results depend on the interconnect and may differ on PCIe. Deploy A100 80GB GPUs on Shadeform to reproduce these results or to test the layouts against your own traffic.