





'''simple docstring'''




import unittest

from transformers import LiltConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
  import torch

  from transformers import (
      LiltForQuestionAnswering,
      LiltForSequenceClassification,
      LiltForTokenClassification,
      LiltModel,
  )
  from transformers.models.lilt.modeling_lilt import LILT_PRETRAINED_MODEL_ARCHIVE_LIST







class   A_	:




 def __init__(					self       :    int	,			snake_case_       :    str	,			snake_case_       :    Any=1_3	,			snake_case_       :    Dict=7	,			snake_case_       :    str=True	,			snake_case_       :    Optional[int]=True	,			snake_case_       :    Union[str, Any]=True	,			snake_case_       :    Union[str, Any]=True	,			snake_case_       :    Union[str, Any]=9_9	,			snake_case_       :    List[str]=2_4	,			snake_case_       :    Dict=2	,			snake_case_       :    int=6	,			snake_case_       :    Optional[int]=3_7	,			snake_case_       :    Any="gelu"	,			snake_case_       :    str=0.1	,			snake_case_       :    Optional[int]=0.1	,			snake_case_       :    Union[str, Any]=5_1_2	,			snake_case_       :    Union[str, Any]=1_6	,			snake_case_       :    List[str]=2	,			snake_case_       :    str=0.0_2	,			snake_case_       :    int=3	,			snake_case_       :    List[str]=None	,			snake_case_       :    Optional[Any]=1_0_0_0	,			):
      _UpperCAmelCase     							=   parent
      _UpperCAmelCase     							=   batch_size
      _UpperCAmelCase     							=   seq_length
      _UpperCAmelCase     							=   is_training
      _UpperCAmelCase     							=   use_input_mask
      _UpperCAmelCase     							=   use_token_type_ids
      _UpperCAmelCase     							=   use_labels
      _UpperCAmelCase     							=   vocab_size
      _UpperCAmelCase     							=   hidden_size
      _UpperCAmelCase     							=   num_hidden_layers
      _UpperCAmelCase     							=   num_attention_heads
      _UpperCAmelCase     							=   intermediate_size
      _UpperCAmelCase     							=   hidden_act
      _UpperCAmelCase     							=   hidden_dropout_prob
      _UpperCAmelCase     							=   attention_probs_dropout_prob
      _UpperCAmelCase     							=   max_position_embeddings
      _UpperCAmelCase     							=   type_vocab_size
      _UpperCAmelCase     							=   type_sequence_label_size
      _UpperCAmelCase     							=   initializer_range
      _UpperCAmelCase     							=   num_labels
      _UpperCAmelCase     							=   scope
      _UpperCAmelCase     							=   range_bbox




 def      lowercase	(					self       :    Dict    ):
      _UpperCAmelCase     							=   ids_tensor([self.batch_size, self.seq_length]	,			self.vocab_size    )

      _UpperCAmelCase     							=   ids_tensor([self.batch_size, self.seq_length, 4]	,			self.range_bbox    )
      # Ensure that bbox is legal
      for i in range(bbox.shape[0]    ):
           for j in range(bbox.shape[1]    ):
                if bbox[i, j, 3] < bbox[i, j, 1]:
                     _UpperCAmelCase     							=   bbox[i, j, 3]
                     _UpperCAmelCase     							=   bbox[i, j, 1]
                     _UpperCAmelCase     							=   t
                if bbox[i, j, 2] < bbox[i, j, 0]:
                     _UpperCAmelCase     							=   bbox[i, j, 2]
                     _UpperCAmelCase     							=   bbox[i, j, 0]
                     _UpperCAmelCase     							=   t

      _UpperCAmelCase     							=   None
      if self.use_input_mask:
           _UpperCAmelCase     							=   ids_tensor([self.batch_size, self.seq_length]	,			vocab_size=2    )

      _UpperCAmelCase     							=   None
      if self.use_token_type_ids:
           _UpperCAmelCase     							=   ids_tensor([self.batch_size, self.seq_length]	,			self.type_vocab_size    )

      _UpperCAmelCase     							=   None
      _UpperCAmelCase     							=   None
      if self.use_labels:
           _UpperCAmelCase     							=   ids_tensor([self.batch_size]	,			self.type_sequence_label_size    )
           _UpperCAmelCase     							=   ids_tensor([self.batch_size, self.seq_length]	,			self.num_labels    )

      _UpperCAmelCase     							=   self.get_config()

      return config, input_ids, bbox, token_type_ids, input_mask, sequence_labels, token_labels




 def      lowercase	(					self       :    int    ):
      return LiltConfig(
          vocab_size=self.vocab_size	,			hidden_size=self.hidden_size	,			num_hidden_layers=self.num_hidden_layers	,			num_attention_heads=self.num_attention_heads	,			intermediate_size=self.intermediate_size	,			hidden_act=self.hidden_act	,			hidden_dropout_prob=self.hidden_dropout_prob	,			attention_probs_dropout_prob=self.attention_probs_dropout_prob	,			max_position_embeddings=self.max_position_embeddings	,			type_vocab_size=self.type_vocab_size	,			initializer_range=self.initializer_range	,			)




 def      lowercase	(					self       :    Optional[int]	,			snake_case_       :    Any	,			snake_case_       :    Dict	,			snake_case_       :    Tuple	,			snake_case_       :    Optional[Any]	,			snake_case_       :    Optional[int]	,			snake_case_       :    Dict	,			snake_case_       :    Dict	,			):
      _UpperCAmelCase     							=   LiltModel(config=snake_case_    )
      model.to(snake_case_    )
      model.eval()
      _UpperCAmelCase     							=   model(snake_case_	,			bbox=snake_case_	,			attention_mask=snake_case_	,			token_type_ids=snake_case_    )
      _UpperCAmelCase     							=   model(snake_case_	,			bbox=snake_case_	,			token_type_ids=snake_case_    )
      _UpperCAmelCase     							=   model(snake_case_	,			bbox=snake_case_    )

      self.parent.assertEqual(result.last_hidden_state.shape	,			(self.batch_size, self.seq_length, self.hidden_size)    )
      self.parent.assertEqual(result.pooler_output.shape	,			(self.batch_size, self.hidden_size)    )




 def      lowercase	(					self       :    int	,			snake_case_       :    List[Any]	,			snake_case_       :    int	,			snake_case_       :    Tuple	,			snake_case_       :    Tuple	,			snake_case_       :    Dict	,			snake_case_       :    Optional[int]	,			snake_case_       :    List[str]	,			):
      _UpperCAmelCase     							=   self.num_labels
      _UpperCAmelCase     							=   LiltForTokenClassification(config=snake_case_    )
      model.to(snake_case_    )
      model.eval()
      _UpperCAmelCase     							=   model(
          snake_case_	,			bbox=snake_case_	,			attention_mask=snake_case_	,			token_type_ids=snake_case_	,			labels=snake_case_    )
      self.parent.assertEqual(result.logits.shape	,			(self.batch_size, self.seq_length, self.num_labels)    )




 def      lowercase	(					self       :    List[Any]	,			snake_case_       :    Tuple	,			snake_case_       :    str	,			snake_case_       :    Dict	,			snake_case_       :    Optional[Any]	,			snake_case_       :    Union[str, Any]	,			snake_case_       :    Any	,			snake_case_       :    str	,			):
      _UpperCAmelCase     							=   LiltForQuestionAnswering(config=snake_case_    )
      model.to(snake_case_    )
      model.eval()
      _UpperCAmelCase     							=   model(
          snake_case_	,			bbox=snake_case_	,			attention_mask=snake_case_	,			token_type_ids=snake_case_	,			start_positions=snake_case_	,			end_positions=snake_case_	,			)
      self.parent.assertEqual(result.start_logits.shape	,			(self.batch_size, self.seq_length)    )
      self.parent.assertEqual(result.end_logits.shape	,			(self.batch_size, self.seq_length)    )




 def      lowercase	(					self       :    int    ):
      _UpperCAmelCase     							=   self.prepare_config_and_inputs()
      (
          (
          _UpperCAmelCase
      )							,  (
          _UpperCAmelCase
      )							,  (
          _UpperCAmelCase
      )							,  (
          _UpperCAmelCase
      )							,  (
          _UpperCAmelCase
      )							,  (
          _UpperCAmelCase
      )							,  (
          _UpperCAmelCase
      )							,  
      )     							=   config_and_inputs
      _UpperCAmelCase     							=   {
          "input_ids": input_ids,
          "bbox": bbox,
          "token_type_ids": token_type_ids,
          "attention_mask": input_mask,
      }
      return config, inputs_dict







