From bfedeb736cbdebdf3c6e74c570eea02eb8130051 Mon Sep 17 00:00:00 2001 From: chenhuil Date: Thu, 26 Dec 2024 09:17:36 +0800 Subject: [PATCH] layers_per_stage --- docs/mindformers/docs/source_en/appendix/conf_files.md | 1 + docs/mindformers/docs/source_zh_cn/appendix/conf_files.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/mindformers/docs/source_en/appendix/conf_files.md b/docs/mindformers/docs/source_en/appendix/conf_files.md index b76c1acccc..d5d63522c4 100644 --- a/docs/mindformers/docs/source_en/appendix/conf_files.md +++ b/docs/mindformers/docs/source_en/appendix/conf_files.md @@ -67,6 +67,7 @@ Since the configuration will vary from model to model, only the generic configur | model.model_config.return_dict_in_generate | Set to return the inference results of the `generate` interface as a dictionary, defaults to `False`. | bool | | model.model_config.output_scores | Set to include score before the input softmax for each forward generation when returning the result as a dictionary, defaults to `False` | bool | | model.model_config.output_logits | Set to include the logits output by the model at each forward generation when returning results as a dictionary, defaults to `False`. | bool | +| model.model_config.layers_per_stage | Set the number of transformer layers assigned to each stage when enabling the pipeline stage, default is None, which means the transformer layers are evenly distributed across each stage. The set value is a list of integers with a length equal to the number of pipeline stages, where the i-th element indicates the number of transformer layers assigned to the i-th stage. | list | ### MoE Configuration diff --git a/docs/mindformers/docs/source_zh_cn/appendix/conf_files.md b/docs/mindformers/docs/source_zh_cn/appendix/conf_files.md index c08ed9fd43..de078e8d0e 100644 --- a/docs/mindformers/docs/source_zh_cn/appendix/conf_files.md +++ b/docs/mindformers/docs/source_zh_cn/appendix/conf_files.md @@ -67,6 +67,7 @@ Context配置主要用于指定[mindspore.set_context](https://www.mindspore.cn/ | model.model_config.return_dict_in_generate | 是否以字典形式返回`generate`接口的推理结果,默认为`False` | bool | | model.model_config.output_scores | 是否以字典形式返回结果时,包含每次前向生成时的输入softmax前的分数,默认为`False` | bool | | model.model_config.output_logits | 是否以字典形式返回结果时,包含每次前向生成时模型输出的logits,默认为`False` | bool | +| model.model_config.layers_per_stage | 设置开启pipeline stage时,每个stage分配到的transformer层数,默认为`None`,表示每个stage平均分配。设置的值为一个长度为pipeline stage数量的整数列表,第i位表示第i个stage被分配到的transformer层数。 | list | ### MoE配置 -- Gitee