Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
yands 5a5ee999d1 | 2 years ago | |
---|---|---|
.. | ||
bpe_4w_pcl | 2 years ago | |
examples | 2 years ago | |
images | 2 years ago | |
megatron | 2 years ago | |
tasks | 2 years ago | |
test | 2 years ago | |
tools | 2 years ago | |
3-minus-inference-en.md | 2 years ago | |
3-minus-inference.md | 2 years ago | |
LICENSE | 2 years ago | |
MANIFEST.in | 2 years ago | |
README.md | 2 years ago | |
README_mgt.md | 2 years ago | |
__init__.py | 2 years ago | |
mergeMpCkpt.py | 2 years ago | |
pretrain_bert.py | 2 years ago | |
pretrain_gpt2.py | 2 years ago | |
pretrain_ict.py | 2 years ago | |
requirements.txt | 2 years ago | |
server.py | 2 years ago | |
setup.py | 2 years ago | |
testLayerNorm.py | 2 years ago |
本例子实现了 Pangu-alpha 模型在 AISynergy 平台上进行协同训练,并支持 Pytorch 框架下的数据并行和模型并行的协同训练,
也支持 Pytorch 和 MindSpore 异构框架下的协同训练。
支持 python >= 3.6, pytorch >= 1.5, cuda >= 10, and nccl >= 2.6 版本.
推荐使用英伟达的官方 docker 镜像docker pull nvcr.io/nvidia/pytorch:20.03-py3
。
需要安装 NLTK.
也可直接下载配好的镜像:
docker pull yands/pangu-alpha-megatron-lm-nvidia-pytorch:20.03.2
激活环境:source /opt/conda/bin/activate
。
根据教程
部署
下载和安装 AISynergy
AISynergy提供了两种使用方式:网页前端启动任务,服务器手动启动任务
1、基于网页前端启动任务,可以参考文档
平台使用手册
。
2、基于服务器手动启动任务,可以参考下面步骤。
请先阅读Pangu-alpha
项目下的 pytorch 版本的训练步骤和数据生成步骤。
设置参数:
1、模型相关的具体参数可以参考项目
Pangu-alpha
2、--train-iters-per-round: 设置每轮的迭代次数 (pretrain_pangu_AISynergy_350m.sh)
3、IP:Port: 设置 server 的 ip 和端口 (server.py, training.py)
4、num_rounds: 设置训练轮数(server.py)
运行脚本
python server.py
不同的并行策略只需要修改脚本pretrain_pangu_AISynergy_350m.sh
或 pretrain_pangu_AISynergy_2.6b.sh
单卡训练:
GPUS_PER_NODE=1
数据并行:
GPUS_PER_NODE=2
--model-parallel-size=1
2路数据并行,2路模型并行:
GPUS_PER_NODE = 4
--model-parallel-size=2
运行脚本:
如果在同一机器内运行不同的 client 需要指定不同的 nccl 端口,否则会冲突。
如果是 client 运行在不同机器上,端口设置成一样就行。
bash pretrain_pangu_AISynergy_350m.sh 6060
bash pretrain_pangu_AISynergy_350m.sh 6061
Pytorch 端的起任务的步骤请查看上一节: Pytorch 框架下的同构训练
,
但需要同时启动 MindSpore 版本的 client,请参考项目tmp
。
鹏城众智AI协同计算平台AISynergy是一个分布式智能协同计算平台。该平台的目标是通过智算网络基础设施使能数据、算力、模型、网络和服务,完成跨多个智算中心的协同计算作业,进而实现全新计算范式和业务场景,如大模型跨域协同计算、多中心模型聚合、多中心联邦学习等。
Java Vue Python JavaScript Go other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》