.. _接口介绍:

接口介绍
==========================
Megatron Core 是构建 Transformer 架构大模型的核心模块，Cambricon Megatron-LM 已支持 Megatron Core 中各常见接口， 其调用的常见接口如下所示：

dist\_checkpointing package
---------------------------
- dist\_checkpointing.core
- dist\_checkpointing.dict\_utils
- dist\_checkpointing.mapping
- dist\_checkpointing.optimizer
- dist\_checkpointing.serialization
- dist\_checkpointing.utils


dist\_checkpointing.strategies package
--------------------------------------
- dist\_checkpointing.strategies.base
- dist\_checkpointing.strategies.tensorstore
- dist\_checkpointing.strategies.two\_stage
- dist\_checkpointing.strategies.zarr


distributed package
-------------------
- distributed.distributed\_data\_parallel
- distributed.finalize\_model\_grads


models.gpt package
------------------
- models.gpt.gpt\_embedding
- models.gpt.gpt\_model


pipeline\_parallel package
--------------------------
- pipeline\_parallel.p2p\_communication
- pipeline\_parallel.schedules


tensor\_parallel package
------------------------
- tensor\_parallel.cross\_entropy
- tensor\_parallel.data
- tensor\_parallel.layers
- tensor\_parallel.mappings
- tensor\_parallel.random
- tensor\_parallel.utils


transformer package
-------------------
- transformer.attention
- transformer.dot\_product\_attention
- transformer.enums
- transformer.identity\_op
- transformer.mlp
- transformer.module
- transformer.transformer\_block
- transformer.transformer\_config
- transformer.transformer\_layer
- transformer.utils
