vllm-project/vllm
A high-throughput and memory-efficient inference and serving engine for LLMs
Python · ★ 95,569 · Fork 23,976 · 在 GitHub 查看
在手机上浏览源码、订阅每日 AI 趋势日报与项目架构深度解读:获取 CopoHub 客户端(iOS & HarmonyOS)→
GitHub Trending 上榜记录
vllm-project/vllm 已在 GitHub Trending 每日榜单上榜 3 天,最高排名第 2,首次上榜 2026-10-20,最近一次上榜 2026-10-22。
| 日期 | 排名 | Star | 当日增长 |
|---|---|---|---|
| 2026-10-22 | #2 | 95,087 | +441 |
| 2026-10-21 | #2 | 94,840 | +439 |
| 2026-10-20 | #13 | 94,417 | +98 |
同期上榜的项目
- php/php-src – The PHP Interpreter
- anthropics/knowledge-work-plugins – Open source repository of plugins primarily intended for knowledge workers to use in Claude Cowork
- DietrichGebert/ponytail – Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
- cloudflare/security-audit-skill – A coding-agent skill for multi-phase security audits with independently verified, machine-readable findings
- Graphify-Labs/graphify – Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.
- supabase/supabase – The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
vllm-project/vllm 项目深度剖析与商业评估报告
vllm-project/vllm 项目深度剖析与商业评估报告
1. 核心定位与商业落地价值
vLLM 解决的根本痛点是 LLM 推理服务中显存碎片化与 KV Cache 管理效率低下这一结构性瓶颈。传统 HuggingFace generate() 或简单批处理方案在并发场景下显存利用率常低于 60%,而 vLLM 通过 PagedAttention 将 KV Cache 切分为固定大小的 block(类似操作系统虚拟内存分页),将显存浪费压缩至个位数百分比,并在此基础上叠加 continuous batching(请求级动态调度)、chunked prefill(长 prompt 与解码请求混跑)与 prefix caching(共享系统提示词复用)。这套组合拳使其在吞吐量上通常达到朴素实现的 10–24 倍(论文数据),成为当前 OSS 推理栈事实上的性能基线。
商业落地场景高度集中于三类:其一,SaaS 推理平台的成本中心——每 GPU 小时吞吐直接决定毛利,vLLM 是 Together、Anyscale、Fireworks 等厂商的底层或对标基准;其二,企业私有化部署——对数据合规敏感的金融、医疗、政企客户需要 OpenAI 兼容 API 的自托管网关,vLLM 的 /v1/chat/completions 兼容层与多 LoRA 支持使其可单实例服务多租户;其三,模型厂商的官方 serving 参考实现——Qwen、DeepSeek、Kimi 等新架构往往在 vLLM 上首发支持,形成"模型-引擎"共生关系。
竞品差异化与护城河:对比 TensorRT-LLM(NVIDIA 闭源友好、极致性能但构建复杂、模型适配慢)、SGLang(RadixAttention 前缀复用与结构化输出调度强,与 vLLM 正面竞争)、TGI(HuggingFace 生态绑定,近年活跃度下滑),vLLM 的护城河在于广度:200+ 模型架构、跨 NVIDIA/AMD/Intel/TPU/Ascend 的硬件插件体系、以及 2000+ 贡献者形成的适配速度壁垒。其风险也源于此——广度优先意味着单点极致性能可能被专用方案反超。
2. 核心架构设计与技术深度
vLLM 采用分层解耦 + 插件化后端的架构,核心链路可拆为五层:
入口层:OpenAI 兼容 HTTP server、Anthropic Messages API、gRPC,统一收敛为内部 EngineCoreRequest。 调度层(Scheduler):实现 continuous batching 的核心。维护 waiting/running/swapped 三队列,按 token budget 与 block budget 双约束决策每步 prefill/decode 组合;chunked prefill 将超长 prompt 切片,避免 head-of-line blocking。 KV Cache 管理层(BlockManager):PagedAttention 的工程落地。物理 block 池 + 逻辑 block table,支持 copy-on-write 实现 parallel sampling/beam search 的共享前缀;prefix caching 通过 block hash 命中复用。 执行层(Worker/ModelRunner):Executor 抽象出单机、多进程(Ray)、多机拓扑;Worker 持有模型与 GPU 内存;CUDA/HIP graph 捕获(piecewise + full graph)消除 kernel launch 开销,decode 阶段小 batch 下收益显著。 算子层:attention backend 可插拔(FlashAttention、FlashInfer、FlashMLA、Triton),GEMM/MoE 走 CUTLASS/TRTLLM-GEN/CuTeDSL,按硬件与精度动态选择。
在 README 中展示上榜徽章
[](https://github.fq6825.top/repo/vllm-project/vllm)