Skip to content

Commit 4159e74

Browse files
noemotiovonHuangJoJo
authored andcommitted
(docs):update ascend doc
Signed-off-by: noemotiovon <757486878@qq.com>
1 parent f70037b commit 4159e74

3 files changed

Lines changed: 296 additions & 151 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Leveraging a multi-role distributed architecture with Ray for flexible resource
3737

3838
| 📣 Updates |
3939
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
40+
| **[09/28/2025]** 🎉 Ascend NPU support — see [usage guide](https://alibaba.github.io/ROLL/docs/English/UserGuide/ascend/ascend_usage). |
4041
| **[09/24/2025]** 🎉 Support [Wan2_2 Reward FL pipeline](examples/wan2.2-14B-reward_fl_ds/reward_fl_config.yaml). Explore the new capabilities! |
4142
| **[09/23/2025]** 🎉 ROLL aligns with GEM environment definition, providing agentic Tool Use training capabilities, [ToolUse docs](docs_roll/docs/English/UserGuide/agentic/Tool_Use.md). |
4243
| **[09/16/2025]** 🎉 Qwen3-Next model training is supported, refer to [configuration](examples/qwen3-next-80BA3B-rlvr_megatron/rlvr_config.yaml). |
@@ -105,6 +106,8 @@ Leveraging a multi-role distributed architecture with Ray for flexible resource
105106
[Resource Config](https://alibaba.github.io/ROLL/docs/English/UserGuide/device_mapping)
106107
[GPU Time-Division Multiplexing Control](https://alibaba.github.io/ROLL/docs/English/UserGuide/offload_reload_control)
107108

109+
#### ROLL x Ascend
110+
[Ascend Usage Guide](https://alibaba.github.io/ROLL/docs/English/UserGuide/ascend/ascend_usage)
108111

109112
---
110113

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# ROLL x Ascend
2+
3+
Last updated: 09/28/2025.
4+
5+
We have added support for Huawei Ascend devices in ROLL.
6+
7+
## Hardware Support
8+
9+
Atlas 900 A2 PODc
10+
11+
## Installation
12+
13+
### Basic Environment Setup
14+
15+
| Software | Version |
16+
| -------- | ------- |
17+
| Python | 3.10 |
18+
| CANN | 8.1.RC1 |
19+
20+
### Create Conda Environment
21+
22+
Use the following commands to create a new conda environment in Miniconda:
23+
24+
```
25+
conda create --name roll python=3.10
26+
conda activate roll
27+
```
28+
29+
### Install torch & torch_npu
30+
31+
To use torch and torch_npu in ROLL, install them using the commands below:
32+
33+
```
34+
# Install CPU version of torch
35+
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cpu
36+
37+
# Install torch_npu
38+
pip install torch_npu==2.5.1
39+
```
40+
41+
### Install vllm & vllm-ascend
42+
43+
To use vllm in ROLL, compile and install vllm and vllm-ascend as follows:
44+
45+
```
46+
# vllm
47+
git clone -b v0.8.4 --depth 1 https://github.com/vllm-project/vllm.git
48+
cd vllm
49+
50+
VLLM_TARGET_DEVICE=empty pip install -v -e .
51+
cd ..
52+
# vllm-ascend
53+
git clone -b v0.8.4rc2 --depth 1 https://github.com/vllm-project/vllm-ascend.git
54+
cd vllm-ascend
55+
56+
export COMPILE_CUSTOM_KERNELS=1
57+
pip install -e .
58+
cd ..
59+
```
60+
61+
If you encounter an error like this during the vllm-ascend installation:
62+
63+
```
64+
RuntimeError: CMake configuration failed: Command '['/pathto/miniconda3/envs/roll/bin/python3.10', '-m', 'pybind11', '--cmake']' returned non-zero exit status 2.
65+
```
66+
67+
Try modifying lines 151–158 in `setup.py` under the vllm-ascend directory as follows, then recompile:
68+
69+
```
70+
try:
71+
# if pybind11 is installed via pip
72+
pybind11_cmake_path = (subprocess.check_output(
73+
[python_executable, "-m", "pybind11",
74+
"--cmakedir"]).decode().strip())
75+
except subprocess.CalledProcessError as e:
76+
# else specify pybind11 path installed from source code on CI container
77+
raise RuntimeError(f"CMake configuration failed: {e}")
78+
```
79+
80+
### Install ROLL
81+
82+
```
83+
git clone https://github.com/alibaba/ROLL.git
84+
cd ROLL
85+
pip install -r requirements_common.txt
86+
pip install deepspeed==0.16.0
87+
cd ..
88+
```
89+
90+
### Additional Third-Party Libraries
91+
92+
| Software | Description |
93+
| --------------------------- | ------------- |
94+
| transformers | v4.52.4 |
95+
| flash_attn | not supported |
96+
| transformer-engine[pytorch] | not supported |
97+
98+
1. `transformers` v4.52.4 supports enabling `--flash_attention_2`.
99+
2. `flash_attn` acceleration is not supported.
100+
3. `transformer-engine[pytorch]` is currently not supported.
101+
102+
```
103+
pip install transformers==4.52.4
104+
```
105+
106+
## Quick Start: Single-Node Deployment
107+
108+
Before full usage, we recommend testing the single-node pipeline to verify your environment and installation.
109+
Since Megatron-LM training is not yet supported, first change `strategy_args` in the relevant files to use the `deepspeed` option.
110+
111+
1. Run the single-node pipeline via shell:
112+
113+
```
114+
bash examples/agentic_demo/run_agentic_pipeline_frozen_lake_single_node_demo.sh
115+
```
116+
117+
2. Run the agentic pipeline using a config file:
118+
119+
```
120+
# Make sure you are in the root directory of the ROLL project
121+
# export PYTHONPATH=$(pwd):$PYTHONPATH
122+
123+
python examples/start_agentic_pipeline.py \
124+
--config_path qwen2.5-0.5B-agentic \
125+
--config_name agentic_val_sokoban
126+
```
127+
128+
- `--config_path` – Directory containing your YAML configuration files.
129+
- `--config_name` – Filename (without the `.yaml` extension).
130+
131+
## Current Support Status
132+
133+
| Feature | Example | Training Backend | Inference Backend | Hardware |
134+
| --------------- | ------------------------------------------------------------ | ---------------- | ----------------- | ----------------- |
135+
| Agentic | examples/qwen2.5-0.5B-agentic/run_agentic_pipeline_sokoban.sh | DeepSpeed | vLLM | Atlas 900 A2 PODc |
136+
| Agentic-Rollout | examples/qwen2.5-0.5B-agentic/run_agentic_rollout_sokoban.sh | DeepSpeed | vLLM | Atlas 900 A2 PODc |
137+
| DPO | examples/qwen2.5-3B-dpo_megatron/run_dpo_pipeline.sh | DeepSpeed | vLLM | Atlas 900 A2 PODc |
138+
| RLVR | examples/qwen2.5-7B-rlvr_megatron/run_rlvr_pipeline.sh | DeepSpeed | vLLM | Atlas 900 A2 PODc |
139+
140+
## Disclaimer
141+
142+
The Ascend support provided in ROLL is intended as a reference example. For production use, please consult official channels.

0 commit comments

Comments
 (0)