LMDeploy Accelerates Mixed-Precision LLM Inference with TurboMind

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Li, Jiang, Youhe, He, Guoliang, Chen, Xin, Lv, Han, Yao, Qian, Ma, Ningsheng, Fu, Fangcheng, Chen, Kai
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918502141526016
author Zhang, Li
Jiang, Youhe
He, Guoliang
Chen, Xin
Lv, Han
Yao, Qian
Ma, Ningsheng
Fu, Fangcheng
Chen, Kai
author_facet Zhang, Li
Jiang, Youhe
He, Guoliang
Chen, Xin
Lv, Han
Yao, Qian
Ma, Ningsheng
Fu, Fangcheng
Chen, Kai
contents Mixed-precision inference techniques reduce the memory and computational demands of Large Language Models (LLMs) by applying hybrid precision formats to model weights, activations, and KV caches. However, existing systems struggle to (i) automatically generalize across diverse hardware architectures and precision formats, often requiring fragmented, hand-tuned kernels, and (ii) fully exploit available memory and compute resources, often causing performance bottlenecks. To address these problems, we propose TurboMind, a generalizable and efficient mixed-precision LLM inference engine of LMDeploy. TurboMind is built around two hardware-aware mixed-precision pipelines: A General Matrix Multiply (GEMM) pipeline that optimizes matrix operations through offline weight packing and online acceleration, and an attention pipeline that enables efficient attention computation with different Query, Key, and Value precision combinations. These pipelines are enabled by four key techniques: (i) Hardware-aware weight packing and (ii) adaptive head alignment for generalizability, and (iii) instruction-level parallelism and (iv) a KV memory loading pipeline for efficiency. We conduct comprehensive evaluations of LMDeploy powered by TurboMind across sixteen popular LLMs and four representative GPU architectures. Results demonstrate that LMDeploy achieves up to 61% lower serving latency (30% on average) and up to 156% higher throughput (58% on average) in mixed-precision workloads compared to existing mixed-precision frameworks, establishing consistent performance improvements across all tested configurations and hardware types. This work is open-sourced and publicly available at https://github.com/InternLM/lmdeploy.
format Preprint
id arxiv_https___arxiv_org_abs_2508_15601
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle LMDeploy Accelerates Mixed-Precision LLM Inference with TurboMind
Zhang, Li
Jiang, Youhe
He, Guoliang
Chen, Xin
Lv, Han
Yao, Qian
Ma, Ningsheng
Fu, Fangcheng
Chen, Kai
Distributed, Parallel, and Cluster Computing
Performance
Mixed-precision inference techniques reduce the memory and computational demands of Large Language Models (LLMs) by applying hybrid precision formats to model weights, activations, and KV caches. However, existing systems struggle to (i) automatically generalize across diverse hardware architectures and precision formats, often requiring fragmented, hand-tuned kernels, and (ii) fully exploit available memory and compute resources, often causing performance bottlenecks. To address these problems, we propose TurboMind, a generalizable and efficient mixed-precision LLM inference engine of LMDeploy. TurboMind is built around two hardware-aware mixed-precision pipelines: A General Matrix Multiply (GEMM) pipeline that optimizes matrix operations through offline weight packing and online acceleration, and an attention pipeline that enables efficient attention computation with different Query, Key, and Value precision combinations. These pipelines are enabled by four key techniques: (i) Hardware-aware weight packing and (ii) adaptive head alignment for generalizability, and (iii) instruction-level parallelism and (iv) a KV memory loading pipeline for efficiency. We conduct comprehensive evaluations of LMDeploy powered by TurboMind across sixteen popular LLMs and four representative GPU architectures. Results demonstrate that LMDeploy achieves up to 61% lower serving latency (30% on average) and up to 156% higher throughput (58% on average) in mixed-precision workloads compared to existing mixed-precision frameworks, establishing consistent performance improvements across all tested configurations and hardware types. This work is open-sourced and publicly available at https://github.com/InternLM/lmdeploy.
title LMDeploy Accelerates Mixed-Precision LLM Inference with TurboMind
topic Distributed, Parallel, and Cluster Computing
Performance
url https://arxiv.org/abs/2508.15601