LLM Inference Throughput on Heterogeneous Accelerators: A Comparative Analysis

    This article examines how different heterogeneous accelerators affect total output-token throughput for LLM inference under a fixed single-card concurrency of 128. It compares short-input/short-output and long-input/long-output workloads, reviews hardware and software-stack differences, and analyzes decode- versus prefill-bound behavior. It also outlines a fair benchmarking methodology and practical selection guidance, emphasizing that peak compute or memory bandwidth alone cannot predict online serving throughput.

    LLM Inference Throughput on Heterogeneous Accelerators: A Comparative Analysis

    When selecting accelerators for LLM inference in general-purpose cloud environments such as Baidu AI Cloud, a common mistake is to compare peak compute or memory bandwidth directly and then infer online serving throughput from those numbers. Actual inference performance is jointly determined by model structure, precision path, batch scheduling, input/output lengths, memory access efficiency, power limits, and software-stack versions. Based on a set of single-card, 128-concurrency inference throughput tests, this article abstracts the behavior of three classes of heterogeneous accelerators under short-input/short-output and long-input/long-output workloads, and discusses how to establish a more credible benchmarking methodology.

    1. Evaluation Goals and Test Methodology

    The goal is not to produce an absolute ranking of a particular piece of hardware, but to answer an engineering question: under a fixed concurrency stream, how do different accelerators affect total output-token throughput, and why does that effect change with workload shape?

    The original tests used a compatible inference service endpoint and counted total output tokens/s across all requests at fixed concurrency. The two workload shapes were:

    • Short input/short output: 512 input tokens and 512 output tokens, more decode-heavy, with token-by-token output generation accounting for a higher share.
    • Long input/long output: 8,192 input tokens and 1,024 output tokens, more prefill-heavy while still including a relatively long decode process.

    It is important to note that total output throughput is not equivalent to single-request latency. Under high concurrency, total throughput may increase, but tail latency, time to first token, and memory usage also change. Therefore, when interpreting throughput, this article also considers workload shape, precision path, and software-stack consistency.

    2. Hardware Specifications and Software-Stack Differences: Peak Numbers Cannot Be Extrapolated Directly

    To avoid disclosing specific product information, this article labels the three accelerator classes as A, B, and C. In the test configuration, A and C were set to 450 W and B to 600 W; all three have a maximum rated power of 600 W. The server platforms, power settings, driver versions, acceleration-library versions, and inference-container versions for the three cards were not completely identical. For most single-card models, card C used one software stack, while some multi-card data used another software-stack version. The software stacks for A/B and C were also not exactly the same. This must be retained in the conclusions because differences in inference frameworks, operator libraries, and quantization kernels can be enough to change throughput rankings.

    Metric Accelerator A Accelerator B Accelerator C
    BF16 matrix compute 652 TFLOPS 419 TFLOPS 580 TFLOPS
    FP8 matrix compute 1,205 TFLOPS 820 TFLOPS 1,120 TFLOPS
    Read bandwidth 4,472 GB/s 1,540 GB/s Not provided
    Test power 450 W 600 W 450 W
    Maximum rated power 600 W 600 W 600 W

    Card A’s read bandwidth is about 2.90× that of card B. This ratio comes from 4,472 ÷ 1,540 and applies only to that bandwidth kernel; it should not be equated directly with differences in online model inference throughput. Matrix-multiply kernel achievable FLOPS and memory-access kernel results are also not end-to-end throughput. TFLOPS at different precisions should not be ranked directly across precisions. FP4 paths are also implemented differently across hardware vendors and must be validated with end-to-end service metrics.

    3. Throughput Results at Single-Card, 128 Concurrency

    In the table below, each row compares the same model, the same precision, and the same input workload. Short = 512/512, long = 8192/1024, and the unit is output tokens/s. “—” means the original data was not provided or no same-methodology comparison was available.

    Model and precision Workload A B C
    30B-class sparse model, FP8 Short 7,459 3,995 —
    30B-class sparse model, FP8 Long 1,820 823 —
    30B-class sparse model, BF16 Short 5,240 2,881 —
    30B-class sparse model, BF16 Long 1,592 588 —
    8B-class general model, FP8 Short 11,054 8,073 11,045
    8B-class general model, FP8 Long 2,045 1,481 1,211
    120B-class mixture-of-experts model, FP4 Short 3,376 3,064 5,057
    120B-class mixture-of-experts model, FP4 Long 1,825 1,169 2,101

    For the 30B-class sparse model in FP8, A reached 7,459 under short input and B reached 3,995, giving A a lead of about 87%. Under long input, the figures were 1,820 versus 823, about 2.21×. For BF16, short-input results were 5,240 versus 2,881, and long-input results were 1,592 versus 588. These data show that the speedup of FP8 over BF16 on the same accelerator is not fixed; quantization gains vary with model structure, batch size, and kernel implementation.

    The FP8 results for the 8B-class general model show ranking changes more clearly: under short input, A/B/C were 11,054/8,073/11,045, with A and C close to each other; under long input, the values became 2,045/1,481/1,211, and the ranking changed. This indicates that scheduling and memory efficiency may dominate under short-output workloads, while compute paths, Attention implementations, and prefill efficiency have a greater impact under long-input workloads.

    For the 120B-class mixture-of-experts model with FP4 weights, C reached 5,057, A 3,376, and B 3,064 under short input; under long input, the values were 2,101/1,825/1,169. FP4 paths are implemented differently across vendors, so these results cannot be simply extrapolated to other precisions or other models.

    4. Bottleneck Differences Between Decode and Prefill

    The decode phase generates tokens one by one and is often more affected by memory traffic, KV Cache access, and batching efficiency. In short-input/short-output workloads, 512 output tokens account for a higher share, so total output throughput is more likely to be limited by the decode path. In this case, accelerators with high read bandwidth and efficient batch scheduling may achieve higher total throughput, but results can shift if the software stack uses different batching strategies.

    The prefill phase must process a long input at once, making differences in compute intensity and Attention paths more obvious. Although the 8,192-input/1,024-output workload includes decode, long-input prefill significantly affects time to first token and overall throughput. The ranking changes under long input show that short-input results cannot be used alone to infer long-context serving capability.

    From an engineering perspective, time to first token, output token interval, total throughput, and P95/P99 latency should be reported separately. Looking only at total output tokens/s can hide tail-latency degradation, while looking only at single-request latency can ignore the throughput benefit brought by batching.

    5. Fair Benchmarking and Deployment Practices

    To establish a credible evaluation, at least the following conditions should be fixed: model weights and precision, input/output length distribution, concurrency, sampling parameters, number of warmup runs, batch-size limit, KV Cache configuration, power limit and cooling state, and driver/acceleration-library/container versions. It is recommended to repeat each workload type for multiple rounds, report medians and percentiles, and record failed requests and peak memory usage.

    1. CASES = [
    2. {"card": "A", "model": "model-1", "precision": "FP8", "in_len": 512, "out_len": 512},
    3. {"card": "A", "model": "model-1", "precision": "FP8", "in_len": 8192, "out_len": 1024},
    4. # Expand the same matrix with other accelerators, models, and precisions
    5. ]
    6. def benchmark(case, concurrency=128, rounds=5):
    7. warmup(case, concurrency)
    8. results = []
    9. for _ in range(rounds):
    10. start = monotonic()
    11. outputs = run_concurrent(case, concurrency)
    12. elapsed = monotonic() - start
    13. throughput = sum(outputs) / elapsed
    14. results.append({
    15. "throughput_out_tok_s": throughput,
    16. "p95_latency_s": percentile_latency(outputs, 95),
    17. "p99_latency_s": percentile_latency(outputs, 99),
    18. })
    19. return aggregate(results)

    When selecting hardware, workloads should be split by business scenario. For short-output, high-concurrency scenarios, focus on decode throughput and tail latency. For long-context document question answering, focus on prefill efficiency and time to first token. Quantized deployments must undergo end-to-end accuracy and throughput validation. Multi-card scaling requires separate testing of communication and batch-scheduling overhead. Final conclusions should include software-stack versions and power conditions to avoid generalizing test values from a specific environment into universal performance promises.