code: def gpt_model_provider(
      pre_process: bool = True,
      post_process: bool = True,
      cpu_offload: bool = False,
  ) -> "GPTModel":
      args = get_args()
      model = GPTModel(
          num_tokentypes=0,
          parallel_output=True,
          pre_process=pre_process,
          post_process=post_process,
          cpu_offload=args.cpu_offload,
      )
      return model
  
file_path: apex/apex/transformer/testing/standalone_gpt.py
imports: import contextlib
  import torch
  from apex.transformer.enums import AttnMaskType
  from apex.transformer.enums import ModelType
  from apex.transformer import tensor_parallel
  from apex.transformer.testing.global_vars import get_args
  from apex.transformer.testing.standalone_transformer_lm import MegatronModule
  from apex.transformer.testing.standalone_transformer_lm import parallel_lm_logits
  from apex.transformer.testing.standalone_transformer_lm import post_language_model_processing
  from apex.transformer.testing.standalone_transformer_lm import get_language_model
  from apex.transformer.testing.standalone_transformer_lm import init_method_normal
  from apex.transformer.testing.standalone_transformer_lm import scaled_init_method_normal
label_desc: Use image node_id 1 for calling a global function with example usage: gpt_model_provider(pre_process, post_process, cpu_offload) and returns: model