Model or dataset
InternLM/lmdeploy avatar
InternLM/lmdeploy

LMDeploy: A Practical Look at Compression, Deployment, and Serving for LLMs

LMDeploy is a toolkit for compressing, deploying, and serving LLMs.

8,071 stars748 forksPythonApache-2.0

At a glance

What is it?
LMDeploy from the InternLM team is a Python toolkit that compresses, deploys, and serves large language models. It offers a TurboMind inference engine with persistent batching and KV cache quantization, but its performance claims and hardware support need careful verification before adoption.
Who is it for?
Adopt LMDeploy if you need a single toolkit for quantizing, deploying, and serving LLMs, especially if you target NVIDIA GPUs or Huawei Ascend and want both a high-performance C++ engine and a pure-Python engine for experimentation. Avoid it if you require stable PyPI installs (recent wheel uploads were paused), or if your model is not on the supported list.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What LMDeploy Actually Solves

LMDeploy is a toolkit for compressing, deploying, and serving large language models. The problem it addresses is the gap between training a model and putting it into production. You need to quantize weights to fit memory, serve multiple requests efficiently, and handle multimodal inputs without switching tools. LMDeploy bundles these steps into one Python package. The intended audience is engineers who run LLMs on their own hardware, not those using managed cloud APIs. The README emphasizes features like persistent batching (continuous batching), blocked KV cache, and tensor parallelism. These are standard concerns for anyone running a self-hosted inference service. The project is developed by the MMRazor and MMDeploy teams, which suggests a background in model compression and deployment tooling. That lineage is visible in the quantization support, which goes beyond simple weight rounding.

TurboMind vs. PyTorch Engine: Two Paths to Inference

LMDeploy offers two inference engines. The first is TurboMind, a C++-based engine that has been the project's performance workhorse since 2023. The README credits TurboMind with features like Paged Attention, Split-K decoding, and flash-attention2 support. The second is the PyTorch engine, introduced in January 2024 and developed entirely in Python. The README states this engine lowers the barrier for developers and enables rapid experimentation. That is a real trade-off. TurboMind is likely faster but harder to modify. The PyTorch engine is more accessible but may not match TurboMind's kernel-level optimizations. The existence of both engines means you have to choose. The documentation, referenced in the README, provides separate guides for each. For a production deployment, TurboMind seems the safer bet. For prototyping or adding a custom feature, the PyTorch engine is the one to start with.

Quantization: Weight-Only, KV Cache, and 4-Bit Inference

Quantization is a core part of LMDeploy. The README lists weight-only quantization, KV cache quantization, and 4-bit inference. The 4-bit inference is claimed to be 2.4x faster than FP16. That is a specific number, but the README does not state the hardware or model used for that benchmark. The quantization quality is said to be confirmed via OpenCompass evaluation, which is a benchmark suite. The project supports AWQ for 4-bit weight quantization and, as of February 2026, supports llm-compressor 4-bit symmetric and asymmetric quantization. There is also online int8/int4 KV cache quantization, which reduces memory usage during inference. For engineers, the key takeaway is that quantization is not a single toggle. You have to choose which method fits your model and accuracy requirements. The README references detailed guides for w4a16 and KV quant, so the project expects you to read those before applying quantization.

Hardware and Model Support: Wide but Not Universal

LMDeploy supports NVIDIA GPUs, with TurboMind supporting MXFP4 from V100 onward. The PyTorch engine also supports Huawei Ascend, as noted in the 2024 news entry. That is a notable differentiator, since Ascend support is rare in open-source inference toolkits. The README lists support for many model families: Llama, Qwen, InternVL, DeepSeek, Mistral, Mixtral, and more. However, the supported models list is a separate document, and the README does not guarantee every version or variant works. For example, DeepSeek V3 and R1 are supported as of January 2025, but the README does not specify which quantization methods work with them. The practical constraint is that you must check the supported models document before assuming your model works. The README also mentions Windows support only for TurboMind with tensor parallelism equal to 1, so multi-GPU Windows users are out of luck.

