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 forward(self, input_ids, attention_mask, token_type_ids):
      hidden_states = self.bert_model(
          input_ids=input_ids,
          token_type_ids=token_type_ids,
          attention_mask=attention_mask,
      )
      if isinstance(hidden_states, tuple):
          hidden_states = hidden_states[0]
  
      scores = self.sim_score_regressor(hidden_states=hidden_states)
  
      return scores
  
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 4 for calling the BertJointIRModel obj's underlying member method code with example usage: obj.forward(input_ids, attention_mask, token_type_ids) and returns: scores