Shortcuts

ChatGLMForCausalLM

class ChatGLMForCausalLM(config)[源代码]
training: bool
classmethod pipeline_layers(config)[源代码]

Get layers of pipeline.

返回:

list

static load_parallel_state_dict(path, config, process_exclusion=False, protocol='file', format='hf', **kwargs)[源代码]

Load state_dict from path.

The format of pretrained model should be the same as that of huggingface.

返回:

state_dict. Note that the state_dict should be processed properly to match the current rank.

static save_parallel_state_dict(state_dict, path, config, process_exclusion=False, protocol='file')[源代码]

Save state_dict to path.

The format of saved state dict should be the same as that of huggingface.