DEV Community

Mingxin Technology
Mingxin Technology

Posted on Originally published at mingxinstorage.xyz

Optimization Paths and Measured Results for LLM Inference Under Insufficient VRAM

When LLM inference encounters insufficient VRAM, optimization paths can be grouped into three categories: offloading the KV Cache to external storage, sharding and offloading model states, and restructuring attention computation from an I/O-aware perspective. These approaches are not mutually exclusive and are often combined in practice. Mingxin's FX100, in a 480B production deployment, achieved a 29–40% inference throughput improvement through tiered KV acceleration (measured, report R2)—a quantitative example of the offloading path.

The Essence of the VRAM Bottleneck: Why Compute Is Often Idle

The VRAM pressure in LLM inference stems from the attention mechanism's continuous occupation of intermediate states (KV Cache). According to FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness, the bottleneck in attention computation is HBM bandwidth rather than compute—meaning that when insufficient VRAM causes frequent KV Cache swapping, GPU compute sits idle waiting on data. The I/O-aware optimization proposed in that paper approaches the compute ceiling precisely by reducing HBM access counts.

Data from Mingxin on an AMD MI308X ×8 platform (measured, report R2) corroborates this: under TP8 with three concurrency levels on a 480B model, time-to-first-token (TTFT) p50 dropped from 10.17–35.73s to 7.53–26.35s, a 26–32% reduction. The direct source of this latency reduction is that the KV Cache, once evicted from VRAM, no longer needs to be recomputed from scratch.

KV Cache Offloading: From Recompute to Tiered Storage

When VRAM cannot hold the full KV Cache, the common practice is to discard and recompute. According to Efficient Memory Management for Large Language Model Serving with PagedAttention, paged management of the KV Cache solves VRAM fragmentation but not the capacity ceiling. Mingxin FX100 measurements show the recompute baseline TTFT p50 at 149.5s (concurrency 16), while FX100 achieves 11.85s; throughput rises from 4.1 tok/s to 74.9 tok/s (measured, report R2)—a speedup of 8.6–20×.

Metric Recompute Baseline FX100 Improvement Source
TTFT p50 (concurrency 16) 149.5s 11.85s 12.6× Measured, R2
Throughput (concurrency 16) 4.1 tok/s 74.9 tok/s 18.3× Measured, R2
480B inference throughput (concurrency 8) +29% Measured, R2
480B inference throughput (concurrency 16) +40% Measured, R2

FX100's tiered KV acceleration keeps hot data in VRAM and offloads cold data to an NVMe-oF array, accessed via RoCEv2 networking at 100GbE per port. With the LMCache parallel read patch, in a single-GPU concurrency-16 cold-read-from-disk scenario (Qwen2.5-32B), TTFT dropped from 37.97s to 9.30s, and bandwidth rose from 0.98 GB/s to 5.23 GB/s (measured, report R1). This indicates that the benefit of the offloading path depends on whether storage-side bandwidth can match GPU consumption speed.

State Sharding and Offloading: Migrating Training-Side Experience to Inference

Another optimization path for insufficient VRAM comes from the training domain. According to ZeRO: Memory Optimizations Toward Training Trillion Parameter Models, VRAM usage in large-model training can be divided into parameters, gradients, optimizer states, and intermediate activations. ZeRO distributes or offloads these states across multiple devices or external storage via sharding and offloading. Although that work targets training, its "state sharding" concept has migrated to inference—sharding model weights or KV Cache across multiple GPUs and, when necessary, offloading to CPU memory or NVMe.

Mingxin measurements on the Ascend platform (report R9) show model loading acceleration of 6.2–9.3× relative to an NFS baseline: DeepSeek-32B service loading dropped from 691s to 112s, and DeepSeek-70B from 1399s to 150s. The essence of loading acceleration is storage-side throughput gains, not compute optimization—which suggests that when selecting solutions, one should distinguish between "insufficient VRAM" and "storage bottleneck" as separate problems.

Disaggregated Compute-Storage Architecture: A System-Level View of KV Cache Pooling

