code: def test_inference_no_head(self):
      model = LiltModel.from_pretrained(
          "SCUT-DLVCLab/lilt-roberta-en-base"
      ).to(torch_device)
  
      input_ids = torch.tensor([[1, 2]], device=torch_device)
      bbox = torch.tensor(
          [[[1, 2, 3, 4], [5, 6, 7, 8]]], device=torch_device
      )
  
      # forward pass
      with torch.no_grad():
          outputs = model(input_ids=input_ids, bbox=bbox)
  
      expected_shape = torch.Size([1, 2, 768])
      expected_slice = torch.tensor(
          [[-0.0653, 0.0950, -0.0061], [-0.0545, 0.0926, -0.0324]],
          device=torch_device,
      )
  
      self.assertTrue(outputs.last_hidden_state.shape, expected_shape)
      self.assertTrue(
          torch.allclose(
              outputs.last_hidden_state[0, :, :3],
              expected_slice,
              atol=1e-3,
          )
      )
  
imports: import unittest
  from transformers import LiltConfig, is_torch_available
  from transformers.testing_utils import require_torch, slow, torch_device
  from ...generation.test_generation_utils import GenerationTesterMixin
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor
label_desc: Use image node_id 1 for calling the LiltModelIntegrationTest obj's underlying member method code with example usage: obj.test_inference_no_head() without return types