Overview
RTP-LLM is a large language model inference acceleration engine built by Alibaba's Foundation Model Inference Team and released under the Apache 2.0 licence. Inside Alibaba Group it serves LLM traffic for business units including Taobao, Tmall, Idlefish, Cainiao, Amap, Ele.me, AE and Lazada, and it is a sub-project of Alibaba's havenask search engine. The project credits NVIDIA's FasterTransformer as its main base, with some kernels integrated from TensorRT-LLM and ideas drawn from vLLM and Hugging Face Transformers.
As a single-node engine it loads Hugging Face models in SafeTensors, PyTorch or Megatron formats and runs them on high-performance CUDA kernels such as PagedAttention, FlashAttention and FlashDecoding. It quantizes weights to INT8 automatically at load time, accepts GPTQ and AWQ INT4 checkpoints, can quantize the KV cache, serves several LoRA adapters from one model instance, and handles image-plus-text input. The scheduling and batching layer is written in C++, and a running server answers OpenAI-style /v1/chat/completions requests as well as its own native generation endpoint. The documentation lists NVIDIA GPUs of compute capability 7.0 and up (V100 and T4 through H100, H200 and H20) and AMD's MI308X.
The 0.2.0 release turned it into a distributed serving system for very large mixture-of-experts models such as DeepSeek-V3/R1, Kimi-K2 and Qwen3: prefill/decode disaggregation, attention/FFN disaggregation, a separately deployable frontend, expert-parallel load balancing (EPLB), DeepEP communication, micro-batch overlapping and MTP speculative decoding. A load-balancing Master role, FlexLB, routes each request to prefill nodes by KV-cache hit rate and queue time and to decode nodes by KV-cache usage, with a cache server for prefix-aware routing across clusters of 100 to 1,000 nodes.

What it does
- Optimized CUDA kernels — PagedAttention, FlashAttention, FlashDecoding, plus XQA and FlashInfer attention backends — with framework-level tuning of dynamic batching overhead
- Quantization built in: automatic weight-only INT8 at load time, GPTQ and AWQ INT4 checkpoints, adaptive KV-cache quantization and an FP8 KV cache
- Multi-LoRA serving from a single model instance, multimodal image-and-text input, P-tuning models and pruned irregular models
- Prefix cache for multi-turn dialogue, system-prompt cache, KV-cache reuse and speculative decoding, including MTP

- Distributed deployment: tensor parallelism across GPUs and machines, prefill/decode and attention/FFN disaggregation, expert parallelism with EPLB and DeepEP, and the FlexLB load balancer
- Runs on NVIDIA GPUs from compute capability 7.0 (with specific V100 optimizations) and on AMD MI308X, with Docker images and wheels per card type
Getting started
RTP-LLM ships as a Python wheel and as Docker images per GPU type. The commands below follow the project's install and quick-start pages; swap in your own checkpoint path and model type.
Install the package
The pip route needs Linux and Python 3.10. Building from source uses bazelisk instead; per-card wheels (SM7x, SM8x, SM9x, AMD) are listed on each GitHub release.
pip install --upgrade pip
pip install "rtp_llm>=0.2.0"Or start a server from the Docker image
The documented example serves Qwen1.5-0.5B-Chat from a mounted Hugging Face snapshot on port 30000. Pick the image that matches your GPU generation (sm7x, sm8x, sm9x or rocm).
docker run --gpus all --shm-size 32g -p 30000:30000 -v /mnt:/mnt -v /home:/home --ipc=host \
ali-hangzhou-hub-registry.cn-hangzhou.cr.aliyuncs.com/isearch/rtp_llm_sm8x_opensource:0.2.0_0.2.0_2025_10_09_17_35_8fa289f5 \
/opt/conda310/bin/python -m rtp_llm.start_server \
--checkpoint_path=/mnt/nas1/hf/models--Qwen--Qwen1.5-0.5B-Chat/snapshots/6114e9c18dac0042fa90925f03b046734369472f/ \
--model_type=qwen_2 --start_port=30000Launch it directly with Python
Without Docker, the same module starts the server; the quick-start uses port 8090.
python -m rtp_llm.start_server \
--checkpoint_path=/path/to/hf/checkpoint/ \
--model_type=qwen_2 \
--start_port=8090Send a chat request
The server speaks the OpenAI chat-completions format, so curl, requests or the OpenAI Python client all work. A native endpoint at / also accepts a raw prompt with a generate_config.
curl -s http://localhost:8090/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "What is the capital of France?"}]}'Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it

- Serve a large mixture-of-experts model such as DeepSeek-R1, Kimi-K2 or Qwen3 across many GPUs with prefill/decode disaggregation and expert parallelism
- Run one base model with many LoRA adapters for different products or tenants from a single instance
- Squeeze more throughput from older or mixed fleets — V100, T4, A10 or H20 — with weight-only INT8/INT4 and KV-cache quantization
- Load-balance a large inference cluster by KV-cache hit rate and queue length rather than random routing, using FlexLB
How RTP-LLM compares
RTP-LLM alongside other open-source serving & deployment tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Transformers | ★ 168k | Hugging Face Transformers is a Python framework that defines and runs state-of-the-art pretrained models for text, vision, audio, and multimodal tasks, for both inference and training. |
| vLLM | ★ 93.8k | A high-throughput LLM serving engine that uses PagedAttention and continuous batching to serve many requests at once. |
| SGLang | ★ 37.1k | A serving framework for LLMs and multimodal models that boosts throughput by reusing shared prompt prefixes across requests. |
| Modular Platform | ★ 29.9k | Modular's AI platform: the MAX inference framework with an OpenAI-compatible serving endpoint and GPU kernel library, plus the Mojo language and compiler. |
| TensorRT-LLM | ★ 14.8k | NVIDIA's library that compiles LLMs into optimized engines for the fastest inference on its data-center GPUs. |
| OpenLLM | ★ 12.6k | A tool to run any open-source LLM as an OpenAI-compatible API endpoint locally or in the cloud. |
| LMCache | ★ 12.1k | A KV-cache layer that stores and shares cached attention state across engines and requests to cut repeated computation. |
| RTP-LLM | ★ 1.4k | Alibaba's in-house LLM inference engine, open-sourced — CUDA kernels, quantization, multi-LoRA and prefill/decode disaggregation behind an OpenAI-style API |