class_docstr: GPT-2 Language model.
class_docstr_tok: ["GPT-2","Language","model","."]
docstr: Customized load.
docstr_tok: ["Customized","load","."]
code: def load_state_dict(self, state_dict, strict=True):
      """Customized load."""
  
      # Load word_embeddings.
      if self.post_process and not self.pre_process:
          self.word_embeddings.load_state_dict(
              state_dict[self._word_embeddings_for_head_key],
              strict=strict,
          )
      if self._language_model_key in state_dict:
          state_dict = state_dict[self._language_model_key]
      self.language_model.load_state_dict(state_dict, strict=strict)
  
file_path: NeMo/nemo/collections/nlp/models/language_modeling/megatron/gpt_model.py
imports: import torch
  from nemo.collections.nlp.modules.common.megatron.language_model import get_language_model
  from nemo.collections.nlp.modules.common.megatron.module import MegatronModule
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults, init_method_normal, parallel_lm_logits, scaled_init_method_normal
label_desc: Use image node_id 5 for calling the GPTModel obj's underlying member method code with example usage: obj.load_state_dict(state_dict, strict) without return types