class_docstr: Llama Actor model.
  
  Args:
      pretrained (str): Pretrained model name or path.
      config (LlamaConfig): Model config.
      checkpoint (bool): Enable gradient checkpointing.
      lora_rank (int): LoRA rank.
      lora_train_bias (str): LoRA bias training mode.
class_docstr_tok: ["Llama","Actor","model",".","Args",":","pretrained","(","str",")",":","Pretrained","model","name","or","path",".","config","(","LlamaConfig",")",":","Model","config",".","checkpoint","(","bool",")",":","Enable","gradient","checkpointing",".","lora_rank","(","int",")",":","LoRA","rank",".","lora_train_bias","(","str",")",":","LoRA","bias","training","mode","."]
code: def __init__(
      self,
      pretrained: Optional[str] = None,
      config: Optional[LlamaConfig] = None,
      checkpoint: bool = False,
      lora_rank: int = 0,
      lora_train_bias: str = "none",
  ) -> None:
      if pretrained is not None:
          model = LlamaForCausalLM.from_pretrained(pretrained)
      elif config is not None:
          model = LlamaForCausalLM(config)
      else:
          model = LlamaForCausalLM(LlamaConfig())
  
      if checkpoint:
          model.gradient_checkpointing_enable()
  
      super().__init__(model, lora_rank, lora_train_bias)
  
imports: from typing import Optional
  from transformers import LlamaConfig, LlamaForCausalLM
  from ..base import Actor
label_desc: Use image node_id 1 to create a new LlamaActor object from inherited base classes: Actor with example: obj = LlamaActor(pretrained, config, checkpoint, lora_rank, lora_train_bias)