code: def init_model(self, new: bool = False):
      from peft import LoraConfig, PeftConfig, PeftModel, get_peft_model
      from transformers import AutoTokenizer
  
      if self._record_class == TextClassificationRecord:
          self.lora_kwargs["task_type"] = "SEQ_CLS"
      elif self._record_class == TokenClassificationRecord:
          self.lora_kwargs["task_type"] = "TOKEN_CLS"
      else:
          raise NotImplementedError(
              "`rg.Text2TextRecord` is not supported yet."
          )
  
      try:
          config = PeftConfig.from_pretrained(
              self.model_kwargs["pretrained_model_name_or_path"]
          )
          model = self._model_class.from_pretrained(
              config.base_model_name_or_path,
              return_dict=True,
              num_labels=len(self._id2label),
              id2label=self._id2label,
              label2id=self._label2id,
          )
          self._model_sub_class = model.__class__
          model = PeftModel.from_pretrained(
              model, self.model_kwargs["pretrained_model_name_or_path"]
          )
      except Exception:
          config = LoraConfig(**self.lora_kwargs)
          model = self._model_class.from_pretrained(
              **self.model_kwargs, return_dict=True
          )
          self._model_sub_class = model.__class__
          model = get_peft_model(model, config)
      self.trainer_tokenizer = AutoTokenizer.from_pretrained(
          config.base_model_name_or_path, add_prefix_space=True
      )
      self.trainer_model = model.to(self.device)
  
file_path: argilla/src/argilla/training/peft.py
imports: import logging
  from typing import List, Union
  import numpy
  from argilla.client.models import TextClassificationRecord, TokenClassificationRecord
  from argilla.training.transformers import ArgillaTransformersTrainer
  from argilla.training.utils import filter_allowed_args
  from argilla.utils.dependency import require_dependencies
label_desc: Use image node_id 2 for calling the ArgillaPeftTrainer obj's underlying member method code with example usage: obj.init_model(new) without return types