class_docstr: Information retrieval model which jointly encodes both query and passage
  and passes them to BERT encoder followed by a fully-connected layer for
  similarity score prediction.
class_docstr_tok: ["Information","retrieval","model","which","jointly","encodes","both","query","and","passage","and","passes","them","to","BERT","encoder","followed","by","a","fully-connected","layer","for","similarity","score","prediction","."]
code: def __init__(self, cfg: DictConfig, trainer: Trainer = None):
      model_name = cfg.language_model.pretrained_model_name
      self.tokenizer = get_tokenizer(tokenizer_name=model_name)
  
      super().__init__(cfg=cfg, trainer=trainer)
  
      self.bert_model = self.get_lm_model_with_padded_embedding(cfg)
      hidden_size = self.bert_model.config.hidden_size
      self.sim_score_regressor = SequenceRegression(
          hidden_size=hidden_size,
          num_layers=1,
          dropout=cfg.language_model.sim_score_dropout,
      )
      self.loss = SmoothedCrossEntropyLoss(pad_id=self.tokenizer.pad_id)
  
file_path: NeMo/nemo/collections/nlp/models/information_retrieval/bert_joint_ir_model.py
imports: from typing import Dict, Optional
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from nemo.collections.common.losses import SmoothedCrossEntropyLoss
  from nemo.collections.nlp.models.information_retrieval.base_ir_model import BaseIRModel
  from nemo.collections.nlp.modules.common import SequenceRegression
  from nemo.collections.nlp.modules.common.tokenizer_utils import get_tokenizer
  from nemo.core.classes.common import typecheck
  from nemo.core.neural_types import NeuralType
label_desc: Use image node_id 3 to create a new BertJointIRModel object from inherited base classes: BaseIRModel with example: obj = BertJointIRModel(cfg, trainer)