code: def test_mp2_gpu4_node1_zero2_torch_offload(self):
      test_config = {
          "mp": 2,
          "gpus": 4,
          "nodes": 1,
          "bs": 8,
          "steps": 1000,
          "layers": LAYERS,
          "hidden_size": HIDDEN_SIZE,
          "seq_length": SEQ_LEN,
          "heads": ATTN_HEADS,
          "deepspeed": False,
          "json": "ds_config_func_bs8_zero2_offload.json",
          "cpu_optimizer": True,
          "test_torch_offload": True,
      }
  
      basic_run_config = test_config
      succ = self.run_test(basic_run_config, 0.01)
      self.assertTrue(succ)
  
      partition_activation_config = test_config
      succ = self.run_partition_activations_test(
          partition_activation_config, 0.01
      )
      self.assertTrue(succ)
  
imports: import unittest
  import os
  import re
  from .test_common import BaseTestCase
label_desc: Use image node_id 20 for calling the GPT2FuncTestCase obj's underlying member method code with example usage: obj.test_mp2_gpu4_node1_zero2_torch_offload() without return types