code: def load_plm(model_name, model_path, specials_to_add=None):
      r"""A plm loader using a global config.
      It will load the model, tokenizer, and config simulatenously.
  
      Args:
          config (:obj:`CfgNode`): The global config from the CfgNode.
  
      Returns:
          :obj:`PreTrainedModel`: The pretrained model.
          :obj:`tokenizer`: The pretrained tokenizer.
          :obj:`model_config`: The config of the pretrained model.
          :obj:`wrapper`: The wrapper class of this plm.
      """
      model_class = get_model_class(plm_type=model_name)
      model_config = model_class.config.from_pretrained(model_path)
      # you can change huggingface model_config here
      # if 't5'  in model_name: # remove dropout according to PPT~\ref{}
      #     model_config.dropout_rate = 0.0
      if "gpt" in model_name:  # add pad token for gpt
          specials_to_add = ["<pad>"]
          # model_config.attn_pdrop = 0.0
          # model_config.resid_pdrop = 0.0
          # model_config.embd_pdrop = 0.0
      model = model_class.model.from_pretrained(
          model_path, config=model_config
      )
      tokenizer = model_class.tokenizer.from_pretrained(model_path)
      wrapper = model_class.wrapper
  
      model, tokenizer = add_special_tokens(
          model, tokenizer, specials_to_add=specials_to_add
      )
  
      if "opt" in model_name:
          tokenizer.add_bos_token = False
      return model, tokenizer, model_config, wrapper
  
file_path: OpenPrompt/openprompt/plms/__init__.py
imports: from statistics import mode
  from typing import List, Optional
  from transformers.modeling_utils import PreTrainedModel
  from .utils import TokenizerWrapper
  from transformers.tokenization_utils import PreTrainedTokenizer
  from .mlm import MLMTokenizerWrapper
  from .seq2seq import T5LMTokenizerWrapper, T5TokenizerWrapper
  from .lm import LMTokenizerWrapper
  from transformers import BertConfig, BertTokenizer, BertModel, BertForMaskedLM, RobertaConfig, RobertaTokenizer, RobertaModel, RobertaForMaskedLM, AlbertTokenizer, AlbertConfig, AlbertModel, AlbertForMaskedLM, T5Config, T5Tokenizer, T5ForConditionalGeneration, OpenAIGPTTokenizer, OpenAIGPTLMHeadModel, OpenAIGPTConfig, GPT2Config, GPT2Tokenizer, GPT2LMHeadModel, OPTConfig, OPTForCausalLM, ElectraConfig, ElectraForMaskedLM, ElectraTokenizer, GPTJConfig, GPTJForCausalLM
  from collections import namedtuple
  from yacs.config import CfgNode
  from openprompt.utils.logging import logger
label_desc: Use image node_id 2 for calling a global function with example usage: load_plm(model_name, model_path, specials_to_add) and returns: model,  tokenizer,  model_config,  wrapper