mindspore2022/docs/api/api_python/transformer/mindspore.nn.EmbeddingOpPar...

14 lines
770 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.. py:class:: mindspore.nn.transformer.EmbeddingOpParallelConfig(data_parallel=1, model_parallel=1, vocab_emb_dp=True)
`VocabEmbedding` 类中的并行配置。当vocab_emb_dp为True时设置Embedding查找为数据并行其中model_parallel参数会被忽略。当vocab_emb_dp为False时在Embedding表的第0轴进行按model_parallel的大小进行切分。
**参数:**
- **data_parallel** (int) - 表示数据并行度。默认值1。
- **model_parallel** (int) - 表示模型平行度。默认值1。
- **vocab_emb_dp** (bool) - 表示模型并行或数据并行中的Shard embedding。默认值True。
.. py:method:: dp_mp_config()
获取包含有data_parallel和model_parallel属性的DPMPlConfig类。