workflowstacks
ai-agent

LMDeploy: Streamline LLM Deployment

Get efficient LLM compression and serving with LMDeploy, a toolkit for startup founders, backed by 8.0k+ GitHub stars.
7,979 stars716 forksPythonHealth Score 9/10Updated 7/27/2026100% free · open source
What it does

LMDeploy is a toolkit for compressing, deploying, and serving large language models (LLMs) to reduce their size and improve performance

Install / run
pip install lmdeploy
When to use it
  • When you need to deploy an LLM in a resource-constrained environment
  • When you want to reduce the latency of your LLM-based application
  • When you need to serve multiple LLMs and want to optimize storage and memory usage
Quick start
  1. 1Clone the LMDeploy repository using `git clone https://github.com/InternLM/lmdeploy.git`
  2. 2Navigate to the repository directory using `cd lmdeploy`
  3. 3Install the required dependencies using `pip install -r requirements.txt`
  4. 4Use the `lmdeploy compress` command to compress a pre-trained LLM, for example `lmdeploy compress --model-name bert-base-uncased --output-path compressed_model`
  5. 5Deploy the compressed model using `lmdeploy serve --model-path compressed_model --port 8000`
Ready-to-paste prompt
lmdeploy compress --model-name bert-base-uncased --output-path compressed_model --compression-ratio 0.5
Heads up: Make sure you have the necessary dependencies installed, including PyTorch and Transformers, and that your Python version is compatible with the requirements specified in the README, currently Python 3.8 or later
Saves to your device

Topics

codellama
cuda-kernels
deepspeed
fastertransformer
internlm
llama
llama2
llama3
llm
llm-inference
turbomind
How LMDeploy: Streamline LLM Deployment works
Codeflow
Free to inspect

LMDeploy: Streamline LLM Deployment is a very large Python project (~250k lines across 1154 code files, plus 172 test files). Setup is light: installs like a normal app. Reading the code is optional. Last commit this month, Apache-2.0 license, has a test suite.

Size
Very large codebase
~250k lines · 1154 code files · days to read — use, don't read
Setup
One-command install
Installs like a normal app. Reading the code is optional.
Runs on
Python · Docker
No API keys detected
Python 69%C++ 20%Cuda 10%CMake 1%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    lmdeploy/__main__.py
    Where the program starts running
  3. 3
    pyproject.toml
    Dependencies and the commands it exposes
  4. 4
    lmdeploy/__init__.py
    Inside lmdeploy/ — the main logic begins here
  5. 5
    examples/lite/qwen3_30b_a3b_awq.py
    A worked example — copy this to get going
What's in each folder
lmdeploy/Core code — the actual logic685 files
src/Core code — the actual logic533 files
docs/Documentation133 files
examples/Examples you can copy2 files
autotest/Folder152 files
benchmark/Evaluations & benchmarks13 files
builder/Folder12 files
requirements/Folder12 files
READMEHas testsDocumentedCI checksDocker readyExamples includedApache-2.0 licenseUpdated this month
Quick Actions
Details
Creator
InternLM
Language
Python
Category
ai-agent
Published
6/15/2023

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.