@require_torch
class   A_	(  lowerCAmelCase_							,						lowerCAmelCase_							,						lowerCAmelCase_							,						unittest.TestCase			):
 _lowerCamelCase  : str           =							(
     (
         LiltModel,
         LiltForSequenceClassification,
         LiltForTokenClassification,
         LiltForQuestionAnswering,
     )
     if is_torch_available()
     else ()
 )
 _lowerCamelCase  : Dict           =							(
     {
         """feature-extraction""": LiltModel,
         """question-answering""": LiltForQuestionAnswering,
         """text-classification""": LiltForSequenceClassification,
         """token-classification""": LiltForTokenClassification,
         """zero-shot""": LiltForSequenceClassification,
     }
     if is_torch_available()
     else {}
 )
 _lowerCamelCase  : Union[str, Any]           =							False
 _lowerCamelCase  : Optional[Any]           =							False




 def      lowercase	(					self       :    List[Any]	,			snake_case_       :    str	,			snake_case_       :    str	,			snake_case_       :    Dict	,			snake_case_       :    Any	,			snake_case_       :    Any    ):
      return True




 def      lowercase	(					self       :    Tuple    ):
      _UpperCAmelCase     							=   LiltModelTester(self    )
      _UpperCAmelCase     							=   ConfigTester(self	,			config_class=snake_case_	,			hidden_size=3_7    )




 def      lowercase	(					self       :    Optional[Any]    ):
      self.config_tester.run_common_tests()




 def      lowercase	(					self       :    Any    ):
      _UpperCAmelCase     							=   self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_model(*snake_case_    )




 def      lowercase	(					self       :    Union[str, Any]    ):
      _UpperCAmelCase     							=   self.model_tester.prepare_config_and_inputs()
      for type in ["absolute", "relative_key", "relative_key_query"]:
           _UpperCAmelCase     							=   type
           self.model_tester.create_and_check_model(*snake_case_    )




 def      lowercase	(					self       :    Union[str, Any]    ):
      _UpperCAmelCase     							=   self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_for_token_classification(*snake_case_    )




 def      lowercase	(					self       :    Tuple    ):
      _UpperCAmelCase     							=   self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_for_question_answering(*snake_case_    )




 @slow
 def      lowercase	(					self       :    Tuple    ):
      for model_name in LILT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
           _UpperCAmelCase     							=   LiltModel.from_pretrained(snake_case_    )
           self.assertIsNotNone(snake_case_    )







