training-xpu-pytorch 25.03, training-xpu-pytorch 25.03

更新时间:
复制 MD 格式

These are the release notes for training-xpu-pytorch 25.03.

Key features and bug fixes

Key features

  • Upgraded the PPU SDK in the base image to 1.4.3_hotfix.

  • Upgraded ACCL-P to v1.4.3-8 and EIC to 1.3.7.1-v2503, incorporating their respective features and bug fixes.

  • Upgraded several components, including vLLM to 0.7.3, Ray to 2.43, FlashInfer to 0.2.1.post1, Accelerate to 1.5.2, and Transformers to 4.49.0+ali.

Bug fixes

No bug fixes in this release.

Software components

Application scenario

Training/Inference

Framework

PyTorch

Requirements

PPU SDK 1.4.3-hotfix

Core components

  • Ubuntu 22.04

  • Python 3.10.13+gc

  • Torch 2.5.1.6.post4+ppu

  • CUDA 12.6

  • ACCL-P 1.4.3-8

  • triton 3.1.0+ppu

  • TransformerEngine 1.13+ppu1.4.2.oe

  • DeepSpeed 0.15.4+ali

  • flash-attn 2.5.7+ppu1.4.2.oe

  • xformers 0.0.29.post1+ppu1.4.2.oe

  • Transformers 4.49.0+ali

  • megatron-core 0.9.0

  • grouped_gemm 1.1.4

  • accelerate 1.5.2

  • diffusers 0.31.0

  • openmim 0.3.9

  • bitsandbytes 0.43.1

  • mmengine 0.10.3

  • mmcv 2.1.0

  • MMsegmentation 1.2.2

  • mmdet3d 1.4.0

  • AutoGPTQ 0.8.0.dev0+cu126

  • opencv-python-headless 4.10.0.84

  • vllm 0.7.3+ppu1.4.2.oe

  • pytorch-dynamic-profiler 0.24.11

  • perf 5.4.30

  • gdb 12.1

  • peft 0.13.2

  • ray 2.43

  • spacy 3.7.4

  • cumm 0.5.3

  • spconv 2.3.6

  • ffmpeg 7.0.1

  • open3d 0.18.0

  • flashinfer 0.2.1.post1

Assets

25.03

Public image

  • egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/training-xpu-pytorch:25.03

VPC images

  • acs-registry-vpc.{region-id}.cr.aliyuncs.com/egslingjun/{image:tag}

    {region-id} is the ID of the region where your Container Service for Kubernetes (ACK) cluster is located, such as cn-beijing or cn-wulanchabu.
    {image:tag} is the actual image name and tag.

Driver requirements

  • Driver version >= 1.1.0

Key features and enhancements

PyTorch compilation optimizations

The compilation optimization feature introduced in PyTorch 2.0 usually provides significant benefits in small-scale, single-GPU scenarios, but in LLM training, the need to incorporate memory optimization and distributed frameworks such as FSDP and Deepspeed makes it difficult for torch.compile() to provide benefits and can even cause performance degradation:

  • This optimization controls communication granularity within the DeepSpeed framework, allowing the compiler to capture a more complete computation graph and apply broader optimizations.

  • This release includes an optimized version of PyTorch with the following enhancements:

    • An optimized PyTorch compiler frontend that ensures successful compilation even when arbitrary graph breaks occur.

    • Enhanced pattern matching and dynamic shape capabilities to improve the performance of compiled code.

With these optimizations, you can typically achieve an end-to-end (E2E) throughput gain of around 20% when training an 8B LLM.

Selective gradient checkpoint optimization

A model to predict memory overhead was built using extensive benchmark data from various models, clusters, and training configurations—along with system metrics like memory utilization. This allows the system to recommend the optimal number of activation checkpointing layers. Integrated into PyTorch and compatible with the DeepSpeed framework, this feature helps users optimize memory usage.

ACCL communication library

ACCL is a high-performance network communication library developed by Alibaba for Lingjun products. It is available in three versions: ACCL-N for NVIDIA GPUs, ACCL-P for PPUs, and ACCL-R for AMD accelerators. ACCL-N is based on NVIDIA NCCL, offering full compatibility and including bug fixes and optimizations for performance and stability. ACCL-P is a collective communication library built upon T-Head's open-source pccl. ACCL-R is built upon AMD's open-source ROCm rccl. This release ports key features from ACCL and ACCL-N to pccl, resolves known issues, and is deeply customized for integration with Alibaba Cloud's proprietary networking components.

