Before you use Pai-Megatron-Patch to accelerate model training, you must install the Pai-Megatron-Patch image. This topic describes the limitations and the installation procedure.
Limitations
-
The Pai-Megatron-Patch image can be installed only on GPU instances.
-
The GPU driver version must be 460.32 or later.
Procedure
Install in DLC
Deep Learning Containers (DLC) is a cloud-native deep learning platform that provides a flexible, stable, and high-performance environment for machine learning training. DLC supports various algorithm frameworks, custom frameworks, and ultra-large-scale distributed training jobs.
DLC supports custom images, which simplifies deploying Pai-Megatron-Patch. You only need to provide the image address, and DLC automatically installs the image. After installation, you can run ultra-large-scale distributed training jobs across multiple nodes and GPUs.
Perform the following steps:
-
Log on to the PAI console.
-
In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of the workspace that you want to use.
-
In the left-side navigation pane, choose Model Training > Deep Learning Containers (DLC), and then click Create Task.
-
Configure the following key parameters and other settings as needed. For more information, see Create a training job.
-
In the Environment Information section, set Node Image to Image URL and enter the following address: pai-image-manage-registry.cn-wulanchabu.cr.aliyuncs.com/pai/pytorch-training:2.0-ubuntu20.04-py3.10-cuda11.8-megatron-patch-llm
-
In the Resource Information section, configure the following parameters:
-
For Framework, select PyTorch.
-
For Task Resources, click the
icon in the Instance Type column, select a GPU node, and then choose a specific instance type based on your requirements.
-
-
-
Click OK.
Install in DSW
Data Science Workshop (DSW) is a cloud-based deep learning development environment for algorithm developers. It integrates JupyterLab, supports custom plug-ins, and allows you to write, debug,
DSW also supports loading custom images. You can provide an image address to DSW to automatically install Pai-Megatron-Patch. After installation, you can use Pai-Megatron-Patch in DSW to debug and accelerate training programs.
The installation steps are as follows.
-
Log on to the PAI console.
-
In the navigation pane on the left, click Workspaces. On the Workspaces page, click the name of the workspace that you want to open.
-
In the navigation pane on the left, choose Model Training > Data Science Workshop (DSW), and then click Create Instance.
-
Configure the key parameters as follows. Set other parameters as needed. For more information about the parameters, see Create a DSW instance.
-
Resource Quota: Select Public Resource Group (Pay-as-you-go).
-
Instance Type: Click
and select a GPU instance type based on your use case. -
Images: In the Image Address field, enter the following URL:
pai-image-manage-registry.cn-wulanchabu.cr.aliyuncs.com/pai/pytorch-training:2.0-ubuntu20.04-py3.10-cuda11.8-megatron-patch-llm.
-
-
Click OK to create the DSW instance.
Post-installation
After you install the Pai-Megatron-Patch image, view and use the examples in the examples folder of Pai-Megatron-Patch.