All Products
Search
Document Center

Platform For AI:Install the Pai-Megatron-Patch image

Last Updated:Jun 16, 2026

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:

  1. Log on to the PAI console.

  2. In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of the workspace that you want to use.

  3. In the left-side navigation pane, choose Model Training > Deep Learning Containers (DLC), and then click Create Task.

  4. 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 image icon in the Instance Type column, select a GPU node, and then choose a specific instance type based on your requirements.

  5. 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.

  1. Log on to the PAI console.

  2. In the navigation pane on the left, click Workspaces. On the Workspaces page, click the name of the workspace that you want to open.

  3. In the navigation pane on the left, choose Model Training > Data Science Workshop (DSW), and then click Create Instance.

  4. 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 image 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.

  5. 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.