HUB
Sign inSign up
vllm-ascend logo

openeuler/vllm-ascend

Sponsored OSS

By openeuler

•Updated 1 day ago

Image
3

10K+

openeuler/vllm-ascend repository overview

⁠Quick reference

⁠vLLM Ascend | openEuler

Current vLLM Ascend docker images are built on the openEuler⁠⁠. This repository is free to use and exempted from per-user rate limits.

vLLM Ascend (vllm-ascend) is a community maintained hardware plugin for running vLLM seamlessly on the Ascend NPU.

It is the recommended approach for supporting the Ascend backend within the vLLM community. It adheres to the principles outlined in the [RFC]: Hardware pluggable⁠, providing a hardware-pluggable interface that decouples the integration of the Ascend NPU with vLLM.

By using vLLM Ascend plugin, popular open-source models, including Transformer-like, Mixture-of-Expert, Embedding, Multi-modal LLMs can run seamlessly on the Ascend NPU.

Read more about Ascend at hiascend.com⁠ and explore the vLLM Ascend technical documentation at vllm-ascend.readthedocs.io⁠

The tag of each vLLM Ascend docker image is consist of the version of vLLM Ascend and the version of basic image. The details are as follows

TagsCurrentlyArchitectures
0.7.3rc2-torch_npu2.5.1-cann8.0.0-python3.10-oe2203lts⁠vLLM Ascend 0.7.3rc2 on openEuler 22.03-LTSamd64, arm64
0.7.3-torch_npu2.5.1-cann8.1.rc1-python3.10-oe2203lts⁠vLLM Ascend 0.7.3 on openEuler 22.03-LTSamd64, arm64
0.8.4rc1-torch_npu2.5.1-cann8.0.0-python3.10-oe2203lts⁠vLLM Ascend 0.8.4rc1 on openEuler 22.03-LTSamd64, arm64
0.8.5rc1-torch_npu2.5.1-cann8.1.rc1-python3.10-oe2203lts⁠vLLM Ascend 0.8.5rc1 on openEuler 22.03-LTSamd64, arm64
0.9.0rc1-torch_npu2.5.1-cann8.1.rc1-python3.10-oe2203lts⁠vLLM Ascend 0.9.0rc1 on openEuler 22.03-LTSamd64, arm64
0.9.0rc2-torch_npu2.5.1-cann8.1.rc1-python3.10-oe2203lts⁠vLLM Ascend 0.9.0rc2 on openEuler 22.03-LTSamd64, arm64
0.9.1rc1-torch_npu2.5.1-cann8.1.rc1-python3.10-oe2203lts⁠vLLM Ascend 0.9.1rc1 on openEuler 22.03-LTSamd64, arm64
0.11.0rc0-torch_npu2.5.1-cann8.1.rc1-python3.10-oe2403sp4⁠vLLM Ascend 0.11.0rc0 on openEuler 24.03-LTS-SP4amd64, arm64
0.30.0-torch_npu2.10.0.post7-cann9.2.1-python3.12-kimi-k3.1-pro-a3-openeuler-oe2403sp4⁠Dedicated image for serving Kimi K3.1 Pro (experimental) on Atlas A3 (Ascend 910C, ascend910_9391), openEuler 24.03-LTS-SP4amd64, arm64

⁠Usage

⁠Quick start 1: supported devices

  • Atlas A2 Training series (Atlas 800T A2, Atlas 900 A2 PoD, Atlas 200T A2 Box16, Atlas 300T A2)

  • Atlas 800I A2 Inference series (Atlas 800I A2)

  • Atlas A3 series (Ascend 910C, ascend910_9391, e.g. Atlas 800I A3): supported by the dedicated Kimi K3.1 Pro image above; Kimi K3.1 Pro is not supported on the A2 series

⁠Quick start 2: setup environment using container

# Update DEVICE according to your device (/dev/davinci[0-7])
export DEVICE=/dev/davinci0
# Update the vllm-ascend image
export IMAGE=quay.io/ascend/vllm-ascend:v0.8.4rc1-openeuler
docker run --rm \
--name vllm-ascend \
--device $DEVICE \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
-v /root/.cache:/root/.cache \
-p 8000:8000 \
-it $IMAGE bash

⁠Quick start 3: offline inference

You can use Modelscope mirror to speed up download:

export VLLM_USE_MODELSCOPE=true

With vLLM installed, you can start generating texts for list of input prompts (i.e. offline batch inferencing).

Try to run below Python script directly or use python3 shell to generate texts:

from vllm import LLM, SamplingParams

prompts = [
    "Hello, my name is",
    "The future of AI is",
]
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
# The first run will take about 3-5 mins (10 MB/s) to download models
llm = LLM(model="Qwen/Qwen2.5-0.5B-Instruct")

outputs = llm.generate(prompts, sampling_params)

for output in outputs:
    prompt = output.prompt
    generated_text = output.outputs[0].text
    print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")

⁠Quick start 4: serving Kimi K3.1 Pro with the dedicated image

The 0.30.0-torch_npu2.10.0.post7-cann9.2.1-python3.12-kimi-k3.1-pro-a3-openeuler-oe2403sp4 tag is a dedicated image for serving Kimi K3.1 Pro⁠, the multimodal Mixture-of-Experts model from Moonshot AI. It is based on vLLM Ascend 0.30.0, which introduces experimental support for Kimi K3.1 Pro, and ships the full stack required by the official deployment guide:

  • vLLM and vLLM Ascend pinned to the revisions compatible with vLLM Ascend 0.30.0
  • CANN 9.2.1 for Atlas A3 (ascend910_9391) with custom kernels compiled
  • flash-linear-attention-npu-a3, Mooncake transfer engine, and memfabric/memcache hybrid packages for PD disaggregation and pooled KV cache
  • ModelScope and Ray preinstalled for weight download and multi-node scheduling

Supported hardware and weights:

  • Validated on Atlas 800I A3 (64 GB x 16 devices per node). The A2 series and 950PR are not supported for Kimi K3.1 Pro.
  • Use the W4A8 quantized checkpoint Kimi-K3.1-Pro-w4a8⁠ with --quantization ascend.

Start a container on every node (requires Ascend Docker Runtime⁠ on the host):

export IMAGE=openeuler/vllm-ascend:0.30.0-torch_npu2.10.0.post7-cann9.2.1-python3.12-kimi-k3.1-pro-a3-openeuler-oe2403sp4
# equivalent upstream image: quay.io/ascend/vllm-ascend:kimi-k3.1-pro-a3-openeuler
docker run --rm \
    -e ASCEND_VISIBLE_DEVICES=0-15 \
    --name kimi-k31 \
    --shm-size=1g \
    --net=host \
    -v /usr/local/Ascend/driver/tools/hccn_tool:/usr/local/Ascend/driver/tools/hccn_tool \
    -v /root/.cache:/root/.cache \
    -it $IMAGE bash

Kimi K3.1 Pro is deployed with multi-node Prefill/Decode (PD) separation using MooncakeConnectorV2 (for example, 8 Atlas 800I A3 nodes in a 4P4D topology), with key options such as --quantization ascend, --tokenizer-mode kimi_k3, --reasoning-parser kimi_k3, --tool-call-parser kimi_k3, and --served-model-name kimi-k3.1-pro. Download the complete topology templates and follow the step-by-step instructions in the official Kimi K3.1 Pro deployment guide⁠.

⁠Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images⁠⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:b6698116b…
Size
8.5 GB
Last updated
1 day ago
docker pull openeuler/vllm-ascend:latest
This week's pulls