@require_torch
@slow
class   A_	(  unittest.TestCase			):




 def      lowercase	(					self       :    Tuple    ):
      _UpperCAmelCase     							=   LiltModel.from_pretrained("SCUT-DLVCLab/lilt-roberta-en-base"    ).to(snake_case_    )

      _UpperCAmelCase     							=   torch.tensor([[1, 2]]	,			device=snake_case_    )
      _UpperCAmelCase     							=   torch.tensor([[[1, 2, 3, 4], [5, 6, 7, 8]]]	,			device=snake_case_    )

      # forward pass
      with torch.no_grad():
           _UpperCAmelCase     							=   model(input_ids=snake_case_	,			bbox=snake_case_    )

      _UpperCAmelCase     							=   torch.Size([1, 2, 7_6_8]    )
      _UpperCAmelCase     							=   torch.tensor(
          [[-0.0_6_5_3, 0.0_9_5_0, -0.0_0_6_1], [-0.0_5_4_5, 0.0_9_2_6, -0.0_3_2_4]]	,			device=snake_case_	,			)

      self.assertTrue(outputs.last_hidden_state.shape	,			snake_case_    )
      self.assertTrue(torch.allclose(outputs.last_hidden_state[0, :, :3]	,			snake_case_	,			atol=1e-3    )    )












import copy
import os
from collections import OrderedDict
from typing import TYPE_CHECKING, Any, Dict, Mapping, Optional, Union


if TYPE_CHECKING:
 from ...processing_utils import ProcessorMixin
 from ...utils import TensorType

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowerCamelCase	:							Optional[Any]				=logging.get_logger(__name__)

