code: def test_gpt2_basic(self, tmpdir, inputs):
      args_defaults = {
          "num_layers": 2,
          "hidden_size": 128,
          "num_attention_heads": 8,
          "max_position_embeddings": 128,
      }
  
      model = get_gpt2_model(args_defaults)
      model = get_deepspeed_model(model)
  
      model.eval()
      device_name = get_accelerator().device_name()
      baseline = model(
          inputs[0].to(device_name),
          inputs[1].to(device_name),
          inputs[2].to(device_name),
      )
  
      tag = "mp_1"
      state_dict = {}
      state_dict["checkpoint_version"] = get_megatron_version()
      model.save_checkpoint(tmpdir, tag=tag, client_state=state_dict)
      dist.barrier()
      model.load_checkpoint(
          tmpdir,
          tag=tag,
          load_optimizer_states=False,
          load_lr_scheduler_states=False,
      )
  
      test = model(inputs[0], inputs[1], inputs[2])
      assert torch.allclose(
          baseline, test, atol=1e-07
      ), f"Baseline output {baseline} is not equal to save-then-load output {test}"
  
imports: import os
  import torch
  import deepspeed
  import pytest
  import random
  import numpy
  import deepspeed.comm
  from deepspeed.accelerator import get_accelerator
  from unit.common import DistributedTest, DistributedFixture
  from unit.megatron_model import get_gpt2_model, get_megatron_version
  from deepspeed.runtime.utils import required_torch_version
label_desc: Use image node_id 1 for calling the TestConfigurableMP obj's underlying member method code with example usage: obj.test_gpt2_basic(tmpdir, inputs) without return types