class_docstr: Base class for information retrieval models.
code: def __init__(self, cfg: DictConfig, trainer: Trainer = None):
      self.setup_tokenizer(cfg.tokenizer)
  
      super().__init__(cfg=cfg, trainer=trainer)
  
imports: import math
  from typing import Dict, Optional
  import numpy
  import torch
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from nemo.collections.nlp.data import BertInformationRetrievalDataset
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.collections.nlp.modules.common.lm_utils import get_lm_model
  from nemo.core.classes.common import typecheck
label_desc: Use image node_id 1 to create a new BaseIRModel object from inherited base classes: NLPModel with example: obj = BaseIRModel(cfg, trainer)