安装与快速上手步骤需查阅官方文档,README 本身不含可直接运行的命令;使用前需按文档另行准备模型权重与依赖环境

LightLLM
ModelTCApache-2.0活跃维护轻量级 Python 大模型推理与服务框架,主打高吞吐、易扩展,适合快速部署 GPT、LLaMA 等模型对外提供 API 服务。
LightLLM is a Python-based LLM (Large Language Model) inference and serving framework, notable for its lightweight design, easy scalability, and high-speed performance.
README 未给出安装命令,仅链接到安装文档:https://lightllm-en.readthedocs.io/en/latest/getting_started/installation.htmlREADME 未说明具体显存要求;仅提到在单台 H200 机器上实现 DeepSeek-R1 的最快服务性能,未列出支持的 GPU 厂商与型号
基于 Python 的轻量级 LLM 推理与服务框架,主打易扩展和高速推理
轻量级 Python 大模型推理与服务框架,主打高吞吐、易扩展,适合快速部署 GPT、LLaMA 等模型对外提供 API 服务。
核心能力
- 纯 Python 设计,便于二次开发与研究复用
- token 级 KV Cache 管理,支持 DP rank 间前缀缓存传输
- 集成 FlashAttention、Triton、flashinfer 等高性能内核
- 支持约束解码,基于确定性下推自动机加速结构化生成
- 内置面向 SLA 的 Past-Future 请求调度器
容易踩的坑
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
- v1.2.0最新正式版2026-08-10 · 2026-08-10 04:20 UTC
This release introduces RL serving with verl, disaggregated ViT serving, a hybrid-cache architecture for linear-attention models, and a multi-level cache system with cache-aware PD. It also delivers broad model-performance improvements—including expanded MTP speculative decoding and optimizations across prefill, attention, MoE, quantization, and distributed inference—together with extensive stability and correctness fixes across scheduling, caching, multimodal processing, APIs, and long-running services.
Highlights
Reinforcement Learning Serving with verl
LightLLM can now serve as the rollout and inference backend for verl-based reinforcement learning workflows. A dedicated RL control plane supports online model-weight updates through distributed communication, tensors, or CUDA IPC, together with cache flushing, request aborts, generation pause/resume, and GPU-memory release/resume. The integration also includes routing-data capture for MoE training. #1298
Disaggregated ViT Serving
Vision encoding can now run as an independent
visual_onlyservice on dedicated GPU nodes. LLM servers use a proxy mode to discover registered visual workers through the config server, dispatch image encoding remotely, and retrieve the resulting embeddings through a shared AFS/Redis-backed cache. This separates ViT compute from language-model inference so the two tiers can be deployed and scaled independently. The release also adds configurable ViT attention backends and independent controls for visual and audio modules. #1234 #1191 #1229Hybrid Radix Cache with Large and Small Pages
A new dual-granularity Hybrid Radix Cache is introduced for hybrid full-attention and linear-attention models such as Qwen3.5 and Qwen3-Next:
- Large pages represent multi-block, reusable prefix checkpoints and keep the full-attention KV data together with the corresponding linear-attention convolution and SSM states.
- Small pages preserve fine-grained or fragmented prefix tails, avoiding coarse page boundaries from limiting cache reuse.
- Small-page entries can be consolidated into large-page checkpoints and integrated with CPU cache/offload, allowing the cache to retain fine-grained matching while managing recurrent states efficiently.
The design addresses the different storage granularities required by token-level KV cache and recurrent linear-attention state, enabling effective prefix caching for models that combine full and linear attention. #1265 #1422
Multi-Level Cache and Cache-Aware PD
The cache hierarchy now spans GPU, CPU, and disk, with support for quantized CPU KV cache, FP8/INT8 KV formats, NUMA-aware CPU page placement, and faster cache initialization. PD disaggregation gains a cache-aware scheduling path, upgraded NIXL KV transfer, Qwen3.5 support, and stronger lifecycle, health-check, disconnect, and multimodal handling. #997 #1098 #1379 #1399 #1412
What's Changed
- v100 triton kernel fix by @hiworldwzj in https://github.com/ModelTC/LightLLM/pull/1040
- fix tl.where warning by @sufubao in https://github.com/ModelTC/LightLLM/pull/1041
- force to warmup triton autotune configs in start. by @sufubao in https://github.com/ModelTC/LightLLM/pull/1043
- fix mtp mem alloc in overlap manner by @shihaobai in https://github.com/ModelTC/LightLLM/pull/1044
- add stream_options for openai api by @shihaobai in https://github.com/ModelTC/LightLLM/p
- v1.1.0LightLLM v1.1.0 Release!2025-09-03 · 2025-09-03 07:54 UTC
查看更新说明
🎉 Announcing LightLLM v1.1.0: More Efficient, More Powerful!
We are thrilled to introduce LightLLM v1.1.0, featuring major architectural and optimization upgrades for higher performance and broader applicability.
✨ Key Highlights
🚀 CPU-GPU Unified Folding Architecture
- Drastically reduces system-level CPU overhead
⚡ Deep Model Optimizations
- Enhanced support for DeepSeek and Qwen3-MoE
- Integration of DeepEP / DeepGEMM and fused MoE Triton optimizations
- New balanced DP request scheduler.
- Added support for MTP
⚙️ Autotuner for Triton Kernels
- Automatically tunes kernel operators used by the model at service startup
🏆 ACL Outstanding Award: Pre^3
🖼️ Improved Multimodal Inference
- Further optimizations for faster and more reliable multimodal model inference
📖 Learn More
More details can be found in the LightLLM v1.1.0 blog post.
- v1.0.12025-03-03 · 2025-03-03 10:23 UTC
查看更新说明
Highlights
- DeepSeek-R1 Multi-Node H100 Deployment Support
- FlashInfer Integration
- XGrammer Integration
What's Changed
- Benchclient by @shihaobai in https://github.com/ModelTC/lightllm/pull/740
- fix pause reqs by @shihaobai in https://github.com/ModelTC/lightllm/pull/741
- add RETURN_LIST for tgi_api by @shihaobai in https://github.com/ModelTC/lightllm/pull/742
- fix: fix a precision bug in the context_flashattention by @blueswhen in https://github.com/ModelTC/lightllm/pull/743
- Improve the accuracy of deepseekv3 by @hiworldwzj in https://github.com/ModelTC/lightllm/pull/744
- deepseekv3 bmm noquant and fix moe gemm bug. by @hiworldwzj in https://github.com/ModelTC/lightllm/pull/745
- Add Xgrammar Support by @flyinglandlord in https://github.com/ModelTC/lightllm/pull/701
- fuse fp8 quant in kv copying and add flashinfer decode mla operator in the attention module by @blueswhen in https://github.com/ModelTC/lightllm/pull/737
- fix: add flashinfer-python in the requirements.txt by @blueswhen in https://github.com/ModelTC/lightllm/pull/749
- Fix tokens2 by @SangChengC in https://github.com/ModelTC/lightllm/pull/748
- Fix Unit-test in PR: Add xgrammar by @flyinglandlord in https://github.com/ModelTC/lightllm/pull/750
- add support for multinode tp by @shihaobai in https://github.com/ModelTC/lightllm/pull/751
Full Changelog: https://github.com/ModelTC/lightllm/compare/v1.0.0...v1.0.1
- v1.0.0LightLLM v1.0.0 Release!2025-02-18 · 2025-02-18 05:09 UTC
查看更新说明
New Features
-
Cross-Process Request Object:
- Retained and optimized the previous three-process architecture design.
- Introduced a request object that can be accessed across processes, significantly reducing inter-process communication overhead.
-
Folding of scheduling and model inference:
- Implemented the folding of scheduling and model inference, significantly reducing communication overhead between the scheduler and modelrpc.
-
CacheTensorManager:
- New class to manage the allocation and release of Torch tensors within the framework.
- Maximizes tensor sharing across layers at runtime and enhances memory sharing between different CUDA graphs.
- On an 8x80GB H100 machine, using the DeepSeek-v2 model, LightLLM can run 200 CUDA graphs concurrently without out of memory (OOM).
-
PD-Disaggregation Prototype
- Dynamic registration of P and D nodes
-
Fastest DeepSeek-R1 performance on H200
- sglang==0.4.3, vllm==0.7.2, trtllm==0.17.0
- num_clients = 100. The input length of the test data is 1024, and the output follows a Gaussian distribution with a mean of 128
For more details, stay tuned to our blog at https://www.light-ai.top/lightllm-blog/. Thanks to outstanding projects like vllm, sglang, and trtllm, LightLLM also leverages some of the high-performance quantization kernels from vllm. We hope to collaborate in driving the growth of the open-source community.
-
LightLLM is a Python-based LLM (Large Language Model) inference and serving framework, notable for its lightweight design, easy scalability, and high-speed performance. LightLLM harnesses the strengths of numerous well-regarded open-source implementations, including but not limited to FasterTransformer, TGI, vLLM, and FlashAttention.
English Docs | 中文文档 | Blogs
Tech Blogs
- [2025/11] 🚀 Prefix KV Cache Transfer between DP rankers is now supported! Check out the technical deep dive in our blog post.
News
- [2025/09] 🔥 LightLLM v1.1.0 release!
- [2025/08] Pre $^3$ achieves the outstanding paper award of ACL2025.
- [2025/05] LightLLM paper on constrained decoding accepted by ACL2025 (Pre $^3$: Enabling Deterministic Pushdown Automata for Faster Structured LLM Generation). For a more accessible overview of the research with key insights and examples, check out our blog post: LightLLM Blog
- [2025/04] LightLLM paper on request scheduler published in ASPLOS’25 (Past-Future Scheduler for LLM Serving under SLA Guarantees)
- [2025/02] 🔥 LightLLM v1.0.0 release, achieving the fastest DeepSeek-R1 serving performance on single H200 machine.
Get started
Performance
Learn more in the release blogs: v1.1.0 blog.
FAQ
Please refer to the FAQ for more information.
Projects using LightLLM
We welcome any coopoeration and contribution. If there is a project requires LightLLM's support, please contact us via email or create a pull request.
Projects based on LightLLM or referenced LightLLM components:
- LoongServe, Peking University
- vLLM (some LightLLM's kernel used)
- SGLang (some LightLLM's kernel used)
- ParrotServe, Microsoft
- Aphrodite (some LightLLM's kernel used)
- S-LoRA
- OmniKV, Ant Group
- Lab4AI LightLLM+LlamaIndex, Lab4AI LightLLM+Qwen3-8B
- LazyLLM
Also, LightLLM's pure-python design and token-level KC Cache management make it easy to use as the basis for research projects.
Academia works based on or use part of LightLLM:
- ParrotServe (OSDI’24)
- SLoRA (MLSys’24)
- LoongServe (SOSP’24)
- ByteDance’s CXL (Eurosys’24)
- VTC (OSDI’24)
- OmniKV (ICLR’25)
- CaraServe, LoRATEE, FastSwitch ...
Community
For further information and discussion, join our discord server. Welcome to be a member and look forward to your contribution!
License
This repository is released under the Apache-2.0 license.
Acknowledgement
We learned a lot from the following projects when developing LightLLM.
- Faster Transformer
- Text Generation Inference
- vLLM
- SGLang
- flashinfer
- Flash Attention 1&2
- OpenAI Triton
Citation
We have published a number of papers around components or features of LightLLM, if you use LightLLM in your work, please consider citing the relevant paper.
constrained decoding: accepted by ACL2025 and achieved the outstanding paper award.
@inproceedings{chen-etal-2025-pre3,
title = "Pre$^3$: Enabling Deterministic Pushdown Automata for Faster Structured {LLM} Generation",
author = "Chen, Junyi and Bai, Shihao and Wang, Zaijun and Wu, Siyu and Du, Chuheng and Yang, Hailong and Gong, Ruihao and Liu, Shengzhong and Wu, Fan and Chen, Guihai",
editor = "Che, Wanxiang and Nabende, Joyce and Shutova, Ekaterina and Pilehvar, Mohammad Taher",
booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
month = jul,
year = "2025",
address = "Vienna, Austria",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.acl-long.551/",
doi = "10.18653/v1/2025.acl-long.551",
pages = "11253--11267",
ISBN = "979-8-89176-251-0",
}
Request scheduler: accepted by ASPLOS’25:
@inproceedings{gong2025past,
title={Past-Future Scheduler for LLM Serving under SLA Guarantees},
author={Gong, Ruihao and Bai, Shihao and Wu, Siyu and Fan, Yunqian and Wang, Zaijun and Li, Xiuhong and Yang, Hailong and Liu, Xianglong},
booktitle={Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2},
pages={798--813},
year={2025}
}