lowerCamelCase	:							Optional[int]				={
    '''google/owlvit-base-patch32''': '''https://huggingface.co/google/owlvit-base-patch32/resolve/main/config.json''',
    '''google/owlvit-base-patch16''': '''https://huggingface.co/google/owlvit-base-patch16/resolve/main/config.json''',
    '''google/owlvit-large-patch14''': '''https://huggingface.co/google/owlvit-large-patch14/resolve/main/config.json''',
}





class 			__a  (    A__       ):
 _lowerCAmelCase       :       Optional[int]        = '''owlvit_text_model'''







 def __init__(		self					:   Any							,   SCREAMING_SNAKE_CASE					:   Union[str, Any]=4_94_08							,   SCREAMING_SNAKE_CASE					:   List[str]=5_12							,   SCREAMING_SNAKE_CASE					:   List[Any]=20_48							,   SCREAMING_SNAKE_CASE					:   Any=12							,   SCREAMING_SNAKE_CASE					:   Any=8							,   SCREAMING_SNAKE_CASE					:   Dict=16							,   SCREAMING_SNAKE_CASE					:   Union[str, Any]="quick_gelu"							,   SCREAMING_SNAKE_CASE					:   List[str]=1e-5							,   SCREAMING_SNAKE_CASE					:   Union[str, Any]=0.0							,   SCREAMING_SNAKE_CASE					:   Any=0.0_2							,   SCREAMING_SNAKE_CASE					:   int=1.0							,   SCREAMING_SNAKE_CASE					:   Any=0							,   SCREAMING_SNAKE_CASE					:   int=4_94_06							,   SCREAMING_SNAKE_CASE					:   List[str]=4_94_07							,   **SCREAMING_SNAKE_CASE					:   Optional[Any]							,   ):


      '''simple docstring'''






      super().__init__(pad_token_id=SCREAMING_SNAKE_CASE							,   bos_token_id=SCREAMING_SNAKE_CASE							,   eos_token_id=SCREAMING_SNAKE_CASE							,   **SCREAMING_SNAKE_CASE						)

      UpperCamelCase__			:   Tuple       				=  vocab_size
      UpperCamelCase__			:   int       				=  hidden_size
      UpperCamelCase__			:   List[str]       				=  intermediate_size
      UpperCamelCase__			:   Tuple       				=  num_hidden_layers
      UpperCamelCase__			:   str       				=  num_attention_heads
      UpperCamelCase__			:   Any       				=  max_position_embeddings
      UpperCamelCase__			:   List[Any]       				=  hidden_act
      UpperCamelCase__			:   str       				=  layer_norm_eps
      UpperCamelCase__			:   List[Any]       				=  attention_dropout
      UpperCamelCase__			:   Tuple       				=  initializer_range
      UpperCamelCase__			:   Optional[Any]       				=  initializer_factor







 @classmethod
 def 					__lowercase					(		cls					:   Optional[int]							,   SCREAMING_SNAKE_CASE					:   Union[str, os.PathLike]							,   **SCREAMING_SNAKE_CASE					:   Optional[Any]						):


      '''simple docstring'''






      cls._set_token_in_kwargs(SCREAMING_SNAKE_CASE						)

      UpperCamelCase__				,     UpperCamelCase__			:   Any       				=  cls.get_config_dict(SCREAMING_SNAKE_CASE							,   **SCREAMING_SNAKE_CASE						)

      # get the text config dict if we are loading from OwlViTConfig
      if config_dict.get("model_type"						) == "owlvit":
           UpperCamelCase__			:   Dict       				=  config_dict["text_config"]

      if "model_type" in config_dict and hasattr(cls							,   "model_type"						) and config_dict["model_type"] != cls.model_type:
           logger.warning(
               F'You are using a model of type {config_dict["model_type"]} to instantiate a model of type '
               F'{cls.model_type}. This is not supported for all configurations of models and can yield errors.'						)

      return cls.from_dict(SCREAMING_SNAKE_CASE							,   **SCREAMING_SNAKE_CASE						)







