class_docstr: BLOOM Actor model.
  
  Args:
      pretrained (str): Pretrained model name or path.
      config (BloomConfig): Model config.
      checkpoint (bool): Enable gradient checkpointing.
      lora_rank (int): LoRA rank.
      lora_train_bias (str): LoRA bias training mode.
class_docstr_tok: ["BLOOM","Actor","model",".","Args",":","pretrained","(","str",")",":","Pretrained","model","name","or","path",".","config","(","BloomConfig",")",":","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: str = None,
      config: Optional[BloomConfig] = None,
      checkpoint: bool = False,
      lora_path: str = None,
  ) -> None:
      if pretrained is not None:
          model = BloomForCausalLM.from_pretrained(pretrained)
      elif config is not None:
          model = BloomForCausalLM(config)
      else:
          model = BloomForCausalLM(BloomConfig())
      if lora_path is not None:
          model = PeftModel.from_pretrained(model, lora_path)
      if checkpoint:
          model.gradient_checkpointing_enable()
      super().__init__(model)
  
file_path: ColossalAI/applications/Chat/examples/community/peft/easy_models.py
imports: from typing import Optional, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from coati.models.generation import generate
  from coati.models.utils import log_probs_from_logits
  from peft import PeftModel
  from torch.nn.modules import Module
  from transformers import BloomConfig, BloomForCausalLM
label_desc: Use image node_id 1 to create a new BLOOMActor object from inherited base classes: Actor with example: obj = BLOOMActor(pretrained, config, checkpoint, lora_path)