LLM Inference Throughput Tuning on Domestic 8-GPU Accelerators: A Practical Guide
This article walks through a practical workflow for improving large language model inference throughput on domestic accelerator cards with an 8-GPU single-node setup. It explains why a model that runs is not necessarily cost-efficient, how to build an honest baseline with fixed hardware, workload, and metrics, and three optimization paths: reworking parallelism from deep-and-narrow to shallow-and-wide, applying sequence parallelism with communication tuning, and enabling graph mode with kernel compilation. It also covers how to interpret a roughly 53.5% throughput gain under SLO constraints, how to turn one-off tuning into reusable configuration assets, and a final deployment checklist. Readers will learn which process metrics to watch and which pitfalls cause tuning results to regress.
1. Background: Why “It Runs” Does Not Mean “It Runs Efficiently”
When deploying heavily quantized, large-parameter models on domestic accelerators, teams commonly hit the same gap: the model loads fine and the API responds normally, but as soon as concurrency is pushed up in load tests, the throughput curve flattens quickly while latency keeps degrading. This shows the bottleneck has shifted from “can it compute” to “how to compute and move data more efficiently.”
The tension is sharper for large models built with a mixture-of-experts (MoE) structure. Inference is the sum of two workload types: the attention part is sensitive to memory bandwidth and sequence length, while the expert part shows up as many small sparse matrix operations plus cross-card All-to-All communication. If you keep the default single-node 8-GPU, pure tensor-parallel configuration, the communication domain becomes too large and synchronization overhead scales linearly with concurrency, so usable throughput under service-level objective (SLO) constraints stays low.
The tuning goal, then, should not be “maximum peak throughput” but “the most requests completed per unit time while meeting first-token latency and per-token latency constraints.” Changing this objective function determines every trade-off that follows.
2. Baseline Setup: Build a Comparable Reference First
Every optimization conclusion depends on an honest baseline. A sound baseline follows three rules:
- Fixed hardware and software stack: card count, driver and runtime versions, inference engine version, and quantization format are all locked; only parallelism and compilation settings may change.
- Fixed workload model: input/output length distributions, concurrency levels, and request arrival patterns are identical between the baseline and the tuned group.
- Fixed metric definitions: record total throughput, first-token latency percentiles, per-token latency percentiles, memory usage, and inter-card communication share together.
Illustrative load-test and metric-collection logic (pseudocode, expressing the method rather than a specific API):
for concurrency in [8, 16, 32, 64, 128]:stats = run_benchmark(endpoint=base_url,concurrency=concurrency,input_len_dist=fixed_dist, # shared by baseline and tuned groupoutput_len_dist=fixed_dist,)passed = (stats.ttft_p99 <= TTFT_BUDGET) and (stats.tpot_p99 <= TPOT_BUDGET)report.append((concurrency, stats.throughput, passed))best = max(t for _, t, ok in report if ok) # keep only the max throughput that meets SLO
The key is the last line: only concurrency points that meet the latency budget take part in the comparison. Otherwise, high throughput just means requests piling up in a queue.
3. Optimization Path 1: Shift Parallelism from “Deep and Narrow” to “Shallow and Wide”
With 8 GPUs, pure tensor parallelism splits every layer into eight parts. Single-layer compute gets faster, but every layer needs one cross-8-GPU reduction, which is the maximum number of communication operations. Using a smaller tensor-parallel degree together with data parallelism lets the model be replicated into multiple copies, with requests distributed across copies and cross-card synchronization confined to a smaller communication domain.
- Lower tensor-parallel degree: each card holds more parameter shards, so memory pressure rises and must be offset by quantization and cache management.
- Higher data-parallel degree: more replicas mean near-linear growth in concurrency capacity, with communication localized inside each replica.
- Expert parallelism alongside: mapping expert shards onto different cards overlaps sparse-routing compute with communication and keeps individual cards from becoming hotspots.
When tuning, use “can a single replica fit within the memory and latency budget” as the precondition, then add replicas step by step, watching whether throughput is still growing and whether latency percentiles are still within budget.
4. Optimization Path 2: Sequence Parallelism and Communication Tuning
For long sequences, the memory and bandwidth cost of intermediate attention activations takes a large share. Sequence parallelism splits the sequence dimension across the communication group, lowering peak per-card activation and making larger batches possible. The accompanying communication tuning focuses on overlapping data movement with computation to cut idle waiting during synchronization.
To judge whether this class of optimization works, do not look at the throughput number alone; look at two process metrics: first, whether communication time’s share of single-step latency drops; second, whether the latency budget still holds after increasing batch size. If the communication share rises instead of falling, the parallel split usually does not match the data distribution, and you should roll back and re-evaluate the split dimension.
5. Optimization Path 3: Graph Mode and Kernel Compilation
In eager execution mode, operators are dispatched one by one, and scheduling overhead is amplified in the small-operator-dense expert layers. With graph capture and kernel compilation enabled, the framework can hand a subgraph to the compilation layer for operator fusion, memory reuse, and scheduling, reducing dispatch count and round trips that write intermediate tensors back to memory.
Practical notes:
- Graph mode is sensitive to input shapes; frequently changing shapes trigger repeated recompilation, so fix or bucket input lengths.
- Compilation raises first-startup time, so include warmup in the load-test process and keep cold starts out of steady-state metrics.
- Compilation is coupled with parallelism settings; after changing the parallel degree, collect a fresh baseline instead of reusing old conclusions.
6. Reading the Results: What 53.5% Actually Means
Under the same service-quality constraint, total throughput improves by about half, and the real gains show up in three ways: fewer cards are needed for the same request volume, directly improving cost per unit of compute; peak-concurrency headroom grows, so burst traffic is less likely to trigger rate limiting; and latency percentiles are more stable, where the experience improvement from fewer long-tail requests is often more noticeable than the average.
Note that this magnitude comes from the combined effect of “parallelism restructuring plus communication and compilation tuning,” not a single switch. Applying the same set of parameters without regard to the specific model structure, quantization format, and card type may shrink the gains substantially or even make them negative.
7. Turning One-Off Tuning into a Reusable Asset
The biggest waste in tuning is leaving conclusions in personal notes. Structure each scheme as a searchable entry containing at least: applicable model and hardware, inference engine and image versions, resource specs, parallelism and optimization switches, baseline data, tuned data, and a link to the validation report. On the deployment side, support reading configuration directly from the directory to generate a deployment, reducing deviations from manual transcription.
A simplified scheme description example:
scheme:model: quantized-moe-llmhardware: domestic-accelerator-8xengine_version: lockedresources: 8 cards, single nodeparallel: { tensor: 2, data: 4, expert: enabled }optimizations: [sequence-parallel, graph-capture, kernel-compile]slo: { ttft_p99_ms: budget, tpot_p99_ms: budget }results:baseline_throughput: relative-100tuned_throughput: relative-153.5
8. Deployment Checklist
- Does the baseline lock all variables except the one under test?
- Are only throughput points that meet the latency budget adopted?
- Was the baseline re-collected after changing the parallel degree?
- Are process metrics such as communication share and recompilation count being observed?
- Is warmup completed before steady-state measurement?
- Are the conclusions structured and stored so others can reproduce them in one step?
Following this process turns large-model inference tuning on domestic compute platforms from experience-dependent guesswork into measurable, comparable, reusable engineering practice.
