mindformers.models.glm.GLMForPreTraining

class mindformers.models.glm.GLMForPreTraining(config: mindformers.models.glm.glm_config.GLMConfig)[源代码]

Provide glm training loss or logits through network.

参数

config (GLMConfig) – The config of GLMModel.

create_position_ids_np(input_ids)[源代码]

Get position ids from input_ids with numpy

get_position_ids_np(input_ids, mask_positions, use_gmasks=None)[源代码]

Get position ids from input_ids and mask_positions with numpy