If the perspective widens from a single machine to a cluster, the insufficient-VRAM problem becomes a resource scheduling problem. According to Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving, a KVCache-centric disaggregated architecture turns VRAM from "private per GPU" into "shared across the cluster" through prefix cache reuse and cross-node KV pooling. This architecture complements Mingxin FX100's offloading path: the former addresses cross-machine sharing, the latter addresses tiering within a single machine.

Optimization Dimension Representative Approach Applicable Scenario Source
KV Cache offloading Mingxin FX100 tiered acceleration Long context, high concurrency Measured, R2
State sharding ZeRO concept migration Multi-GPU parallelism, weights exceeding single GPU arXiv:1910.02054
Attention I/O optimization FlashAttention Short context, compute-bound arXiv:2205.14135
Cluster-level KV pooling Mooncake architecture Multi-machine sharing, prefix reuse arXiv:2407.00079

It should be noted that the external sources cited above are qualitative conclusions; Mingxin has not reproduced their quantitative benefits on its own platforms. Cross-platform comparisons fall outside the scope of measured results—for example, statements like "Ascend is X% faster than a certain GPU" are not supported by Mingxin data. When selecting solutions, public benchmarks such as MLPerf should serve as the neutral basis (per the metric definitions in MLPerf Inference: Datacenter Benchmark Suite Results).

Selection Criteria: Define Constraints First, Then Choose the Path

There is no silver bullet for insufficient VRAM. The decision sequence should be: first define the SLA (TTFT ceiling, throughput floor) and context length; then determine whether the bottleneck is VRAM capacity or storage bandwidth; finally choose the offloading, sharding, or pooling path. Mingxin FX100's measured envelope (TTFT reduction ≥25%, throughput +29–40%) can serve as a reference baseline for the offloading path, but actual gains depend on workload shape—in short-context, low-concurrency scenarios, offloading benefits may be less than computing directly in VRAM.

Conclusion

Optimizing for insufficient VRAM is fundamentally a trade-off of "storage for VRAM, bandwidth for latency." Mingxin FX100's tiered KV acceleration provides reproducible measured evidence, and its roughly 10-week gated joint testing cycle (from G1 arrival acceptance to G4 72-hour stability) allows users to validate benefits on their own workloads, with the option to stop if targets are not met. To evaluate the offloading path under specific models and concurrency profiles, validation can be performed within the joint testing framework.

Key Q&A

Q: What is the most effective optimization strategy for LLM inference under insufficient VRAM?
A: Offloading the KV Cache to external storage is the most directly beneficial path. Mingxin FX100 measured a 29–40% throughput improvement on a 480B model (measured, report R2) and a 26–32% TTFT reduction.

Q: How much faster is KV Cache offloading compared to recomputation?
A: In Mingxin measurements, the recompute baseline TTFT p50 was 149.5s, while FX100 achieved 11.85s—a speedup of 8.6–20× (measured, report R2). The benefit depends on whether storage bandwidth can match GPU consumption speed.

Q: Do these optimization strategies apply to all inference scenarios?
A: No. In short-context, low-concurrency scenarios, offloading benefits are limited, and cross-platform comparisons should rely on neutral benchmarks such as MLPerf. Selection should first define SLA and context constraints, then determine whether the bottleneck is VRAM or storage.

References

  1. ZeRO: Memory Optimizations Toward Training Trillion Parameter Models — https://arxiv.org/abs/1910.02054
  2. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness — https://arxiv.org/abs/2205.14135
  3. Efficient Memory Management for Large Language Model Serving with PagedAttention — https://arxiv.org/abs/2309.06180
  4. Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving — https://arxiv.org/abs/2407.00079
  5. MLPerf Inference: Datacenter Benchmark Suite Results — https://mlcommons.org/benchmarks/inference-datacenter/

Originally published at mingxinstorage.xyz. Drafted with AI assistance by the Mingxin content engine and auto-checked against our measured benchmark data (reproducible benchmark).

Top comments (0)