


'''simple docstring'''
from collections import OrderedDict
from typing import Mapping

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


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

UpperCAmelCase_			:  Any										=   {
    'YituTech/conv-bert-base': 'https://huggingface.co/YituTech/conv-bert-base/resolve/main/config.json',
    'YituTech/conv-bert-medium-small': (
        'https://huggingface.co/YituTech/conv-bert-medium-small/resolve/main/config.json'
    ),
    'YituTech/conv-bert-small': 'https://huggingface.co/YituTech/conv-bert-small/resolve/main/config.json',
    # See all ConvBERT models at https://huggingface.co/models?filter=convbert
}

class     _lowerCamelCase       (     snake_case_					):




 '''simple docstring'''
 __lowercase					:		Union[str, Any]     				=    '''convbert'''


 def __init__(   self   ,   __lowercase=30_522   ,   __lowercase=768   ,   __lowercase=12   ,   __lowercase=12   ,   __lowercase=3_072   ,   __lowercase="gelu"   ,   __lowercase=0.1   ,   __lowercase=0.1   ,   __lowercase=512   ,   __lowercase=2   ,   __lowercase=0.0_2   ,   __lowercase=1E-12   ,   __lowercase=1   ,   __lowercase=0   ,   __lowercase=2   ,   __lowercase=768   ,   __lowercase=2   ,   __lowercase=9   ,   __lowercase=1   ,   __lowercase=None   ,   **__lowercase   ,   ):

  """simple docstring"""







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

  __A	:		Optional[int]	  =      vocab_size
  __A	:		Tuple	  =      hidden_size
  __A	:		Tuple	  =      num_hidden_layers
  __A	:		Optional[int]	  =      num_attention_heads
  __A	:		Dict	  =      intermediate_size
  __A	:		List[Any]	  =      hidden_act
  __A	:		Union[str, Any]	  =      hidden_dropout_prob
  __A	:		Optional[int]	  =      attention_probs_dropout_prob
  __A	:		Dict	  =      max_position_embeddings
  __A	:		Tuple	  =      type_vocab_size
  __A	:		int	  =      initializer_range
  __A	:		int	  =      layer_norm_eps
  __A	:		Optional[int]	  =      embedding_size
  __A	:		Any	  =      head_ratio
  __A	:		Optional[Any]	  =      conv_kernel_size
  __A	:		Tuple	  =      num_groups
  __A	:		List[str]	  =      classifier_dropout


class     _lowerCamelCase       (     snake_case_					):




 '''simple docstring'''


 @property
 def 			snake_case__ (   self    ):

  """simple docstring"""







  if self.task == "multiple-choice":
   __A	:		Optional[int]	  =      {0: 'batch', 1: 'choice', 2: 'sequence'}
  else:
   __A	:		Tuple	  =      {0: 'batch', 1: 'sequence'}
  return OrderedDict(
      [
          ('input_ids', dynamic_axis),
          ('attention_mask', dynamic_axis),
          ('token_type_ids', dynamic_axis),
      ]    )










'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


UpperCAmelCase_			:  Optional[Any]										=   {
    'configuration_transfo_xl': ['TRANSFO_XL_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TransfoXLConfig'],
    'tokenization_transfo_xl': ['TransfoXLCorpus', 'TransfoXLTokenizer'],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase_			:  Any										=   [
     'TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST',
     'AdaptiveEmbedding',
     'TransfoXLForSequenceClassification',
     'TransfoXLLMHeadModel',
     'TransfoXLModel',
     'TransfoXLPreTrainedModel',
     'load_tf_weights_in_transfo_xl',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase_			:  Optional[Any]										=   [
     'TF_TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFAdaptiveEmbedding',
     'TFTransfoXLForSequenceClassification',
     'TFTransfoXLLMHeadModel',
     'TFTransfoXLMainLayer',
     'TFTransfoXLModel',
     'TFTransfoXLPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_transfo_xl import TRANSFO_XL_PRETRAINED_CONFIG_ARCHIVE_MAP, TransfoXLConfig
 from .tokenization_transfo_xl import TransfoXLCorpus, TransfoXLTokenizer

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_transfo_xl import (
      TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST,
      AdaptiveEmbedding,
      TransfoXLForSequenceClassification,
      TransfoXLLMHeadModel,
      TransfoXLModel,
      TransfoXLPreTrainedModel,
      load_tf_weights_in_transfo_xl,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_transfo_xl import (
      TF_TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFAdaptiveEmbedding,
      TFTransfoXLForSequenceClassification,
      TFTransfoXLLMHeadModel,
      TFTransfoXLMainLayer,
      TFTransfoXLModel,
      TFTransfoXLPreTrainedModel,
  )

else:
 import sys

 UpperCAmelCase_			:  Optional[int]										=   _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






