class_docstr: Token-based (input/output is tokens) retrieval encoder-decoder model
class_docstr_tok: ["Token-based","(","input\/output","is","tokens",")","retrieval","encoder-decoder","model"]
docstr: Set input tensor to be used instead of forward()'s input.
  
  When doing pipeline parallelism the input from the previous
  stage comes from communication, not from the input, so the
  model's forward_step_func won't have it. This function is thus
  used by internal code to bypass the input provided by the
  forward_step_func
docstr_tok: ["Set","input","tensor","to","be","used","instead","of","forward","(",")","'s","input",".","When","doing","pipeline","parallelism","the","input","from","the","previous","stage","comes","from","communication",",","not","from","the","input",",","so","the","model","'s","forward_step_func","wo","n't","have","it",".","This","function","is","thus","used","by","internal","code","to","bypass","the","input","provided","by","the","forward_step_func"]
code: def set_input_tensor(self, input_tensor):
      """Set input tensor to be used instead of forward()'s input.
  
      When doing pipeline parallelism the input from the previous
      stage comes from communication, not from the input, so the
      model's forward_step_func won't have it. This function is thus
      used by internal code to bypass the input provided by the
      forward_step_func"""
      self.input_tensor = input_tensor
  
file_path: NeMo/nemo/collections/nlp/modules/common/megatron/retrieval_token_level_encoder_decoder.py
imports: import torch
  from nemo.collections.nlp.modules.common.megatron.language_model import Embedding
  from nemo.collections.nlp.modules.common.megatron.layer_type import LayerType
  from nemo.collections.nlp.modules.common.megatron.megatron_decoders import get_decoder_model
  from nemo.collections.nlp.modules.common.megatron.megatron_encoders import get_encoder_model
  from nemo.collections.nlp.modules.common.megatron.module import MegatronModule
  from nemo.collections.nlp.modules.common.megatron.mup.layer import MuReadout
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults, init_method_normal, scaled_init_method_normal
label_desc: Use image node_id 2 for calling the MegatronRetrievalTokenLevelEncoderDecoderModule obj's underlying member method code with example usage: obj.set_input_tensor(input_tensor) without return types