class 			__a  (    A__       ):
 _lowerCAmelCase       :       str        = '''owlvit_vision_model'''







 def __init__(		self					:   Optional[int]							,   SCREAMING_SNAKE_CASE					:   str=7_68							,   SCREAMING_SNAKE_CASE					:   Dict=30_72							,   SCREAMING_SNAKE_CASE					:   int=12							,   SCREAMING_SNAKE_CASE					:   Union[str, Any]=12							,   SCREAMING_SNAKE_CASE					:   Dict=3							,   SCREAMING_SNAKE_CASE					:   Union[str, Any]=7_68							,   SCREAMING_SNAKE_CASE					:   Optional[int]=32							,   SCREAMING_SNAKE_CASE					:   Dict="quick_gelu"							,   SCREAMING_SNAKE_CASE					:   Optional[Any]=1e-5							,   SCREAMING_SNAKE_CASE					:   List[str]=0.0							,   SCREAMING_SNAKE_CASE					:   Dict=0.0_2							,   SCREAMING_SNAKE_CASE					:   Optional[int]=1.0							,   **SCREAMING_SNAKE_CASE					:   Tuple							,   ):


      '''simple docstring'''






      super().__init__(**SCREAMING_SNAKE_CASE						)

      UpperCamelCase__			:   Any       				=  hidden_size
      UpperCamelCase__			:   str       				=  intermediate_size
      UpperCamelCase__			:   Any       				=  num_hidden_layers
      UpperCamelCase__			:   str       				=  num_attention_heads
      UpperCamelCase__			:   int       				=  num_channels
      UpperCamelCase__			:   Union[str, Any]       				=  image_size
      UpperCamelCase__			:   List[Any]       				=  patch_size
      UpperCamelCase__			:   Tuple       				=  hidden_act
      UpperCamelCase__			:   Optional[int]       				=  layer_norm_eps
      UpperCamelCase__			:   Optional[Any]       				=  attention_dropout
      UpperCamelCase__			:   Dict       				=  initializer_range
      UpperCamelCase__			:   int       				=  initializer_factor







 @classmethod
 def 					__lowercase					(		cls					:   Dict							,   SCREAMING_SNAKE_CASE					:   Union[str, os.PathLike]							,   **SCREAMING_SNAKE_CASE					:   List[Any]						):


      '''simple docstring'''






      cls._set_token_in_kwargs(SCREAMING_SNAKE_CASE						)

      UpperCamelCase__				,     UpperCamelCase__			:   List[Any]       				=  cls.get_config_dict(SCREAMING_SNAKE_CASE							,   **SCREAMING_SNAKE_CASE						)

      # get the vision config dict if we are loading from OwlViTConfig
      if config_dict.get("model_type"						) == "owlvit":
           UpperCamelCase__			:   List[str]       				=  config_dict["vision_config"]

      if "model_type" in config_dict and hasattr(cls							,   "model_type"						) and config_dict["model_type"] != cls.model_type:
           logger.warning(
               F'You are using a model of type {config_dict["model_type"]} to instantiate a model of type '
               F'{cls.model_type}. This is not supported for all configurations of models and can yield errors.'						)

      return cls.from_dict(SCREAMING_SNAKE_CASE							,   **SCREAMING_SNAKE_CASE						)