E2E performance evaluation

Using CNP, a cloud-native AI performance analysis tool, a comprehensive E2E performance comparison was conducted between this image and the standard base image across mainstream open-source models and framework configurations. An ablation study was also performed to evaluate the performance contribution of each optimization component.

Performance comparison with the base image

image.png

E2E performance contribution of core GPU components

The following tests, based on version 25.03, were conducted on a multi-node PPU cluster to evaluate E2E performance. The comparison includes:

  1. Base: PPU PyTorch image

  2. ACS AI Image (Base + ACCL): The base image with the ACCL communication library.

  3. ACS AI Image (AC2 + ACCL): The golden image with AC2 BaseOS and no optimizations enabled.

  4. ACS AI Image (AC2 + ACCL + CompilerOpt): The golden image with AC2 BaseOS and only the torch compile optimization enabled.

  5. ACS AI Image (AC2 + ACCL + CompilerOpt + CkptOpt): The golden image with AC2 BaseOS, with both torch compile and selective gradient checkpoint optimizations enabled.

image.png

Quick start

The following examples show how to pull the training-xpu-pytorch image by using Docker.

Note

To use the training-xpu-pytorch image in ACS, select it from the Artifacts Center page when you create a workload in the console, or specify the image reference in a YAML file.

Step 1: Log in to the image registry

docker login egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com

Step 2: Enable compiler and checkpoint optimizations

  • Enable compilation optimization

    Use the Transformers Trainer API:

    image.png

  • Enable selective gradient checkpoint optimization

    export CHECKPOINT_OPTIMIZATION=true

Step 3: Start the container

The image includes the built-in model training tool ljperf, which is used to demonstrate the steps for starting a container and running a training task.

Note

For ACS-based products, use a YAML file to reference the image.

LLMs

# Start and enter the container
docker run --rm -it --ipc=host --net=host  --privileged egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/training-xpu-pytorch:[tag]

# Run the training demo
ljperf --action train --model_name deepspeed/llama3-8b

Step 4: Usage notes

  • The modifications in this image affect libraries such as PyTorch and DeepSpeed. These changes will be upstreamed later. Do not reinstall these packages.

  • In your DeepSpeed configuration, leave zero_optimization.stage3_prefetch_bucket_size empty or set it to auto.

Known issues

  • The PPU-compatible cuDNN currently does not support the FMA feature. Therefore, the PPU-compatible TE cannot use FusedAttention (cuDNN). You can use FlashAttention instead: export NVTE_FLASH_ATTN=1 && export NVTE_FUSED_ATTN=0.

  • Issues with DeepSeek models

    • When testing the DeepSeek model, the --max-model-len setting must be < 80k. Otherwise, an OOM error may occur at runtime.

    • SGLang does not support running INT8 quantized models.

    • For vllm 0.7.3, you must set the --max-num-batched-tokens parameter to avoid the framework's default limit of 2048 tokens (see the open-source community issue [Usage]:Input prompt (2501 tokens) is too long and exceeds limit of 2048 #13370).

  • Performance issues

    • For large Mixture-of-Experts (MoE) models, performance can be improved by using an autotune tool. vLLM includes an optimization feature that loads a hardware-specific fused_moe kernel configuration file to boost performance.

  • Quantization issues

    • By default, vLLM uses the Marlin Kernel to accelerate quantized inference for GPTQ, AWQ, W8A8, and WOQ. You can explicitly specify the quantization method to use vLLM's original quantized inference kernels, such as Marlin, W8A8, awq, or gptq. For example, you can specify gptq_acext or awq_acext to perform quantized inference. However, acext currently does not support quantization with act_order=True or GPTQ-Int8 quantized weights. This will be optimized in the next version.

    • vLLM uses vllm-flash-attn, xformers, or flashinfer as the attention backend. The default backend, vllm-flash-attn, does not yet outperform the GPU version in terms of performance. This will be optimized in a future release.

    • In vLLM, A8W8 quantization is implemented by using the acext library, and its performance has not yet been fully optimized.

    • FP8 quantization is currently very slow because it has not yet been adapted or optimized for PPU. The support schedule is to be determined.

  • Stability issues