NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient Mixed-Precision Large Language Model Inference with TurboMind

Li Zhang, Youhe Jiang, Guoliang He, Xin Chen, Han Lv, Qian Yao, Fangcheng Fu, Kai Chen · OpenReview

TL;DR

This paper introduces TurboMind, a new engine for LMDeploy that significantly speeds up Large Language Model (LLM) inference by using mixed-precision techniques. It achieves this by optimizing how models use hardware memory and compute units, leading to much lower latency and higher throughput compared to existing methods.

What Problem Does This Paper Address?

Running large language models (LLMs) like ChatGPT is computationally expensive, requiring lots of memory and processing power. To make them more efficient, researchers use "mixed-precision" inference, which means using lower-precision numbers (like INT4 or FP8 instead of FP16 or FP32) for model weights, activations, and KV caches. However, current systems struggle with two main issues:

  1. Hardware and Precision Agnosticism: They often require custom, hand-tuned code for specific hardware and precision formats, making it hard to adapt them to new setups.
  2. Underutilization of Resources: Existing systems don't fully exploit the complex memory hierarchies (global memory, caches, registers) and specialized compute units (like tensor cores) in modern GPUs, leading to performance bottlenecks.

This paper aims to solve these problems by creating a generalizable and highly efficient mixed-precision inference engine.

Methods

The core of the solution is TurboMind, which features two novel hardware-aware mixed-precision pipelines:

  • General Matrix Multiply (GEMM) Pipeline:
    • Offline Weight Packing: This technique intelligently reorganizes model weights before inference. It ensures that when weights are loaded into registers and used by tensor cores, they are already in a format that maximizes hardware efficiency, avoiding issues like memory bank conflicts and misaligned data for tensor core operations.
  • Online Acceleration: During inference, low-bit weights are loaded and dequantized to FP16 using instruction-level parallelism (ILP). This means overlapping the dequantization process with tensor core computations and memory loads, effectively hiding the latency of dequantization.
  • Attention Pipeline:
    • Adaptive Head Alignment: This addresses a specific problem in attention mechanisms where different precision formats for Query (Q), Key (K), and Value (V) can cause data misalignment. TurboMind rearranges the Q tensor to match the precision of the K tensor, preventing errors and avoiding the need to dequantize K/V to FP16, which would increase memory traffic.
  • KV Memory Loading Pipeline: This pipeline overlaps the loading of Key and Value data from memory with the actual attention computation. It uses a triple-level parallelism approach (prefetching, loading, and computing) to keep the GPU busy and minimize "bubbles" or idle time, especially crucial for long sequences.

These pipelines are enabled by four key techniques: hardware-aware weight packing, adaptive head alignment, instruction-level parallelism, and a KV memory loading pipeline.

Datasets

The paper does not mention specific datasets used for training the LLMs themselves. However, for evaluation, they use:

  • Real-world chatbot workloads: Derived from the ShareGPT dataset.
  • Reasoning tasks: Using the reasoning model QwQ on mathematical reasoning workloads from the NuminaMath dataset and the AIMO validation dataset.

Key Insights and Ideas

  • The "bottleneck analysis" is crucial: The authors meticulously break down the challenges in mixed-precision inference, identifying specific memory access (coalescing, bank conflicts, alignment) and compute (dequantization, tensor core utilization, attention bubbles) bottlenecks. This detailed understanding is the foundation for their solutions.
  • Offline optimization is key for GEMM: By pre-processing weights and packing them optimally before inference, TurboMind avoids runtime overheads that plague other systems. This is a significant departure from approaches that rely heavily on runtime adaptations.
  • Attention needs careful Q/K/V alignment: The paper highlights how mismatches in precision between Q, K, and V can lead to errors or performance degradation. Their adaptive head alignment elegantly solves this without costly dequantization.
  • Overlapping is king for attention: The KV memory loading pipeline demonstrates that by carefully orchestrating memory transfers and computations, attention latency can be dramatically reduced, especially for long sequences.
  • Generalizability is achievable: The proposed techniques are designed to work across various hardware architectures and precision formats, reducing the need for manual tuning.

Key Results

LMDeploy powered by TurboMind shows significant improvements across various LLMs and GPU architectures:

  • Latency: Up to 61% lower serving latency (30% on average).
  • Throughput: Up to 156% higher throughput (58% on average).
  • These improvements are consistent across different models (dense and MoE), precision formats (e.g., INT4, INT8 KV cache), and hardware (RTX 4090, L40S, A100, H100).
  • Compared to baselines like vLLM+MARLIN and TensorRT-LLM, LMDeploy consistently outperforms them in mixed-precision scenarios.

Limitations and Future Work

  • Limitations: The paper focuses on optimizing inference for existing LLMs. It doesn't delve into training or fine-tuning with mixed-precision. While they achieve high performance, the paper acknowledges that the current design uses fixed mixed-precision configurations.
  • Future Work:
    • Accuracy-aware precision selection: Develop runtime policies to dynamically adjust KV cache precision based on model sensitivity, layer, or request, balancing performance and accuracy.
  • Distributed mixed-precision serving: Extend system-level optimizations to large-scale distributed environments, co-optimizing precision selection with data/model parallelism, scheduling, and memory allocation for cluster-scale serving.

Summary updated

BibTeX
@misc{zhang2025efficient,
  author = {Li Zhang and Youhe Jiang and Guoliang He and Xin Chen and Han Lv and Qian Yao and Fangcheng Fu and Kai Chen},
  title = {{Efficient Mixed-Precision Large Language Model Inference with TurboMind}},
  year = {2025},
  eprint = {2508.15601},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.15601},
}
Figure