Skip to main content

vLLM-MindSpore Plugin

| 关于MindSpore | 文档 | LLM Infercence Serving SIG | 问题反馈 |

English | 中文


最新消息 🔥

  • [2025/08] 适配vLLM v0.9.1,新增支持LogProbs参数、Qwen2.5-VL模型。
  • [2025/06] 适配vLLM v0.8.3,新增支持vLLM V1架构、Qwen3大模型。
  • [2025/04] 完成vLLM v0.7.3适配,新增支持Automatic Prefix Caching、Chunked Prefill、Multi-step Scheduling、MTP等特性。联合openEuler社区和上海交通大学,实现DeepSeek全栈开源单机推理部署,你可以在这里阅读详细报道。
  • [2025/03] 完成vLLM v0.6.6.post1适配,支持采用vllm.entrypoints部署基于MindSpore的DeepSeek-V3/R1、Qwen2.5等大模型推理服务。联合openEuler社区和北京大学,发布全栈开源DeepSeek推理方案,你可以在这里阅读详细报道。
  • [2025/02] MindSpore社区正式创建了mindspore/vllm-mindspore代码,旨在将MindSpore大模型推理能力接入vLLM。

简介

vLLM-MindSpore插件(vllm-mindspore)是一个由MindSpore社区孵化的vLLM后端插件。其将基于MindSpore构建的大模型推理能力接入vLLM,从而有机整合MindSpore和vLLM的技术优势,提供全栈开源、高性能、易用的大模型推理解决方案。

vLLM-MindSpore插件以将MindSpore大模型接入vLLM,并实现服务化部署为功能目标。其遵循以下设计原则:

  • 接口兼容:支持vLLM原生的API和服务部署接口,避免新增配置文件或接口,降低用户学习成本和确保易用性。
  • 最小化侵入式修改:尽可能避免侵入式修改vLLM代码,以保障系统的可维护性和可演进性。
  • 组件解耦:最小化和规范化MindSpore大模型组件和vLLM服务组件的耦合面,以利于多种MindSpore大模型套件接入。

基于上述设计原则,vLLM-MindSpore插件采用如下图所示的系统架构,分组件类别实现vLLM与MindSpore的对接:

  • 服务化组件:通过将LLM Engine、Scheduler等服务化组件中的PyTorch API调用映射至MindSpore能力调用,继承支持包括Continuous Batching、PagedAttention在内的服务化功能。
  • 大模型组件:通过注册或替换模型、网络层、自定义算子等组件,将MindSpore Transformers、MindSpore One等MindSpore大模型套件和自定义大模型接入vLLM。
Description

vLLM-MindSpore插件采用vLLM社区推荐的插件机制,实现能力注册。未来期望遵循RPC Multi-framework support for vllm所述原则。

环境准备

  • 硬件:Atlas 800I A2推理服务器,或Atlas 800T A2推理服务器,已安装必要的驱动程序,并可连接至互联网
  • 操作系统:openEuler或Ubuntu Linux
  • 软件:
    • Python >= 3.9, < 3.12
    • CANN >= 8.0.0.beta1
    • MindSpore
    • vLLM

注:请参考版本配套,以获取详细的软件版本配套信息。

快速体验

首先请根据安装指南选择安装方式。环境安装成功后,运行如下命令启动vLLM服务和使用Qwen/Qwen3-8B模型:

vllm-mindspore serve Qwen/Qwen3-8B

请查看快速体验和安装指南了解更多。

镜像构建

可使用以下命令构建vLLM-MindSpore插件的配套Docker镜像,通过参数-a选择相应的NPU类型进行构建,device_type表示设备类型,910b 为Atlas A2系列,310p 为Atlas 300I Pro/Duo和Atlas 300V Pro系列,默认为 910b:

bash build_image.sh -a device_type

贡献

请参考 CONTRIBUTING 文档了解更多关于开发环境搭建、功能测试以及 PR 提交规范的信息。

我们欢迎并重视任何形式的贡献与合作,请通过Issue来告知我们您遇到的任何Bug,或提交您的特性需求、改进建议、技术方案。

SIG组织

Release files for vllm-mindspore 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vllm-mindspore 0.5.1
File Interpreter ABI Platform
vllm_mindspore-0.5.1-cp311-none-any.whl CPython 3.11 none any Details
vllm_mindspore-0.5.1-cp310-none-any.whl CPython 3.10 none any Details
vllm_mindspore-0.5.1-cp39-none-any.whl CPython 3.9 none any Details

Total release size: 2.1 MB

Release files / vllm_mindspore-0.5.1-cp311-none-any.whl

Download URL vllm_mindspore-0.5.1-cp311-none-any.whl
Size 722.2 kB
Tags CPython 3.11
SHA-256 checksum
How to use checksums
3b03c52c4d3c6f988aaea5280ebc69df85dd83dee2f289c166450ca807d604e6
BLAKE2b-256 checksum
How to use checksums
502484eb67de0d4c24fe5b40210539751940d0eee0f92374f3f66551084b0029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.10

Release files / vllm_mindspore-0.5.1-cp310-none-any.whl

Download URL vllm_mindspore-0.5.1-cp310-none-any.whl
Size 713.0 kB
Tags CPython 3.10
SHA-256 checksum
How to use checksums
6779dc2fded20d987176502e64fc0a66c1dbc25a238f86281b0fe42b2f7b3d4a
BLAKE2b-256 checksum
How to use checksums
5a0772f47203ad392bb4e5e9084af32678d53b48192f1b6bd835164b7ca58d22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.10

Release files / vllm_mindspore-0.5.1-cp39-none-any.whl

Download URL vllm_mindspore-0.5.1-cp39-none-any.whl
Size 713.1 kB
Tags CPython 3.9
SHA-256 checksum
How to use checksums
1a93569c5659dcc8133c364056c9dbc4208901543f6d0ee70ed26dabb010291f
BLAKE2b-256 checksum
How to use checksums
354c121e77c7dd78804f9e81204f3b559c9504862b91e9521d85926ac66cf3fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.10

Release history Release notifications | RSS feed

This release

0.5.1 This release

3 release files

0.5.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page