class 			__a  (    A__       ):
 _lowerCAmelCase       :       str        = '''owlvit'''
 _lowerCAmelCase       :       Tuple        = True







 def __init__(		self					:   Any							,   SCREAMING_SNAKE_CASE					:   Optional[Any]=None							,   SCREAMING_SNAKE_CASE					:   int=None							,   SCREAMING_SNAKE_CASE					:   str=5_12							,   SCREAMING_SNAKE_CASE					:   Any=2.6_5_9_2							,   SCREAMING_SNAKE_CASE					:   Union[str, Any]=True							,   **SCREAMING_SNAKE_CASE					:   List[Any]							,   ):


      '''simple docstring'''






      super().__init__(**SCREAMING_SNAKE_CASE						)

      if text_config is None:
           UpperCamelCase__			:   str       				=  {}
           logger.info("text_config is None. Initializing the OwlViTTextConfig with default values."						)

      if vision_config is None:
           UpperCamelCase__			:   List[str]       				=  {}
           logger.info("vision_config is None. initializing the OwlViTVisionConfig with default values."						)

      UpperCamelCase__			:   Dict       				=  OwlViTTextConfig(**SCREAMING_SNAKE_CASE						)
      UpperCamelCase__			:   Dict       				=  OwlViTVisionConfig(**SCREAMING_SNAKE_CASE						)

      UpperCamelCase__			:   Dict       				=  projection_dim
      UpperCamelCase__			:   Union[str, Any]       				=  logit_scale_init_value
      UpperCamelCase__			:   int       				=  return_dict
      UpperCamelCase__			:   Tuple       				=  1.0







 @classmethod
 def 					__lowercase					(		cls					:   Any							,   SCREAMING_SNAKE_CASE					:   Union[str, os.PathLike]							,   **SCREAMING_SNAKE_CASE					:   Dict						):


      '''simple docstring'''






      cls._set_token_in_kwargs(SCREAMING_SNAKE_CASE						)

      UpperCamelCase__				,     UpperCamelCase__			:   Dict       				=  cls.get_config_dict(SCREAMING_SNAKE_CASE							,   **SCREAMING_SNAKE_CASE						)

      if "model_type" in config_dict and hasattr(cls							,   "model_type"						) and config_dict["model_type"] != cls.model_type:
           logger.warning(
               F'You are using a model of type {config_dict["model_type"]} to instantiate a model of type '
               F'{cls.model_type}. This is not supported for all configurations of models and can yield errors.'						)

      return cls.from_dict(SCREAMING_SNAKE_CASE							,   **SCREAMING_SNAKE_CASE						)







 @classmethod
 def 					__lowercase					(		cls					:   int							,   SCREAMING_SNAKE_CASE					:   Dict							,   SCREAMING_SNAKE_CASE					:   Dict							,   **SCREAMING_SNAKE_CASE					:   Optional[int]						):


      '''simple docstring'''






      UpperCamelCase__			:   List[Any]       				=  {}
      UpperCamelCase__			:   Union[str, Any]       				=  text_config
      UpperCamelCase__			:   Optional[int]       				=  vision_config

      return cls.from_dict(SCREAMING_SNAKE_CASE							,   **SCREAMING_SNAKE_CASE						)







 def 					__lowercase					(		self					:   Tuple						):


      '''simple docstring'''






      UpperCamelCase__			:   Optional[int]       				=  copy.deepcopy(self.__dict__						)
      UpperCamelCase__			:   Union[str, Any]       				=  self.text_config.to_dict()
      UpperCamelCase__			:   List[str]       				=  self.vision_config.to_dict()
      UpperCamelCase__			:   Optional[int]       				=  self.__class__.model_type
      return output







class 			__a  (    A__       ):







 @property
 def 					__lowercase					(		self					:   Any						):


      '''simple docstring'''






      return OrderedDict(
          [
              ("input_ids", {0: "batch", 1: "sequence"}),
              ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
              ("attention_mask", {0: "batch", 1: "sequence"}),
          ]						)







 @property
 def 					__lowercase					(		self					:   Optional[int]						):


      '''simple docstring'''






      return OrderedDict(
          [
              ("logits_per_image", {0: "batch"}),
              ("logits_per_text", {0: "batch"}),
              ("text_embeds", {0: "batch"}),
              ("image_embeds", {0: "batch"}),
          ]						)







 @property
 def 					__lowercase					(		self					:   Dict						):


      '''simple docstring'''






      return 1e-4







 def 					__lowercase					(		self					:   Optional[int]							,   SCREAMING_SNAKE_CASE					:   "ProcessorMixin"							,   SCREAMING_SNAKE_CASE					:   int = -1							,   SCREAMING_SNAKE_CASE					:   int = -1							,   SCREAMING_SNAKE_CASE					:   Optional["TensorType"] = None							,   ):


      '''simple docstring'''






      UpperCamelCase__			:   Optional[int]       				=  super().generate_dummy_inputs(
          processor.tokenizer							,   batch_size=SCREAMING_SNAKE_CASE							,   seq_length=SCREAMING_SNAKE_CASE							,   framework=SCREAMING_SNAKE_CASE						)
      UpperCamelCase__			:   List[str]       				=  super().generate_dummy_inputs(
          processor.image_processor							,   batch_size=SCREAMING_SNAKE_CASE							,   framework=SCREAMING_SNAKE_CASE						)
      return {**text_input_dict, **image_input_dict}







 @property
 def 					__lowercase					(		self					:   Tuple						):


      '''simple docstring'''






      return 14