本文介绍training-nv-pytorch 26.07版本发布记录。
Main Features and Bug Fix Lists
Main Features
PyTorch及其相关组件升级至 2.12.1、Triton升级至 3.7.1。
训练相关组件Transformer Engine 升级至2.16.1、Megatron-Core 升级至0.18.2、Transformers 升级至5.12.1,合入社区功能和对应issues。
推理相关组件vLLM 升级至 0.24.0、FlashInfer 升级至 0.6.12,合入社区功能和对应issues。
Bug Fixes
无
Contents
镜像名称 | training-nv-pytorch | |
Tag | 26.07-serverless | |
应用场景 | 训练/推理 | |
框架 | pytorch | |
Requirements | NVIDIA Driver release >= 580 | NVIDIA Driver release >= 580 |
Supported Architectures | amd64 | aarch64 |
核心组件 |
|
|
Assets
公网镜像
CUDA 13.0.2(Driver >=580, amd64 & aarch64 )
egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/training-nv-pytorch:26.07-serverless
VPC镜像
将指定的AI容器镜像Asset URIegslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/{image:tag}替换为acs-registry-vpc.{region-id}.cr.aliyuncs.com/egslingjun/{image:tag}即可在VPC内快速拉取ACS AI容器镜像。
{region-id}:ACS产品开服地域的地域ID。例如:cn-beijing、cn-wulanchabu等。{image:tag}:AI容器镜像的名称和Tag。例如:inference-nv-pytorch:25.10-vllm0.11.0-pytorch2.8-cu128-20251028-serverless、training-nv-pytorch:25.10-serverless等。
Tag为yy.mm-serverless(例如26.07-serverless)的镜像适用于ACS产品形态、灵骏多租产品形态;灵骏单租产品形态可以使用Tag为yy.mm(例如26.07)的镜像。
Driver Requirements
26.07 Release 支持CUDA 13.0.2;其中CUDA 13.0.2 需要NVIDIA驱动程序版本580或更高版本。有关支持的驱动程序的完整列表,请参见CUDA 应用程序兼容性。更多信息,请参见 CUDA 兼容性和升级。
Key Features and Enhancements
PyTorch编译优化
PyTorch 2.0引入的编译优化能力在单卡小规模下通常可以获得显著的收益,但是在LLM训练中需要引入显存优化、FSDP/DeepSpeed等分布式框架,导致torch.compile()无法简单地获得收益或者存在负收益:
-
在DeepSpeed框架下控制通信的颗粒度,帮助编译器获取更完整的计算图,做更大范围的编译优化
-
优化版本的PyTorch:
-
优化PyTorch编译器前端,确保在计算图中出现任意graph break的情况下仍能正常编译
-
强化模式匹配以及dynamic shape能力,提高编译后代码性能
-
ACCL通信库
ACCL是阿里针对灵骏产品自研的高性能网络通信库,针对GPU场景提供ACCL-N版本。ACCL-N是阿里云基于英伟达NCCL定制后提供的高性能通信库,在完全兼容NCCL的基础上,修复了官方NCCL版本的一些BUG,并进行了性能和稳定性相关的优化。
Quick Start
以下示例内容仅通过Docker方式拉取training-nv-pytorch镜像。
在ACS中使用training-nv-pytorch镜像需要通过控制台创建工作负载界面的制品中心页面选取,或者通过YAML文件指定镜像引用。
1. 选择镜像
docker pull egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/training-nv-pytorch:[tag]2. 启动容器
镜像中内置了模型训练工具,以此说明启动容器和运行训练任务的步骤。
LLM类
# 启动容器并进入
docker run -it --gpus=all --ipc=host --net=host egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/training-nv-pytorch:[tag]
# Dense: Qwen3.5-4B LoRA 冒烟
NPROC_PER_NODE=2 CUDA_VISIBLE_DEVICES=0,1 \
swift sft --model Qwen/Qwen3.5-4B --tuner_type lora \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
--split_dataset_ratio 0.01 --num_train_epochs 1 \
--target_modules all-linear --attn_impl flash_attn \
--deepspeed zero2 --max_length 2048 --output_dir output
# MoE 用例:Qwen/Qwen3.5-35B-A3B
NPROC_PER_NODE=8 CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
megatron sft --model Qwen/Qwen3.5-35B-A3B \
--dataset 'AI-ModelScope/alpaca-gpt4-data-zh#500' \
--split_dataset_ratio 0.01 --num_train_epochs 1 --finetune true \
--expert_model_parallel_size 8 --moe_grouped_gemm true \
--micro_batch_size 1 --global_batch_size 8 \
--recompute_granularity full --recompute_method uniform --recompute_num_layers 1 \
--attention_backend flash --max_length 2048 \
--output_dir megatron_output/Qwen3.5-35B-A3B3. 使用建议
镜像中的改动涉及Pytorch、DeepSpeed等库,请勿重装。
DeepSpeed配置中的
zero_optimization.stage3_prefetch_bucket_size留空或者auto。
Known Issues
无