Installation#
verl-hardware-plugin is installed as a Python package and discovered by verl automatically through the verl.plugins entry-points group.
Prerequisites#
Install from Source#
# 1. Install verl (see https://verl.readthedocs.io/en/latest/start/install.html)
git clone https://github.com/verl-project/verl
cd verl
pip install --no-build-isolation -e .
# 2. Install verl-hardware-plugin
git clone https://github.com/verl-project/verl-hardware-plugin.git
cd verl-hardware-plugin
pip install --no-build-isolation -e .
After installation, no additional configuration in verl is required. When verl starts, it imports all packages registered under the verl.plugins group, which triggers registration of all platforms and engines.
To verify registration:
python3 -c "from verl.plugin.platform import get_platform; p = get_platform(); print(f'device: {p.device_name}'); print(f'vendor: {p.vendor_name}'); print(f'available: {p.is_available()}')"
Platform Selection#
The platform is auto-detected at startup. You can override it with the VERL_PLATFORM environment variable:
export VERL_PLATFORM=metax # MetaX
export VERL_PLATFORM=intel # Intel XPU
export VERL_PLATFORM=cambricon # Cambricon MLU
For the FlagOS engine on NVIDIA, set the engine device and vendor:
export VERL_ENGINE_DEVICE=cuda
export VERL_ENGINE_VENDOR=flagos
Platform-Specific Setup#
Each hardware platform has its own base image, driver mounts, and environment requirements. Use the vendor-provided container images where available.
Platform |
Base image / stack |
Platform env |
Communication |
Guide |
|---|---|---|---|---|
NVIDIA (FlagOS) |
|
|
NCCL / FlagCX |
|
MetaX |
MetaX Docker Hub image, e.g. |
|
MCCL |
|
Iluvatar |
|
auto / |
IXCCL |
|
Cambricon MLU |
Cambricon release image (contact Cambricon), |
auto / |
CNCL |
|
Enflame GCU |
Vendor image |
auto |
ECCL / FlagCX |
|
Intel XPU |
oneAPI environment ( |
|
xccl (oneCCL) |
For Cambricon MLU, install the additional packages numpy<2 and TransferQueue inside the container. For MetaX and Iluvatar, mx-smi / the CoreX stack must be available inside the container for hardware auto-detection.
Preparing Data and Models#
The platform guides use Qwen3-0.6B and GSM8K as the reference end-to-end example:
# Model
modelscope download --model Qwen/Qwen3-0.6B --local_dir ./Qwen3-0.6B
# Dataset
mkdir gsm8k && cd gsm8k
wget "https://baai-flagscale.ks3-cn-beijing.ksyuncs.com/rl/datasets/gsm8k/train.parquet"
wget "https://baai-flagscale.ks3-cn-beijing.ksyuncs.com/rl/datasets/gsm8k/test.parquet"
Start a Ray cluster before launching training:
ray start --head --dashboard-host=0.0.0.0
See the User Guide for running the GSM8K GRPO baseline and the References for the environment-variable reference and FAQ.