SuperAPI AI Directory

lmdeploy

A high-throughput and low-latency inference and serving framework for LLMs and VLs

Open website

About this tool

LMDeploy is a toolkit for compressing, deploying, and serving large language models (LLMs), developed by the MMRazor and MMDeploy teams.

[Core Features]

  • Efficient inference: Through features such as persistent batch (i.e., continuous batching), blocked KV cache, dynamic split&fuse, tensor parallelism, and high-performance CUDA kernels, the official claim is that request throughput can reach up to 1.8 times that of vLLM.
  • Effective quantization: Supports weight quantization and k/v quantization. 4-bit inference performance is 2.4 times that of FP16, and the quantization quality has been confirmed through OpenCompass evaluation.
  • Lightweight distributed serving: With the help of a request distribution service, it supports multi-model serving deployments across multiple machines and multiple GPUs.
  • Good compatibility: Supports the simultaneous use of KV Cache Quant, AWQ, and Automatic Prefix Caching.

[Inference Engines] LMDeploy provides two inference engines: TurboMind and PyTorch.

  • TurboMind pursues extreme optimization of inference performance and supports high-performance inference on platforms such as CUDA.
  • The PyTorch engine is developed entirely in Python, aiming to lower the barrier for developers and facilitate rapid experimentation with new features and technologies. The two differ in the types of models supported and the inference data types, and users can refer to the official table to choose the appropriate engine according to their needs.

[Supported Models] The officially listed supported models include: the Llama series (7B-65B), Llama2, Llama3, Llama3.1, Llama3.2, InternLM2, InternLM2.5, Qwen1.5, Qwen1.5-MoE, Qwen2, Qwen2-MoE, Qwen2.5, Qwen3, Qwen3-MoE, Qwen3-Next, Code Llama, GLM-4-0414, DeepSeek-MoE, DeepSeek-V2, DeepSeek-V2.5, DeepSeek-V3, DeepSeek-V3.2, DeepSeek-V4, Hy3, Mixtral, Gemma, Phi-3-mini, Phi-3.5-mini, Phi-3.5-MoE, Phi-4-mini, SDAR, gpt-oss, GLM-4.7-Flash, LLaVA(1.5,1.6), Qwen2-VL, Qwen2.5-VL, Qwen3-VL, Qwen3.5, Qwen3-Omni, Kimi-K2.6, DeepSeek-VL, DeepSeek-VL2, InternVL-Chat, InternVL2, InternVL2.5(MPO), InternVL3, InternVL3.5, Intern-S1, Intern-S1-mini, Intern-S1-Pro, Intern-S2-Preview, Intern-S2-Mobius, ChemVLM, CogVLM-Chat, CogVLM2-Chat, MiniCPM-Llama3-V-2_5, Phi-3-vision, Phi-3.5-vision, GLM-4.1V-Thinking, Molmo, Gemma3, Llama4, etc.

[Usage] The official recommendation is to install lmdeploy with pip in a conda environment (Python 3.10-3.13). Since v0.13.0, the default precompiled wheel published on PyPI is built based on CUDA 12.8, and usually pip install lmdeploy is sufficient to complete the installation, including for the GeForce RTX 50 series. Offline batch inference: By default, models are downloaded from HuggingFace. If you need to use ModelScope models, you can install modelscope and set the environment variable export LMDEPLOY_USE_MODELSCOPE=True; if you need to use openMind Hub models, you can install openmind_hub and set export LMDEPLOY_USE_OPENMIND_HUB=True.

[Documentation and Tutorials] The official documentation, quick start, and issue feedback entry points are provided. The tutorials cover the user guide (LLM inference pipeline, VLM inference pipeline, LLM serving, VLM serving, quantization) and the advanced guide (TurboMind inference engine, PyTorch inference engine, custom chat templates, adding new models, gemm tuning, long-context inference, multi-model inference serving).

[Third-Party Projects] PackageLMDeploy-Jetson, for offline deployment of LLMs on the NVIDIA Jetson platform, as well as BentoLMDeploy, an example project for deploying LLMs using LMDeploy and BentoML.

[License] This project is released under the Apache 2.0 license.

[Updates (excerpt)]

  • 2026/08: The paper was accepted by EuroSys 2027.
  • 2026/04: PyPI storage quota was expanded, wheel uploads resumed, and v0.12.3 can be installed directly on PyPI with pip install lmdeploy.
  • 2026/02: Support for Qwen3.5 and vllm-project/llm-compressor 4bit symmetric/asymmetric quantization.
  • 2025/09: TurboMind supports MXFP4 on NVIDIA GPUs (V100 and later), achieving 1.5x the performance of vLLM on H800 for the openai gpt-oss model.
  • 2025/06: Comprehensive inference optimization for FP8 MoE models; support for DeepSeek PD-disaggregated deployment through integration with DLSlime and Mooncake.
  • 2025/04: Integrated FlashMLA, DeepGemm, DeepEP, MicroBatch, and eplb to improve DeepSeek inference performance.
  • 2025/01: Support for DeepSeek V3 and R1.
  • 2024/11: The PyTorch engine supports Mono-InternVL.
  • 2024/10: PyTorchEngine supports graph mode on the Ascend platform, doubling inference speed.
  • 2024/09: PyTorchEngine adds support for Huawei Ascend; after introducing CUDA graph, Llama3-8B inference is 1.3x faster.
  • 2024/08: Integrated into modelscope/swift as the default accelerator for VLM inference.
  • 2024/07: Support for Llama3.1 8B/70B and its tool calling; support for the entire InternVL2 series, InternLM-XComposer2.5, and InternLM2.5 function calling.
  • 2024/06: The PyTorch engine supports DeepSeek-V2 and multiple VLMs.
  • 2024/05: Balance the vision model when deploying VLMs on multiple GPUs; support 4-bit weight quantization and inference for VLMs.
  • 2024/04: Support for Llama3 and more VLMs; TurboMind adds online int8/int4 KV cache quantization and inference; optimized GQA enables internlm2-20b inference to reach 16+ RPS, about 1.8x that of vLLM; support for Qwen1.5-MOE and dbrx.
  • 2024/03: Support for DeepSeek-VL and the VLM offline inference pipeline and service.
  • 2024/02: Support for Qwen 1.5, Gemma, Mistral, Mixtral, Deepseek-MOE, etc.
  • 2024/01: OpenAOE seamlessly integrates with the LMDeploy service; support for multi-model, multi-machine, multi-GPU inference services; support for a pure Python PyTorch inference engine.
  • 2023/12: Turbomind supports multimodal input.
  • 2023/11: Turbomind supports directly loading HF models; major TurboMind upgrade, including Paged Attention, faster attention kernels without sequence length limits, 2x faster KV8 kernels, Split-K decoding (Flash Decoding), and W4A16 inference for sm_75.
  • 2023/09: TurboMind supports Qwen-14B, InternLM-20B, all features of Code Llama, and Baichuan2-7B.
  • 2023/08: TurboMind supports flash-attention2, Qwen-7B, dynamic NTK-RoPE and dynamic logN scaling, Windows (tp=1), and 4-bit inference (2.4x faster than FP16); LMDeploy is launched on HuggingFace Hub; support for 4-bit quantization with the AWQ algorithm.
  • 2023/07: TurboMind supports Llama-2 70B with GQA, Llama-2 7B/13B, and InternLM tensor parallel inference.

[Acknowledgments] The project thanks FasterTransformer。