You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature is currently experimental. In future versions, there may be behavioral changes around configuration, coverage, performance improvement.
5
+
6
+
This guide provides instructions for using Ascend Graph Mode with vLLM Ascend. Please note that graph mode is only available on V1 Engine. And only Qwen, DeepSeek series models are well tested in 0.9.0rc1. We'll make it stable and generalize in the next release.
7
+
8
+
## Getting Started
9
+
10
+
From v0.9.0rc1 with V1 Engine, vLLM Ascend will run models in graph mode by default to keep the same behavior with vLLM. If you hit any issues, please feel free to open an issue on GitHub and fallback to eager mode temporarily by set `enforce_eager=True` when initializing the model.
11
+
12
+
There are two kinds for graph mode supported by vLLM Ascend:
13
+
-**ACLGraph**: This is the default graph mode supported by vLLM Ascend. In v0.9.0rc1, only Qwen series models are well tested.
14
+
-**TorchAirGraph**: This is the GE graph mode. In v0.9.0rc1, only DeepSeek series models are supported.
15
+
16
+
## Using ACLGraph
17
+
ACLGraph is enabled by default. Take Qwen series models as an example, just set to use V1 Engine is enough.
18
+
19
+
offline example:
20
+
21
+
```python
22
+
import os
23
+
24
+
from vllm importLLM
25
+
26
+
os.environ["VLLM_USE_V1"] =1
27
+
28
+
model = LLM(model="Qwen/Qwen2-7B-Instruct")
29
+
outputs = model.generate("Hello, how are you?")
30
+
```
31
+
32
+
online example:
33
+
34
+
```shell
35
+
vllm serve Qwen/Qwen2-7B-Instruct
36
+
```
37
+
38
+
## Using TorchAirGraph
39
+
40
+
If you want to run DeepSeek series models with graph mode, you should use [TorchAirGraph](https://www.hiascend.com/document/detail/zh/Pytorch/700/modthirdparty/torchairuseguide/torchair_0002.html). In this case, additional config is required.
41
+
42
+
offline example:
43
+
44
+
```python
45
+
import os
46
+
from vllm importLLM
47
+
48
+
os.environ["VLLM_USE_V1"] =1
49
+
50
+
model = LLM(model="deepseek-ai/DeepSeek-R1-0528", additional_config={"torchair_graph_config": {"enable": True}})
0 commit comments