code: def test_model_phi_1_logits(self):
      input_ids = {
          "input_ids": torch.tensor(
              [[1212, 318, 281, 1672, 2643, 290, 428, 318, 257, 1332]],
              dtype=torch.long,
              device=torch_device,
          )
      }
  
      model = PhiForCausalLM.from_pretrained("microsoft/phi-1").to(
          torch_device
      )
      model.eval()
  
      output = model(**input_ids).logits
  
      EXPECTED_OUTPUT = torch.tensor([[2.2671,  6.7684, -2.0107, -1.2440, -1.5335, -2.3828,  6.9186,  6.4245, 3.1548,  0.9998,  0.0760,  4.4653,  4.9857,  4.2956,  1.2308, -1.4178, 0.1361,  0.5191, -0.5699, -2.2201, -3.0750, -3.9600, -4.5936, -3.7394, -2.7777,  6.1874, -0.4148, -1.5684, -0.5967,  0.2395], [1.7004,  4.0383,  0.0546,  0.4530, -0.3619, -0.9021,  1.8355,  1.3587, 1.2406,  2.5775, -0.8834,  5.1910,  4.2565,  4.1406,  3.0752, -0.9099, 1.1595,  0.0264,  0.3243, -1.1803, -1.3945, -2.1406, -3.9939, -1.4438, -2.9546,  3.9204,  1.0851, -1.0598, -1.7819, -0.4827]]).to(torch_device)  # fmt: skip
  
      self.assertTrue(
          torch.allclose(
              EXPECTED_OUTPUT, output[0, :2, :30], atol=1e-4, rtol=1e-4
          )
      )
  
imports: import unittest
  import pytest
  from transformers import PhiConfig, is_torch_available
  from transformers.testing_utils import require_bitsandbytes, require_flash_attn, require_torch, require_torch_gpu, slow, torch_device
  from ...generation.test_utils import GenerationTesterMixin
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 1 for calling the PhiIntegrationTest obj's underlying member method code with example usage: obj.test_model_phi_1_logits() without return types