class_docstr: BERT-based encoder for queries or blocks used for learned information retrieval.
class_docstr_tok: ["BERT-based","encoder","for","queries","or","blocks","used","for","learned","information","retrieval","."]
code: def forward(self, input_ids, attention_mask, tokentype_ids=None):
      extended_attention_mask = bert_extended_attention_mask(
          attention_mask, next(self.language_model.parameters()).dtype
      )
      position_ids = bert_position_ids(input_ids)
  
      lm_output, pooled_output = self.language_model(
          input_ids,
          position_ids,
          extended_attention_mask,
          tokentype_ids=tokentype_ids,
      )
  
      # Output.
      ict_logits = self.ict_head(pooled_output)
      return ict_logits, None
  
imports: import os
  import torch
  from megatron import get_args, print_rank_0
  from megatron.checkpointing import get_checkpoint_tracker_filename, get_checkpoint_name
  from megatron.model import BertModel
  from .module import MegatronModule
  from megatron.core import mpu
  from megatron.model.enums import AttnMaskType
  from megatron.model.utils import get_linear_layer
  from megatron.model.utils import init_method_normal
  from megatron.model.language_model import get_language_model
  from megatron.model.utils import scaled_init_method_normal
  from megatron.model.bert_model import bert_extended_attention_mask, bert_position_ids
label_desc: Use image node_id 2 for calling the IREncoderBertModel obj's underlying member method code with example usage: obj.forward(input_ids, attention_mask, tokentype_ids) and returns: ict_logits,  None