


'''simple docstring'''







from __future__ import annotations

import unittest

from transformers import FunnelConfig, is_tf_available
from transformers.testing_utils import require_tf

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
   import tensorflow as tf

   from transformers import (
       TFFunnelBaseModel,
       TFFunnelForMaskedLM,
       TFFunnelForMultipleChoice,
       TFFunnelForPreTraining,
       TFFunnelForQuestionAnswering,
       TFFunnelForSequenceClassification,
       TFFunnelForTokenClassification,
       TFFunnelModel,
   )







class A__       :






      def __init__( self			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:int=1_3     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]=7     ,						SCREAMING_SNAKE_CASE			:Tuple=True     ,						SCREAMING_SNAKE_CASE			:Tuple=True     ,						SCREAMING_SNAKE_CASE			:List[str]=True     ,						SCREAMING_SNAKE_CASE			:Tuple=True     ,						SCREAMING_SNAKE_CASE			:Optional[Any]=9_9     ,						SCREAMING_SNAKE_CASE			:str=[1, 1, 2]     ,						SCREAMING_SNAKE_CASE			:List[Any]=1     ,						SCREAMING_SNAKE_CASE			:Optional[int]=3_2     ,						SCREAMING_SNAKE_CASE			:int=4     ,						SCREAMING_SNAKE_CASE			:str=8     ,						SCREAMING_SNAKE_CASE			:str=3_7     ,						SCREAMING_SNAKE_CASE			:Any="gelu_new"     ,						SCREAMING_SNAKE_CASE			:Optional[Any]=0.1     ,						SCREAMING_SNAKE_CASE			:Any=0.1     ,						SCREAMING_SNAKE_CASE			:Dict=0.0     ,						SCREAMING_SNAKE_CASE			:Optional[Any]=5_1_2     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]=3     ,						SCREAMING_SNAKE_CASE			:List[str]=0.02     ,						SCREAMING_SNAKE_CASE			:Tuple=3     ,						SCREAMING_SNAKE_CASE			:List[Any]=4     ,						SCREAMING_SNAKE_CASE			:str=None     ,						SCREAMING_SNAKE_CASE			:Optional[Any]=False     ,						)       ->					str:




             '''simple docstring'''
             _a    : int     					=parent
             _a    : List[Any]     					=batch_size
             _a    : str     					=seq_length
             _a    : Union[str, Any]     					=is_training
             _a    : Union[str, Any]     					=use_input_mask
             _a    : Tuple     					=use_token_type_ids
             _a    : Union[str, Any]     					=use_labels
             _a    : str     					=vocab_size
             _a    : int     					=block_sizes
             _a    : Dict     					=num_decoder_layers
             _a    : List[str]     					=d_model
             _a    : str     					=n_head
             _a    : List[str]     					=d_head
             _a    : Tuple     					=d_inner
             _a    : Tuple     					=hidden_act
             _a    : Optional[Any]     					=hidden_dropout
             _a    : int     					=attention_dropout
             _a    : Any     					=activation_dropout
             _a    : Any     					=max_position_embeddings
             _a    : Union[str, Any]     					=type_vocab_size
             _a    : Tuple     					=2
             _a    : Optional[Any]     					=num_labels
             _a    : List[str]     					=num_choices
             _a    : List[str]     					=scope
             _a    : Tuple     					=initializer_std

             # Used in the tests to check the size of the first attention layer
             _a    : str     					=n_head
             # Used in the tests to check the size of the first hidden state
             _a    : List[str]     					=self.d_model
             # Used in the tests to check the number of output hidden states/attentions
             _a    : Dict     					=sum(self.block_sizes	) + (0 if base else self.num_decoder_layers)
             # FunnelModel adds two hidden layers: input embeddings and the sum of the upsampled encoder hidden state with
             # the last hidden state of the first block (which is the first hidden state of the decoder).
             if not base:
                    _a    : Tuple     					=self.num_hidden_layers + 2






      def __UpperCAmelCase       ( self			:Tuple	)       ->					Any:




             '''simple docstring'''
             _a    : str     					=ids_tensor([self.batch_size, self.seq_length]     ,						self.vocab_size	)

             _a    : List[Any]     					=None
             if self.use_input_mask:
                    _a    : Optional[int]     					=random_attention_mask([self.batch_size, self.seq_length]	)

             _a    : Union[str, Any]     					=None
             if self.use_token_type_ids:
                    _a    : List[str]     					=ids_tensor([self.batch_size, self.seq_length]     ,						self.type_vocab_size	)

             _a    : str     					=None
             _a    : Dict     					=None
             _a    : List[str]     					=None
             if self.use_labels:
                    _a    : List[Any]     					=ids_tensor([self.batch_size]     ,						self.type_sequence_label_size	)
                    _a    : Optional[int]     					=ids_tensor([self.batch_size, self.seq_length]     ,						self.num_labels	)
                    _a    : List[Any]     					=ids_tensor([self.batch_size]     ,						self.num_choices	)

             _a    : Dict     					=FunnelConfig(
                 vocab_size=self.vocab_size     ,						block_sizes=self.block_sizes     ,						num_decoder_layers=self.num_decoder_layers     ,						d_model=self.d_model     ,						n_head=self.n_head     ,						d_head=self.d_head     ,						d_inner=self.d_inner     ,						hidden_act=self.hidden_act     ,						hidden_dropout=self.hidden_dropout     ,						attention_dropout=self.attention_dropout     ,						activation_dropout=self.activation_dropout     ,						max_position_embeddings=self.max_position_embeddings     ,						type_vocab_size=self.type_vocab_size     ,						initializer_std=self.initializer_std     ,						)

             return (
                 config,
                 input_ids,
                 token_type_ids,
                 input_mask,
                 sequence_labels,
                 token_labels,
                 choice_labels,
             )






      def __UpperCAmelCase       ( self			:List[Any]     ,						SCREAMING_SNAKE_CASE			:str     ,						SCREAMING_SNAKE_CASE			:Dict     ,						SCREAMING_SNAKE_CASE			:Optional[Any]     ,						SCREAMING_SNAKE_CASE			:Any     ,						SCREAMING_SNAKE_CASE			:Dict     ,						SCREAMING_SNAKE_CASE			:Optional[Any]     ,						SCREAMING_SNAKE_CASE			:int     ,						)       ->					Any:




             '''simple docstring'''
             _a    : str     					=TFFunnelModel(config=SCREAMING_SNAKE_CASE	)
             _a    : Any     					={"""input_ids""": input_ids, """attention_mask""": input_mask, """token_type_ids""": token_type_ids}
             _a    : List[Any]     					=model(SCREAMING_SNAKE_CASE	)

             _a    : Optional[int]     					=[input_ids, input_mask]
             _a    : Dict     					=model(SCREAMING_SNAKE_CASE	)

             _a    : List[Any]     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.last_hidden_state.shape     ,						(self.batch_size, self.seq_length, self.d_model)	)

             _a    : Dict     					=False
             _a    : Any     					=TFFunnelModel(config=SCREAMING_SNAKE_CASE	)
             _a    : Optional[Any]     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.last_hidden_state.shape     ,						(self.batch_size, self.seq_length, self.d_model)	)

             _a    : List[Any]     					=False
             _a    : Any     					=TFFunnelModel(config=SCREAMING_SNAKE_CASE	)
             _a    : Optional[Any]     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.last_hidden_state.shape     ,						(self.batch_size, self.seq_length, self.d_model)	)






      def __UpperCAmelCase       ( self			:List[Any]     ,						SCREAMING_SNAKE_CASE			:int     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:Any     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:Tuple     ,						SCREAMING_SNAKE_CASE			:Any     ,						)       ->					Any:




             '''simple docstring'''
             _a    : int     					=TFFunnelBaseModel(config=SCREAMING_SNAKE_CASE	)
             _a    : Tuple     					={"""input_ids""": input_ids, """attention_mask""": input_mask, """token_type_ids""": token_type_ids}
             _a    : Dict     					=model(SCREAMING_SNAKE_CASE	)

             _a    : Union[str, Any]     					=[input_ids, input_mask]
             _a    : Union[str, Any]     					=model(SCREAMING_SNAKE_CASE	)

             _a    : Union[str, Any]     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.last_hidden_state.shape     ,						(self.batch_size, 2, self.d_model)	)

             _a    : Optional[int]     					=False
             _a    : Any     					=TFFunnelBaseModel(config=SCREAMING_SNAKE_CASE	)
             _a    : List[Any]     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.last_hidden_state.shape     ,						(self.batch_size, 3, self.d_model)	)

             _a    : int     					=False
             _a    : List[str]     					=TFFunnelBaseModel(config=SCREAMING_SNAKE_CASE	)
             _a    : Dict     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.last_hidden_state.shape     ,						(self.batch_size, 2, self.d_model)	)






      def __UpperCAmelCase       ( self			:Optional[Any]     ,						SCREAMING_SNAKE_CASE			:Tuple     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:int     ,						SCREAMING_SNAKE_CASE			:Any     ,						SCREAMING_SNAKE_CASE			:List[Any]     ,						)       ->					str:




             '''simple docstring'''
             _a    : Any     					=TFFunnelForPreTraining(config=SCREAMING_SNAKE_CASE	)
             _a    : Optional[Any]     					={"""input_ids""": input_ids, """attention_mask""": input_mask, """token_type_ids""": token_type_ids}
             _a    : List[str]     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.logits.shape     ,						(self.batch_size, self.seq_length)	)






      def __UpperCAmelCase       ( self			:Optional[Any]     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:Any     ,						SCREAMING_SNAKE_CASE			:Any     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:str     ,						SCREAMING_SNAKE_CASE			:Dict     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						)       ->					Optional[int]:




             '''simple docstring'''
             _a    : Optional[Any]     					=TFFunnelForMaskedLM(config=SCREAMING_SNAKE_CASE	)
             _a    : int     					={"""input_ids""": input_ids, """attention_mask""": input_mask, """token_type_ids""": token_type_ids}
             _a    : Optional[int]     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.logits.shape     ,						(self.batch_size, self.seq_length, self.vocab_size)	)






      def __UpperCAmelCase       ( self			:Dict     ,						SCREAMING_SNAKE_CASE			:List[str]     ,						SCREAMING_SNAKE_CASE			:List[str]     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]     ,						SCREAMING_SNAKE_CASE			:Dict     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]     ,						SCREAMING_SNAKE_CASE			:Optional[Any]     ,						)       ->					List[Any]:




             '''simple docstring'''
             _a    : Any     					=self.num_labels
             _a    : int     					=TFFunnelForSequenceClassification(config=SCREAMING_SNAKE_CASE	)
             _a    : Optional[int]     					={"""input_ids""": input_ids, """attention_mask""": input_mask, """token_type_ids""": token_type_ids}
             _a    : Union[str, Any]     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.logits.shape     ,						(self.batch_size, self.num_labels)	)






      def __UpperCAmelCase       ( self			:List[Any]     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]     ,						SCREAMING_SNAKE_CASE			:List[Any]     ,						SCREAMING_SNAKE_CASE			:Tuple     ,						SCREAMING_SNAKE_CASE			:str     ,						SCREAMING_SNAKE_CASE			:List[Any]     ,						SCREAMING_SNAKE_CASE			:Optional[Any]     ,						)       ->					Union[str, Any]:




             '''simple docstring'''
             _a    : Optional[Any]     					=self.num_choices
             _a    : Optional[Any]     					=TFFunnelForMultipleChoice(config=SCREAMING_SNAKE_CASE	)
             _a    : Union[str, Any]     					=tf.tile(tf.expand_dims(SCREAMING_SNAKE_CASE     ,						1	)     ,						(1, self.num_choices, 1)	)
             _a    : str     					=tf.tile(tf.expand_dims(SCREAMING_SNAKE_CASE     ,						1	)     ,						(1, self.num_choices, 1)	)
             _a    : Optional[int]     					=tf.tile(tf.expand_dims(SCREAMING_SNAKE_CASE     ,						1	)     ,						(1, self.num_choices, 1)	)
             _a    : List[str]     					={
                 """input_ids""": multiple_choice_inputs_ids,
                 """attention_mask""": multiple_choice_input_mask,
                 """token_type_ids""": multiple_choice_token_type_ids,
             }
             _a    : Any     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.logits.shape     ,						(self.batch_size, self.num_choices)	)






      def __UpperCAmelCase       ( self			:Tuple     ,						SCREAMING_SNAKE_CASE			:str     ,						SCREAMING_SNAKE_CASE			:List[Any]     ,						SCREAMING_SNAKE_CASE			:str     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]     ,						SCREAMING_SNAKE_CASE			:Tuple     ,						SCREAMING_SNAKE_CASE			:int     ,						SCREAMING_SNAKE_CASE			:Optional[Any]     ,						)       ->					Dict:




             '''simple docstring'''
             _a    : Any     					=self.num_labels
             _a    : str     					=TFFunnelForTokenClassification(config=SCREAMING_SNAKE_CASE	)
             _a    : List[Any]     					={"""input_ids""": input_ids, """attention_mask""": input_mask, """token_type_ids""": token_type_ids}
             _a    : List[str]     					=model(SCREAMING_SNAKE_CASE	)
             self.parent.assertEqual(result.logits.shape     ,						(self.batch_size, self.seq_length, self.num_labels)	)






      def __UpperCAmelCase       ( self			:Union[str, Any]     ,						SCREAMING_SNAKE_CASE			:Any     ,						SCREAMING_SNAKE_CASE			:int     ,						SCREAMING_SNAKE_CASE			:Optional[int]     ,						SCREAMING_SNAKE_CASE			:Dict     ,						SCREAMING_SNAKE_CASE			:int     ,						SCREAMING_SNAKE_CASE			:Dict     ,						SCREAMING_SNAKE_CASE			:str     ,						)       ->					Optional[Any]:




             '''simple docstring'''
             _a    : Union[str, Any]     					=TFFunnelForQuestionAnswering(config=SCREAMING_SNAKE_CASE	)
             _a    : Union[str, Any]     					={"""input_ids""": input_ids, """attention_mask""": input_mask, """token_type_ids""": token_type_ids}
             _a    : str     					=model(SCREAMING_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 __UpperCAmelCase       ( self			:Any	)       ->					Any:




             '''simple docstring'''
             _a    : int     					=self.prepare_config_and_inputs()
             (
                 (
                 _a
             )					,    (
                 _a
             )					,    (
                 _a
             )					,    (
                 _a
             )					,    (
                 _a
             )					,    (
                 _a
             )					,    (
                 _a
             )					,    
             )    : Dict     					=config_and_inputs
             _a    : int     					={"""input_ids""": input_ids, """token_type_ids""": token_type_ids, """attention_mask""": input_mask}
             return config, inputs_dict







@require_tf
class A__       (						UpperCAmelCase__ ,     UpperCAmelCase__ ,     unittest.TestCase      ):
      __UpperCamelCase       :  Dict	       =							(
          (
              TFFunnelModel,
              TFFunnelForMaskedLM,
              TFFunnelForPreTraining,
              TFFunnelForQuestionAnswering,
              TFFunnelForTokenClassification,
          )
          if is_tf_available()
          else ()
      )
      __UpperCamelCase       :  Dict	       =							(
          {
              "feature-extraction": (TFFunnelBaseModel, TFFunnelModel),
              "fill-mask": TFFunnelForMaskedLM,
              "question-answering": TFFunnelForQuestionAnswering,
              "text-classification": TFFunnelForSequenceClassification,
              "token-classification": TFFunnelForTokenClassification,
              "zero-shot": TFFunnelForSequenceClassification,
          }
          if is_tf_available()
          else {}
      )
      __UpperCamelCase       :  Union[str, Any]	       =							False
      __UpperCamelCase       :  str	       =							False






      def __UpperCAmelCase       ( self			:Union[str, Any]	)       ->					Tuple:




             '''simple docstring'''
             _a    : Tuple     					=TFFunnelModelTester(self	)
             _a    : List[str]     					=ConfigTester(self     ,						config_class=SCREAMING_SNAKE_CASE	)






      def __UpperCAmelCase       ( self			:Dict	)       ->					Optional[Any]:




             '''simple docstring'''
             self.config_tester.run_common_tests()






      def __UpperCAmelCase       ( self			:List[str]	)       ->					Dict:




             '''simple docstring'''
             _a    : int     					=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_model(*SCREAMING_SNAKE_CASE	)






      def __UpperCAmelCase       ( self			:List[str]	)       ->					Optional[int]:




             '''simple docstring'''
             _a    : Optional[int]     					=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_pretraining(*SCREAMING_SNAKE_CASE	)






      def __UpperCAmelCase       ( self			:str	)       ->					Optional[Any]:




             '''simple docstring'''
             _a    : str     					=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_masked_lm(*SCREAMING_SNAKE_CASE	)






      def __UpperCAmelCase       ( self			:Dict	)       ->					int:




             '''simple docstring'''
             _a    : Dict     					=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_token_classification(*SCREAMING_SNAKE_CASE	)






      def __UpperCAmelCase       ( self			:List[Any]	)       ->					Union[str, Any]:




             '''simple docstring'''
             _a    : Dict     					=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_question_answering(*SCREAMING_SNAKE_CASE	)







@require_tf
class A__       (						UpperCAmelCase__ ,     unittest.TestCase      ):
      __UpperCamelCase       :  Optional[int]	       =							(
          (TFFunnelBaseModel, TFFunnelForMultipleChoice, TFFunnelForSequenceClassification) if is_tf_available() else ()
      )
      __UpperCamelCase       :  str	       =							False
      __UpperCamelCase       :  List[str]	       =							False






      def __UpperCAmelCase       ( self			:Optional[int]	)       ->					Any:




             '''simple docstring'''
             _a    : Any     					=TFFunnelModelTester(self     ,						base=SCREAMING_SNAKE_CASE	)
             _a    : int     					=ConfigTester(self     ,						config_class=SCREAMING_SNAKE_CASE	)






      def __UpperCAmelCase       ( self			:List[Any]	)       ->					str:




             '''simple docstring'''
             self.config_tester.run_common_tests()






      def __UpperCAmelCase       ( self			:Optional[Any]	)       ->					List[Any]:




             '''simple docstring'''
             _a    : List[str]     					=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_base_model(*SCREAMING_SNAKE_CASE	)






      def __UpperCAmelCase       ( self			:str	)       ->					Optional[int]:




             '''simple docstring'''
             _a    : int     					=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_sequence_classification(*SCREAMING_SNAKE_CASE	)






      def __UpperCAmelCase       ( self			:str	)       ->					Optional[Any]:




             '''simple docstring'''
             _a    : Optional[int]     					=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_multiple_choice(*SCREAMING_SNAKE_CASE	)






'''simple docstring'''







from collections import OrderedDict
from typing import Mapping

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


A__:    List[str]					    =       logging.get_logger(__name__)

A__:    Union[str, Any]					    =       {
    '''facebook/data2vec-text-base''': '''https://huggingface.co/data2vec/resolve/main/config.json''',
}







class A__       (						UpperCAmelCase__      ):
      __UpperCamelCase       :  int	       =							"data2vec-text"






      def __init__( self			:str     ,						SCREAMING_SNAKE_CASE			:Optional[Any]=3_0_5_2_2     ,						SCREAMING_SNAKE_CASE			:Any=7_6_8     ,						SCREAMING_SNAKE_CASE			:List[Any]=1_2     ,						SCREAMING_SNAKE_CASE			:List[str]=1_2     ,						SCREAMING_SNAKE_CASE			:Dict=3_0_7_2     ,						SCREAMING_SNAKE_CASE			:List[str]="gelu"     ,						SCREAMING_SNAKE_CASE			:Any=0.1     ,						SCREAMING_SNAKE_CASE			:List[str]=0.1     ,						SCREAMING_SNAKE_CASE			:int=5_1_2     ,						SCREAMING_SNAKE_CASE			:int=2     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]=0.02     ,						SCREAMING_SNAKE_CASE			:Dict=1e-12     ,						SCREAMING_SNAKE_CASE			:int=1     ,						SCREAMING_SNAKE_CASE			:Dict=0     ,						SCREAMING_SNAKE_CASE			:List[Any]=2     ,						SCREAMING_SNAKE_CASE			:str="absolute"     ,						SCREAMING_SNAKE_CASE			:Tuple=True     ,						SCREAMING_SNAKE_CASE			:Union[str, Any]=None     ,						**SCREAMING_SNAKE_CASE			:Union[str, Any]     ,						)       ->					List[str]:




             '''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	)

             _a    : Optional[Any]     					=vocab_size
             _a    : Optional[Any]     					=hidden_size
             _a    : Any     					=num_hidden_layers
             _a    : List[str]     					=num_attention_heads
             _a    : Union[str, Any]     					=hidden_act
             _a    : Any     					=intermediate_size
             _a    : str     					=hidden_dropout_prob
             _a    : Optional[Any]     					=attention_probs_dropout_prob
             _a    : Optional[Any]     					=max_position_embeddings
             _a    : Union[str, Any]     					=type_vocab_size
             _a    : Tuple     					=initializer_range
             _a    : Optional[int]     					=layer_norm_eps
             _a    : Tuple     					=position_embedding_type
             _a    : int     					=use_cache
             _a    : List[str]     					=classifier_dropout







class A__       (						UpperCAmelCase__      ):






      @property
      def __UpperCAmelCase       ( self			:int	)       ->					Mapping[str, Mapping[int, str]]:




             '''simple docstring'''
             if self.task == "multiple-choice":
                    _a    : Tuple     					={0: """batch""", 1: """choice""", 2: """sequence"""}
             else:
                    _a    : List[Any]     					={0: """batch""", 1: """sequence"""}
             return OrderedDict(
                 [
                     ("""input_ids""", dynamic_axis),
                     ("""attention_mask""", dynamic_axis),
                 ]	)


