code: def test_ntg_hidden_states(self):
      model = XLMProphetNetForConditionalGeneration.from_pretrained(
          "microsoft/xprophetnet-large-wiki100-cased-xglue-ntg"
      )
      model.to(torch_device)
  
      encoder_ids = torch.tensor([[17, 96208, 103471, 2]]).to(
          torch_device
      )
      decoder_prev_ids = torch.tensor(
          [
              [
                  2,
                  250,
                  9953,
                  34,
                  69489,
                  1620,
                  32,
                  118424,
                  624,
                  210,
                  105,
                  2913,
                  1032,
                  351,
              ]
          ]
      ).to(torch_device)
      output = model(
          input_ids=encoder_ids,
          attention_mask=None,
          encoder_outputs=None,
          decoder_input_ids=decoder_prev_ids,
      )
      output_predited_logis = output[0]
      expected_shape = torch.Size((1, 14, 250012))
      self.assertEqual(output_predited_logis.shape, expected_shape)
      # compare the actual values for a slice.
      expected_slice = torch.tensor(
          [
              [
                  [-8.8815, -9.2996, -4.4506],
                  [-6.7202, -7.8944, -0.9402],
                  [-8.6890, -7.4528, -1.9437],
              ]
          ]
      ).to(torch_device)
  
      self.assertTrue(
          torch.allclose(
              output_predited_logis[:, :3, :3],
              expected_slice,
              atol=1e-4,
          )
      )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/models/xlm_prophetnet/test_modeling_xlm_prophetnet.py
imports: import unittest
  from transformers import is_torch_available
  from transformers.testing_utils import require_torch, slow, torch_device
label_desc: Use image node_id 2 for calling the XLMProphetNetModelIntegrationTest obj's underlying member method code with example usage: obj.test_ntg_hidden_states() without return types