ROCm InferaSim: Cut LLM Serving Trial Costs and Deploy the Best Configuration
Organizations: Advanced Micro Devices Inc. (AMD)
Abstract
Serving an LLM efficiently depends on the engine, how the model is split across GPUs, precision, scheduler settings, speculative decoding, KV-cache management, and prefill-decode disaggregation. The best configuration depends on the model, hardware, workload, and objective. Operators usually find it by trial and error. Exhaustively measuring the candidates in our study would take about 25,000 GPU-hours. ROCm InferaSim predicts serving performance from a few short measurements. Choices such as batch size, prompt length, and GPU count change the amount of work per GPU without changing the kernels. ROCm InferaSim benchmarks each distinct set of kernels once, on at most one node. We call this measurement an anchor. Analytical laws carry that anchor to other deployments that run the same kernels. For multi-node deployments, ROCm InferaSim reduces the configuration to a single-node equivalent, measures it, and scales the result analytically. A simulator replays multi-turn traffic, and a tuning agent searches configurations using the predictions. On AMD Instinct MI355X GPUs with vLLM, SGLang, and ATOM, 11 anchors took 9.1 GPU-hours, against 204 GPU-hours to measure the 226 fixed-length configurations they cover. On 172 configurations, time per output token has 8.1% median error. On a multi-turn coding workload, throughput is within 8%. For 159 disaggregated deployments, none used as an anchor, throughput is within 5.5%. A five-candidate short list contains a deployment within 12% of the best feasible pairing of model and latency target.
Figures & tables
| Target exceeds the anchor in | Reduced to | Restored by | Validated on |
|---|---|---|---|
| TP width | TP/2 or narrower, same node | fixed cost kept, rest scaled (Eq. 1 ) | 90 TP8 deployments from TP4 anchors: 9.7% throughput error (§ 5.4 ) |
| EP width | the anchor’s EP (often 1) | busiest-GPU imbalance at both EPs; the engine’s dispatch (App. B.3 ) | nine vLLM EP runs: 2.2% TPOT; three SGLang EP runs: within 2.5% |
| Pipeline stages, across nodes | PP1 on one node | a network hop per stage, plus the host time PP exposes (Eq. 4 ) | 24 two-node pipelines of 2–16 GPUs: 11.6% TPOT (§ 5.3 ) |
| Communication across nodes | none in the anchor | on in-node and network links (§ 5.2 ) | 35 two-node collectives: within about 10% |
| Disaggregated pools | one replica, prefill and decode together | one simulated pool per phase, each with its own layout, plus the KV transfer (§ 5.10 ) | 159 splits of 8–24 GPUs: 5.5% throughput, 5.3% interactivity |
| Host KV tier (offload) | GPU memory only | a host-memory level in the simulated cache, reloads over the host link (§ 3.5 ) | 20 covered agentic offload runs (§ 5.6 ) |
| Held-out set | Tput | ITL | TTFT | |
|---|---|---|---|---|
| Covered, all | 95 | 1.08 | 1.14 | 1.23 |
| anchor’s sessions | 38 | 1.07 | 1.11 | 1.19 |
| – anchor’s sessions | 57 | 1.08 | 1.16 | 1.26 |
| SGLang + HiCache | 12 | 1.15 | 1.40 | 1.38 |
| host tier added to an anchor without one | 5 | 1.06 | 1.17 | 1.42 |
| ATOM + LMCache | 4 | 1.05 | 1.19 | 1.11 |
| Predicted sweep | Right call | ||||
|---|---|---|---|---|---|
| Tier (tok/s/user, TTFT) | 1k/1k | 8k/1k | 8k gain | 1k | 8k |
| realtime ( 150, 1 s) | 1/1 ∗ | – | – | 2/2 | 2/2 |
| interactive ( 70, 2.5 s) | 1/4 | 3/4 | 1.37–2.72 | 4/5 | 6/7 |
| responsive ( 25, 10 s) | 0/7 | 7/7 | 1.19–1.58 | 6/7 | 7/9 |
| bulk (no limit) | 0/7 | 2/7 | 1.14–1.19 | 7/7 | 8/9 |
| all | 19/21 | 23/27 | |||
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Choice | Options | How it is priced |
| Parallelism inside a replica | ||
| Tensor (TP) | 1–8 | sharded part , unsharded floor kept (Eq. 1 ) |
| Expert (EP) | divisors of experts | busiest rank gates the MoE layer; imbalance at both EPs |
| Attention data (DP) | divisors of TP | ranks own whole requests; DES runs parallel schedulers |
| Pipeline (PP) | divisors of layers, across nodes | hops plus host time PP stops overlapping (Eq. 4 ) |
| Decode context (DCP) | 1–8 | KV and attention sharded; ranked only under a covering anchor |
| Component | Constant | Value |
|---|---|---|
| Custom all-reduce, in node | , | 4.9–11.0 s, 56–123 GB/s |
| RCCL all-to-all, in node | , | 35–38 s, 113–409 GB/s |
| Send/recv, two nodes | , | 44 s, 45 GB/s |
| All-reduce, 16 GPUs, two nodes | , | 91 s, 32 GB/s |
| Kernel occupancy (fusions) | per kernel | 4.98 s |
| Pipeline hop (SGLang) | per stage | 970 s |
| Prompts | decode | decode | decode, EPLB | prefill 8k |
|---|---|---|---|---|
| Uniform router | 1.89 | 1.20 | – | 1.02 |
| Random tokens | 2.03 | 1.60 | 1.41 | 2.06 |
| Sonnet text | 2.07 | 1.77 | 1.17 | 1.76 |
| Code | 1.95 | 1.41 | 1.19 | 1.44 |
| Model | rows | serial | this work |
|---|---|---|---|
| Llama-3.1-8B | 24 | 18.1 | 7.2 |
| Qwen3-14B-FP8 | 9 | 14.9 | 2.3 |
| Qwen3.6-35B-A3B | 9 | 26.1 | 9.2 |
| GPUs | ||||
|---|---|---|---|---|
| Layout | /node | rows | TPOT | Tput |
| TP1 PP2 | 1 | 6 | 6.7 | 6.3 |
| TP2 PP2 | 2 | 6 | 9.5 | 11.3 |
| TP4 PP2 | 4 | 6 | 13.7 | 14.9 |
| TP8 PP2 | 8 | 6 | 21.7 | 33.8 |
| All | 24 | 11.6 | 11.6 |
| Set | Models | Engines | Traffic | Configs | Anchors | Scored on |
|---|---|---|---|---|---|---|
| Pipelines | 3 | S | 1k or 8k in, 1–64 clients, PP 1–8, one or two nodes | 24 (2 nodes) | 4 + 4 | pipeline model (§ 5.3 ) |
| Fixed-length corpus | 8 | A, S, V | random prompts, 1k or 8k in, 1k out, 1–256 clients | 172 | 11 | error and order (§ 5.4 , § 5.7 ) |
| Agentic replay | 6 | A, S, V | AgentX coding trace, 1–384 sessions, with and without KV offload, colocated and split | 184 | 28 | error where covered, order, deployment mix (§ 5.6 , § 5.11 ) |
| Disaggregated splits | 4 | A, S, V | 1k or 8k in, 1k out, 1–2,048 clients, 8–24 GPUs | 159 | 16 | error with no disaggregated anchor (§ 5.10 ) |
| Pareto sweep | 13 | A, S, V | 1k/1k, 8k/1k and AgentX | 169,962 proj. | 23 | frontier error and order (§ 5.8 ) |
| Model | Eng. | TTFT | TPOT | Tput | |
|---|---|---|---|---|---|
| MiniMax-M2.7 | 7 | A | 2.7 | 4.5 | 4.7 |
| Qwen3-14B-FP8 | 8 | A/S | 4.8 | 1.5 | 1.2 |
| GLM-5.2-MXFP4 | 67 | S | 11.7 | 9.5 | 10.6 |
| DeepSeek-R1-0528-MXFP4 | 7 | A | 14.9 | 12.1 | 10.9 |
| DeepSeek-V4-Flash | 67 | S/V | 15.2 | 6.3 | 7.4 |
| Qwen3.6-35B-A3B | 7 | A | 19.1 | 8.1 | 9.0 |
| Mode | Metric | Pairs | Pair acc. (%) | Top-1 (%) | Regret p50/p90 (%) |
|---|---|---|---|---|---|
| anchored | Throughput | 68 | 93.4 | 73 | 0.0/0.2 |
| TPOT | 89 | 85.4 | 60 | 0.0/3.9 | |
| simulate | Throughput | 68 | 89.0 | 59 | 0.0/6.2 |
| TPOT | 89 | 84.3 | 54 | 0.1/7.0 |
| System | Step cost from | Reported validation |
|---|---|---|
| Vidur | profiled operators per model and shard; dense only | 9% request latency |
| run by us | profiled on MI355X | 40% TPOT, 40% throughput on 30 SGLang rows (ROCm InferaSim: 7.2%, 7.4%) |
| APEX | profiled operators | 10.7% on plan speedups, vLLM and SGLang |
| LLMServingSim | accelerator simulators | 14.7%, vLLM on 4 RTX 3090 |
| AIConfigurator | kernel database per GPU and framework; NVIDIA only | 7.8% TPOT on one H100 node; 25.5% throughput on its Pareto picks (TensorRT-LLM) |
| BestServe | roofline, efficiencies tuned per stack; dense only | 8.6–30.1% over four scenarios |
| Corpus | Charts | Points | Tput/GPU err | Interact. err | Frontier hit | |
|---|---|---|---|---|---|---|
| Our fixed-length runs | 11 | 172 | 8.8% | 8.2% | 0.99 | 63/80 |
| InferenceX fixed-length | 8 | 262 | 7.0% | 6.0% | 0.99 | 65/79 |
| AgentX trace (covered) | 6 | 95 | 4.2% | 5.2% | 0.99 | 42/47 |
| All | 25 | 529 | 7.0% | 6.5% | 0.99 | 170/206 |
| Model | ISL | TTFT | TPOT | Tput | ||
| GLM-5.2-MXFP4 (S) | 8k | 50 | 5.7 | 7.7 | 9.2 | |
| GLM-5.2-MXFP4 (S) | 1k | 17 | 22.6 | 15.9 | 19.5 | |
| DeepSeek-R1-0528-MXFP4 (A) | 1k | 7 | 14.9 | 12.1 | 10.9 | |
| Qwen3.6-35B-A3B (A) | 1k | 7 | 19.1 | 8.1 | 9.0 | |
| gpt-oss-120b (A) | 8k | 7 | 24.7 | 4.0 | 6.4 | |
| DeepSeek-V4-Pro-MXFP4 (V) | 1k | 2 | 19.7 | 12.5 | 10.2 |
| Tier | Interactivity | TTFT | Slots | Best / within 12% | Miss |
|---|---|---|---|---|---|
| realtime | 150 tok/s | 1 s | 5 | 2 / 3 | 1 |
| interactive | 70 tok/s | 2.5 s | 6 | 3 / 4 | 1 |
| responsive | 25 tok/s | 10 s | 6 | 4 / 4 | 0 |
| bulk | – | – | 6 | 5 / 5 | 0 |
| All | 23 | 14 / 16 | 2 |
| Runs | Tput | Inter. | TTFT | |
|---|---|---|---|---|
| SGLang + MoRI splits | 58 | 8.5 | 12.6 | 22.2 |
| vLLM + NIXL splits | 37 | 5.2 | 4.0 | 7.1 |
| ATOM + Mooncake splits | 64 | 4.8 | 2.3 | 18.6 |
| All splits | 159 | 5.5 | 5.3 | 16.9 |
| Model | Engine | Prec. | Tput | ITL | TTFT | |
|---|---|---|---|---|---|---|
| DeepSeek-V4-Pro | ATOM | FP4 | 7 | 1.12 | 1.21 | 1.50 |
| DeepSeek-V4-Pro | SGLang | FP4 | 4 | 1.35 | 2.01 | 1.16 |
| DeepSeek-V4-Pro | vLLM | FP4 | 5 | 1.07 | 1.14 | 1.65 |
| DeepSeek-V4.1-Flash | ATOM | FP4 | 6 | 1.03 | 1.10 | 1.14 |
| DeepSeek-V4.1-Flash | SGLang | FP4 | 9 | 1.03 | 1.09 | 1.42 |
| DeepSeek-V4.1-Flash | vLLM | FP4 | 8 | 1.05 | 1.04 | 1.08 |
| Decision | Setup | Result |
|---|---|---|
| Decode TP transfer (Eq. 1 ) | DeepSeek-V4-Pro TP4 anchor measured TP8, =1–64 | 0.9% (max 3.5%) vs. 18.5% (TP4 minus simulated drop), 44.1% (TP4 halved) |
| Prefill fixed term | DeepSeek-V4-Pro TP4 & TP8 prefill, solve for | =146.90 / 145.86 ms at 4k / 8k-token prompts |
| Anchor width | each TP-ladder rung as anchor for the others | 4 GPUs 6.6% vs. 8 GPUs 7.6% |
| Fallback width law | Llama-8B / GLM-5.2 TP4 TP8 prefill | serial plus parallel : 4.6 / 20.2% vs. holding the fitted intercept 20.8 / 26.5% |
| Packed prefill at billed length | 4 models probed at 1024-tok sequences | TTFT 2.2, +13.9, 4.4, +1.1% |
| Single-wave decode anchor | DeepSeek-V4-Pro TP8 mean TPOT / median ITL | 1.14/1.23/1.41 at =16/32/64: stalls the DES already models |
| Collective (sizes) | GPUs | ( s) | (GB/s) | MAPE (%) | max (%) |
| Inside a node: decode sizes, per-kernel fit, leave-one-size-out | |||||
| Custom all-reduce, graph ( 8 MiB) | 2 / 4 / 8 | 4.9 / 5.5, 6.4 / 6.4, 11.0 | 60.4 / 63, 100 / 56, 123 | 2.5 / 4.1 / 4.5 | 12 |
| RCCL all-to-all ( 32 MiB) | 2 / 4 / 8 | 37.8 / 35.2 / 37.8 | 113.3 / 205.5 / 408.8 | 5.3 / 4.9 / 4.2 | 12 |
| Inside a node: 8 MiB, one parameter for the whole node | |||||
| RCCL all-reduce | 2 / 4 / 8 | 50.8 / 41.1 / 39.0 | mesh, 600 | 1.8 / 1.3 / 5.1 | 13 |
| RCCL all-to-all | 2 / 4 / 8 | 40.1 / 36.5 / 39.1 | mesh, 600 | 3.5 / 9.6 / 5.4 | 10 |
| Measured | Error | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Model | ISL | TP | PP | TTFT | TPOT | Tput | TTFT | TPOT | Tput | |
| Llama-3.1-8B | 1k | 1 | 1 | 1 | 29 | 4.46 | 223 | -7 | -3 | +4 |
| Llama-3.1-8B | 1k | 1 | 1 | 16 | 185 | 5.03 | 3071 | +32 | +13 | -12 |
| Llama-3.1-8B | 1k | 1 | 1 | 64 | 514 | 7.73 | 7773 | +19 | +21 | -17 |
| Llama-3.1-8B | 1k | 1 | 2 | 1 | 35 | 6.32 | 157 | -5 | -1 | +1 |
| Llama-3.1-8B | 1k | 1 | 2 | 16 | 170 | 7.40 | 2117 | -10 | +7 | -6 |
| Fusion | Replaces |
|---|---|
| norm_quant | RMSNorm and the activation quant feeding the attention and multilayer perceptron (MLP) GEMMs |
| add_rmsnorm | residual add and the following RMSNorm, twice per layer |
| moe_expert | expert gate/up, activation, quant and down in one kernel |
| moe_routing | router top- and permute |
| act_quant | sigmoid linear unit (SiLU) mul and quant feeding the down projection |
| rope_kvstore | rotary position embedding (RoPE) into the KV-cache store |
LLM Serving
Large language model serving studies how to deliver model responses with low latency, high throughput, and efficient use of compute and memory.
See all 240 papers