登录 注册

vllm (大模型推理与服务引擎)

去点 Star
AI 模型与开发框架
96,770
Stars
0
Forks
0
Watchers
0
Open Issues
未知
许可证
Python
语言
创建时间
最近更新

项目能做什么

面向 LLM 的高吞吐量、低显存占用的推理与服务引擎。
来源:基于仓库元数据 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

项目简介

vLLM 是一个专为大语言模型(LLM)设计的高吞吐、低显存消耗的推理与服务引擎。该项目最初由加州大学伯克利分校(UC Berkeley)的 Sky Computing Lab 开发,目前已发展为拥有庞大社区支持的开源 AI 项目,致力于让每个人都能享受快速、低成本且易用的大模型服务。

核心功能

  • 卓越的吞吐量与显存优化:
  • 基于核心算法 PagedAttention 高效管理 Attention 的 Key/Value 显存。
  • 支持请求的持续批处理(Continuous batching)、Chunked prefill 与 Prefix caching。
  • 支持丰富量化方案:FP8、MXFP8/MXFP4、NVFP4、INT8、INT4、GPTQ/AWQ、GGUF、compressed-tensors、ModelOpt 等。
  • 深度优化算子(FlashAttention、FlashInfer、TRTLLM-GEN、FlashMLA、Triton 等)及投机解码(Speculative decoding)。
  • 极佳的易用性与模型生态:
  • 无缝兼容 Hugging Face 上超过 200 种模型架构(覆盖 Llama、Qwen、DeepSeek-V3、Mixtral、LLaVA、Mamba 等生成、多模态及向量模型)。
  • 内置兼容 OpenAI 的 API 服务器,同时支持 Anthropic Messages API 及 gRPC。
  • 支持流式输出(Streaming)、结构化输出(Structured outputs)以及工具调用(Tool calling)。
  • 支持分布式推理(Tensor、Pipeline、Data、Expert、Context 并行)与 Multi-LoRA。
  • 广泛的硬件适配:
  • 原生支持 NVIDIA GPUs、AMD GPUs、Intel GPUs 以及 x86/ARM/PowerPC CPUs。
  • 提供多样硬件插件支持:Google TPUs、Intel Gaudi、华为昇腾(Huawei Ascend)、Apple Silicon 等。

适合谁用

  • 需要在生产环境低延迟、高并发部署 LLM 服务的开发者与企业。
  • 希望用更少显存运行更大参数模型、跑批处理推理任务的研究人员与个人开发者。
  • 寻找可无缝替换 OpenAI 接口协议的本地私有化大模型部署方案的用户。

安装步骤

推荐使用 uv 或 pip 进行安装:

# 推荐使用 uv 安装 vLLM
uv pip install vllm

# 下载预编译算子以提升启动速度
vllm download-kernels

如需参与开发或定制,也可参考官方文档选择源码构建(build from source)。

配置说明

此部分原文未说明,请查看原仓库。更多启动参数(如模型路径、显存占比设置、张量并行等配置),请查阅 vLLM 官方文档。

常见问题

此部分原文未说明,请查看原仓库。遇到技术问题或 Bug,可前往: - GitHub Issues:vllm-project/vllm/issues - 用户讨论区:vLLM Forum

原始 README 摘录(英文原文,节选前 3000 字符)
<!-- markdownlint-disable MD001 MD041 -->
<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/vllm-project/vllm/main/docs/assets/logos/vllm-logo-text-dark.png">
    <img alt="vLLM" src="https://raw.githubusercontent.com/vllm-project/vllm/main/docs/assets/logos/vllm-logo-text-light.png" width=55%>
  </picture>
</p>

<h3 align="center">
Easy, fast, and cheap LLM serving for everyone
</h3>

<p align="center">
| <a href="https://docs.vllm.ai"><b>Documentation</b></a> | <a href="https://blog.vllm.ai/"><b>Blog</b></a> | <a href="https://arxiv.org/abs/2309.06180"><b>Paper</b></a> | <a href="https://x.com/vllm_project"><b>Twitter/X</b></a> | <a href="https://discuss.vllm.ai"><b>User Forum</b></a> | <a href="https://slack.vllm.ai"><b>Developer Slack</b></a> |
</p>

