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.

v1.2.0发布于 2026-08-10 04:20 UTC4,359star +1 / 7 天386fork同步于 2026-11-10 05:37 UTC

怎么上手

由 README 提炼,执行前请确认
README 未给出安装命令,仅链接到安装文档:https://lightllm-en.readthedocs.io/en/latest/getting_started/installation.html
硬件要求按 README 说明

README 未说明具体显存要求;仅提到在单台 H200 机器上实现 DeepSeek-R1 的最快服务性能,未列出支持的 GPU 厂商与型号

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 Python 的轻量级 LLM 推理与服务框架,主打易扩展和高速推理

轻量级 Python 大模型推理与服务框架,主打高吞吐、易扩展,适合快速部署 GPT、LLaMA 等模型对外提供 API 服务。

核心能力

  • 纯 Python 设计,便于二次开发与研究复用
  • token 级 KV Cache 管理,支持 DP rank 间前缀缓存传输
  • 集成 FlashAttention、Triton、flashinfer 等高性能内核
  • 支持约束解码,基于确定性下推自动机加速结构化生成
  • 内置面向 SLA 的 Past-Future 请求调度器

容易踩的坑

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

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README
这个条目还没有人工点评。如果它对你很有用,欢迎到 提交仓库 页写下你的使用经验。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    最近发版

    4 个版本v1.2.0
    1. 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_only service 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 #1229

      Hybrid 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

    2. 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.

    3. 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

      Full Changelog: https://github.com/ModelTC/lightllm/compare/v1.0.0...v1.0.1

    4. 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
        • image

      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.

    README 原文

    未翻译

    docs Docker stars visitors Discord Banner license

    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:

    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:

    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.

    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}
    }