class_docstr: ChatGLM Actor model.
  
  Args:
      pretrained (str): Pretrained model name or path.
      config (ChatGLMConfig): Model config.
      checkpoint (bool): Enable gradient checkpointing.
  
  do not support lora for now.
code: def __init__(
      self,
      pretrained: str = None,
      config: Optional[ChatGLMConfig] = None,
      checkpoint: bool = False,
  ) -> None:
      if pretrained is not None:
          model = ChatGLMForConditionalGeneration.from_pretrained(
              pretrained
          )
      elif config is not None:
          model = ChatGLMForConditionalGeneration(config)
      else:
          model = ChatGLMForConditionalGeneration(ChatGLMConfig())
      if checkpoint:
          model.gradient_checkpointing_enable()
      super().__init__(model, lora_rank=0, lora_train_bias="none")
  
imports: from typing import Optional
  from ..base import Actor
  from .configuration_chatglm import ChatGLMConfig
  from .modeling_chatglm import ChatGLMForConditionalGeneration
label_desc: Use image node_id 1 to create a new ChatGLMActor object from inherited base classes: Actor with example: obj = ChatGLMActor(pretrained, config, checkpoint)