Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
PCL-陶恒韬 7054e88375 | 2 years ago | |
---|---|---|
transformer | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago |
让模型的分布式训练效率更高(10B以内),支持训练更大规模的模型(>10B、50B、100B),构建支持混合并行的经典模型Model_zoo算法库,是该项目的初衷。
本项目目前实现环境:HuaWei Ascend 910 + MindSpore + C76环境
基于:[MindSpore>Model_zoo]模型的基础上进行混合并行的实现。
基于Transformer-base模型使用混合并行和数据并行的对比,使用一共20794362条128长度token(33.5G)进行训练的结果:
单机/混合并行方式 | 设备数量 | batchsize | 并行配置 | time(s) per 1k tokes | 训练耗时(time/epoch) | 吞吐率(tokens/s) |
---|---|---|---|---|---|---|
单机 | 1机1卡 | 96 | - | 1.920 | 11.27 h | 0.52 k |
单机+数据并行 | 1机2卡 | 96*2 | 数据并行 | 1.099 | 6.23 h | 0.91 k |
单机+数据并行 | 1机4卡 | 96*4 | 数据并行 | 0.552 | 3.12 h | 1.81 k |
单机+数据并行 | 1机8卡 | 96*8 | 数据并行 | 0.275 | 1.53 h | 3.64 k |
单机+数据并行 | 2机16卡 | 96*16 | 数据并行 | 0.141 | 47.45 min | 7.08 k |
单机+数据并行 | 4机32卡 | 128*32 | 数据并行 | 0.069 | 23.42 min | 14.44 k |
单机+数据并行 | 8机64卡 | 128*64 | 数据并行 | 0.035 | 11.70 min | 28.47 k |
混合并行 | 1机8卡 | 1024*8 | dp=2,mp=4 | 0.178 | 1.02 h | 5.61 k |
混合并行 | 2机16卡 | 1024*16 | dp=4,mp=4 | 0.044 | 13.72 min | 22.78 k |
混合并行 | 4机32卡 | 1024*32 | dp=4,mp=8 | 0.017 | 4.92 min | 58.82 k |
混合并行 | 8机64卡 | 1024*64 | dp=8,mp=8 | 0.005 | 2.06 min | 220.69 k |
混合并行 | 1机8卡 | 1024*8 | dp=8,mp=1 | 0.024 | 7.98 min | 42.33 k |
混合并行 | 2机16卡 | 1024*16 | dp=16,mp=1 | 0.0092 | 4.40 min | 108.55 k |
混合并行 | 4机32卡 | 1024*32 | dp=32,mp=1 | 0.0031 | 2.03 min | 320.00 k |
混合并行 | 8机64卡 | 1024*64 | dp=64,mp=1 | 0.0012 | 1.25 min | 820.51 k |
dp:算子级数据并行,mp:算子级模型并行
让模型的训练更有效率(10B以内),支持训练更大规模的模型(>10B、50B、100B),构建支持分布式混合并行的典型模型案例,是该项目的初衷。
Python Shell Perl
Apache-2.0
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》