mindformers.models.gpt2.GPT2Model¶
-
class
mindformers.models.gpt2.GPT2Model(config)[源代码]¶ The backbone of GPT network
- 参数
config (GPT2Config) – the config of network
- Inputs:
input_ids: the tokenized inputs with datatype int32 input_mask: the mask indicating whether each position is a valid input
- 返回
Tensor, the output logit of backbone present_layer: Tensor, the current feature map embedding_table: Tensor, the embedding table for the vocabulary
- 返回类型
output_state