对原始大模型进行切分时,算法切分策略配置文件路径。
参数值:切分策略配置文件路径和文件名。
参数值格式:路径和文件名:支持大小写字母(a-z,A-Z)、数字(0-9)、下划线(_)、短横线(-)、句点(.)、中文汉字。
无。
atc --distributed_cluster_build=1 --cluster_config=./numa_config_2p.json --model=./matmul2.pb --enable_graph_parallel="1" --graph_parallel_option_path=./parallel_option.json --soc_version=<soc_version> --output=test_parallel --framework=3 --log=debug
切分策略配置文件示例如下:
{ "graph_parallel_option": { "auto": false, "opt_level": "O1" "tensor_parallel_option": { "tensor_parallel_size": 2 }, "tensor_sharding":{ "optimizer_state_sharding": true, "gradient_sharding":true, "model_weight_sharding": true, "model_weight_prefetch": true, "model_weight_prefetch_buffer_size": 50 } } }
{ "graph_parallel_option": { "auto": true } }
参数解释如下:
TP切分:Tensor Parallel也称为算子内并行(Intra-Op Parallel),将计算图中各个Operators的Tensor沿一个或多个轴(batch/Non-batch)进行切分,切分后的partition分发给各个Device分别计算。
Atlas 推理系列产品
Atlas 训练系列产品
Atlas A2训练系列产品/Atlas 800I A2推理产品
无。