class_docstr: Wraps around the Huggingface transformers implementation repository for easy use within NeMo.
class_docstr_tok: ["Wraps","around","the","Huggingface","transformers","implementation","repository","for","easy","use","within","NeMo","."]
code: def forward(
      self,
      input_ids,
      attention_mask=None,
      token_type_ids=None,
      labels=None,
      return_dict=False,
      output_attentions=False,
      output_hidden_states=False,
      past_key_values=None,
      use_cache=False,
      position_ids=None,
      max_length=128,
  ):
      res = super().forward(
          input_ids=input_ids,
          attention_mask=attention_mask,
          token_type_ids=token_type_ids,
          return_dict=return_dict,
          labels=labels,
          output_attentions=output_attentions,
          output_hidden_states=output_hidden_states,
          past_key_values=past_key_values,
          position_ids=position_ids,
          use_cache=use_cache,
      )
  
      return res if not return_dict else res
  
imports: from transformers import GPT2LMHeadModel
  from nemo.collections.nlp.modules.common.gpt_module import GPTModule
  from nemo.core.classes import typecheck
label_desc: Use image node_id 1 for calling the GPT2Encoder obj's underlying member method code with example usage: obj.forward(input_ids, attention_mask, token_type_ids, labels, return_dict, output_attentions, output_hidden_states, past_key_values, use_cache, position_ids, max_length) and returns: unknown