🔥 We have built a vLLM website to help you get started with vLLM. Please visit [vllm.ai](https://vllm.ai) to learn more.
For events, please visit [vllm.ai/events](https://vllm.ai/events) to join us.

---

## About

vLLM is a fast and easy-to-use library for LLM inference and serving.

Originally developed in the [Sky Computing Lab](https://sky.cs.berkeley.edu) at UC Berkeley, vLLM has grown into one of the most active open-source AI projects built and maintained by a diverse community of many dozens of academic institutions and companies from over 2000 contributors.

vLLM is fast with:

- State-of-the-art serving throughput
- Efficient management of attention key and value memory with [**PagedAttention**](https://blog.vllm.ai/2023/06/20/vllm.html)
- Continuous batching of incoming requests, chunked prefill, prefix caching
- Fast and flexible model execution with piecewise and full CUDA/HIP graphs
- Quantization: FP8, MXFP8/MXFP4, NVFP4, INT8, INT4, GPTQ/AWQ, GGUF, compressed-tensors, ModelOpt, TorchAO, and [more](https://docs.vllm.ai/en/latest/features/quantization/index.html)
- Optimized attention kernels including FlashAttention, FlashInfer, TRTLLM-GEN, FlashMLA, and Triton
- Optimized GEMM/MoE kernels for various precisions using CUTLASS, TRTLLM-GEN, CuTeDSL
- Speculative decoding including n-gram, suffix, EAGLE, DFlash
- Automatic kernel generation and graph-level transformations using torch.compile
- Disaggregated prefill, decode, and encode

vLLM is flexible and easy to use with:

- Seamless integration with popular Hugging Face models
- High-throughput serving with various decoding algorithms, including *parallel sampling*, *beam search*, and more
- Tensor, pipeline, data, expert, and context parallelism for distributed inference
- Streaming outputs
- Generation of structured outputs using xgrammar or guidance
- Tool calling and reasoning parsers
- OpenAI-compatible API server, plus Anthropic Messages API and gRPC support
- Efficient multi-LoRA support for dense and MoE layers
- Support for NVIDIA GPUs, AMD GPUs, Intel GPUs, and x86/ARM/PowerPC CPUs. Additionally, diverse hardware plugins such as Google TPUs, Intel Gau
阅读完整原文

商业机会分析 规则生成(AI 未配置)

综合评分 47.4 分。该项目在“个人可实施性”维度得 60 分,“付费可能性”维度得 32.0 分,差异化空间 40.0 分(评分依据见评分卡)。

面向细分需求的二次开发产品

产品构想基于 vllm 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。
目标用户该细分场景用户
难度/周期中 · 2~6 周
收费模式买断制 / 订阅制 / 广告
竞争风险细分需求规模需验证
依据 AI 推测:基于项目主题标签的判断

封装为在线小工具或 API 服务

产品构想把项目最常用的一个功能做成网页小工具,靠流量变现或按量计费。
目标用户搜索引擎带来的长尾用户
难度/周期低 · 1~3 周
收费模式免费引流 + 增值功能 / API 按量计费
竞争风险同质化竞争,需做好 SEO
依据 AI 推测:基于技术栈与部署特征的判断
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
BerriAI/litellm 支持统一以 OpenAI 格式调用百余种大模型 API 的轻量 AI 网关。 63,078 Python
modelscope/FunASR 开源语音识别工具包,支持训练推理、流式识别及兼容 OpenAI 的服务部署。 20,997 Python
meta-llama/llama-cookbook Llama 官方实用指南,涵盖模型推理、微调与 RAG 等端到端开发实践。 18,587 Jupyter Notebook
GeeeekExplorer/nano-vllm 中文介绍暂未生成
Nano vLLM
16,387 Python
budtmo/docker-android Docker 容器化安卓环境,集成 noVNC、录屏、MCP 服务与 AI-agent。 16,116 Python
Orchestra-Research/AI-Research-SKILLs 面向 AI 模型的开源科研工程技能库,用于构建全功能科研智能体。 14,429 TeX
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 ,最近推送 ,发布过 100 个 Release
社区活跃Star 96,770 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/vllm-project/vllm.git
cd vllm
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。