Getting It Running: Install and Basic Commands

The README gives a direct install path: pip install lmdeploy. That is the simplest route, but the 2026 news notes that PyPI storage quota issues paused wheel uploads, and only v0.12.3 is available on PyPI as of April 2026. The latest release on GitHub is v0.16.0, from August 2026. So if you want the newest features, you may need to install from source or from a pre-release wheel. The README points to a Quick Start guide for actual commands, but the repository's structure suggests the typical flow: load a Hugging Face model, quantize it if needed, and then serve it via an API server. The README mentions an API server guide and a proxy server for multi-model, multi-machine deployments. For a concrete example, the README references loading HF models directly in TurboMind, which is a feature added in November 2023. Without running the tool, I cannot give exact command syntax, but the documentation links are clear. The install command is confirmed, and the rest requires following the linked guides.

Limitations and Failure Modes

The most obvious limitation is the PyPI packaging instability. The README itself admits that wheel uploads were paused due to storage quota issues. That means a simple pip install may not give you the latest release. If you rely on PyPI for production, you could be stuck on an older version. Another limitation is the performance claims. The README says LMDeploy delivers up to 1.8x higher throughput than vLLM, and 1.5x the performance of vLLM on H800 for gpt-oss models. These are specific benchmarks, not general guarantees. The README does not specify the exact conditions for the 1.8x claim. In practice, your workload may not see that gain. Also, the project supports a wide range of models, but not all. If your model is not in the supported list, you have to wait for the project to add it or do custom work. Finally, the PyTorch engine is slower than TurboMind for some workloads, so choosing the wrong engine could hurt performance. The README does not provide a clear decision tree for which engine to use.

Comparing with vLLM: Different Strengths, Same Goal

The README repeatedly benchmarks against vLLM, so that is the natural alternative. vLLM is a popular open-source inference server with continuous batching and PagedAttention. LMDeploy offers the same core features, but adds a quantization toolkit and a PyTorch engine. The key difference is that vLLM focuses on serving, while LMDeploy covers compression as well. If you already use AWQ or llm-compressor for quantization, you might not need LMDeploy's quantization tools. But if you want a single project that handles both quantization and serving, LMDeploy is more integrated. The README claims LMDeploy is faster than vLLM in specific benchmarks, but those are vendor-claimed numbers. The real difference is the PyTorch engine, which vLLM does not have in the same form. vLLM is primarily a serving engine, not a compression toolkit. That distinction matters if your workflow starts with a raw Hugging Face model and ends with a quantized, served endpoint.

Maintenance and License: What You Need to Know

LMDeploy is licensed under Apache-2.0, which is permissive for commercial use. The repository is active, with releases roughly every month in 2026 (v0.14.0 in June, v0.15.0 in July, v0.16.0 in August). That cadence suggests ongoing maintenance. The paper acceptance to EuroSys 2027 indicates academic backing, which often correlates with long-term support. However, active development also means breaking changes. The README does not mention a deprecation policy, so upgrading between minor versions may require adjusting your configuration. The project has a documentation site and an issue tracker, which are standard for support. The maintenance cost is moderate: you need to track releases, check the supported models list, and re-benchmark after updates. The license allows you to modify the code, but if you fork it, you are on your own. For a production deployment, the monthly release cycle is a signal to pin a version and test upgrades in a staging environment before rolling out.

Editorial conclusion

Adopt LMDeploy if you need a single toolkit for quantizing, deploying, and serving LLMs, especially if you target NVIDIA GPUs or Huawei Ascend and want both a high-performance C++ engine and a pure-Python engine for experimentation. Avoid it if you require stable PyPI installs (recent wheel uploads were paused), or if your model is not on the supported list. Before committing, verify that your exact model version and hardware are covered, test the quantization quality with your own evaluation set, and benchmark throughput against vLLM on your workload, since the README's 1.8x claim is a single benchmark, not a universal guarantee.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes