


"""simple docstring"""



from collections import OrderedDict
from typing import Mapping

from packaging import version

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


UpperCAmelCase      		=			logging.get_logger(__name__)

UpperCAmelCase      		=			{
    '''facebook/deit-base-distilled-patch16-224''': (
        '''https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json'''
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}
class 					__magic_name__		(			__UpperCAmelCase     ):
       __A			:      Tuple        =   "deit"






       def __init__(   self  :    List[str]  ,     snake_case__  :    int=7_6_8  ,     snake_case__  :    List[Any]=1_2  ,     snake_case__  :    Dict=1_2  ,     snake_case__  :    List[Any]=3_0_7_2  ,     snake_case__  :    Optional[int]="gelu"  ,     snake_case__  :    Dict=0.0  ,     snake_case__  :    str=0.0  ,     snake_case__  :    List[str]=0.02  ,     snake_case__  :    Optional[int]=1e-1_2  ,     snake_case__  :    Any=2_2_4  ,     snake_case__  :    Optional[int]=1_6  ,     snake_case__  :    int=3  ,     snake_case__  :    str=True  ,     snake_case__  :    Optional[int]=1_6  ,     **snake_case__  :    List[Any]  ,     ):

              '''simple docstring'''






              super().__init__(**snake_case__				)

              lowercase		:List[str]       							=				hidden_size
              lowercase		:Union[str, Any]       							=				num_hidden_layers
              lowercase		:Optional[Any]       							=				num_attention_heads
              lowercase		:Optional[Any]       							=				intermediate_size
              lowercase		:int       							=				hidden_act
              lowercase		:int       							=				hidden_dropout_prob
              lowercase		:Dict       							=				attention_probs_dropout_prob
              lowercase		:Optional[int]       							=				initializer_range
              lowercase		:Tuple       							=				layer_norm_eps
              lowercase		:Optional[int]       							=				image_size
              lowercase		:Union[str, Any]       							=				patch_size
              lowercase		:Optional[Any]       							=				num_channels
              lowercase		:Tuple       							=				qkv_bias
              lowercase		:Optional[Any]       							=				encoder_stride







class 					__magic_name__		(			__UpperCAmelCase     ):
       __A			:      Optional[int]        =   version.parse("1.11"     )






       @property
       def  __snake_case						(   self  :    int				):

              '''simple docstring'''






              return OrderedDict(
                  [
                      ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
                  ]				)







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

              '''simple docstring'''






              return 1e-4





"""simple docstring"""



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCAmelCase      		=			{
    '''configuration_xlm_roberta''': [
        '''XLM_ROBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''XLMRobertaConfig''',
        '''XLMRobertaOnnxConfig''',
    ],
}

try:
 if not is_sentencepiece_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase      		=			['''XLMRobertaTokenizer''']

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase      		=			['''XLMRobertaTokenizerFast''']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase      		=			[
     '''XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''XLMRobertaForCausalLM''',
     '''XLMRobertaForMaskedLM''',
     '''XLMRobertaForMultipleChoice''',
     '''XLMRobertaForQuestionAnswering''',
     '''XLMRobertaForSequenceClassification''',
     '''XLMRobertaForTokenClassification''',
     '''XLMRobertaModel''',
     '''XLMRobertaPreTrainedModel''',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase      		=			[
     '''TF_XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''TFXLMRobertaForCausalLM''',
     '''TFXLMRobertaForMaskedLM''',
     '''TFXLMRobertaForMultipleChoice''',
     '''TFXLMRobertaForQuestionAnswering''',
     '''TFXLMRobertaForSequenceClassification''',
     '''TFXLMRobertaForTokenClassification''',
     '''TFXLMRobertaModel''',
     '''TFXLMRobertaPreTrainedModel''',
 ]

try:
 if not is_flax_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase      		=			[
     '''FLAX_XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''FlaxXLMRobertaForMaskedLM''',
     '''FlaxXLMRobertaForCausalLM''',
     '''FlaxXLMRobertaForMultipleChoice''',
     '''FlaxXLMRobertaForQuestionAnswering''',
     '''FlaxXLMRobertaForSequenceClassification''',
     '''FlaxXLMRobertaForTokenClassification''',
     '''FlaxXLMRobertaModel''',
     '''FlaxXLMRobertaPreTrainedModel''',
 ]

if TYPE_CHECKING:
 from .configuration_xlm_roberta import (
     XLM_ROBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP,
     XLMRobertaConfig,
     XLMRobertaOnnxConfig,
 )

 try:
  if not is_sentencepiece_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_xlm_roberta import XLMRobertaTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_xlm_roberta_fast import XLMRobertaTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_xlm_roberta import (
      XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
      XLMRobertaForCausalLM,
      XLMRobertaForMaskedLM,
      XLMRobertaForMultipleChoice,
      XLMRobertaForQuestionAnswering,
      XLMRobertaForSequenceClassification,
      XLMRobertaForTokenClassification,
      XLMRobertaModel,
      XLMRobertaPreTrainedModel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_xlm_roberta import (
      TF_XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFXLMRobertaForCausalLM,
      TFXLMRobertaForMaskedLM,
      TFXLMRobertaForMultipleChoice,
      TFXLMRobertaForQuestionAnswering,
      TFXLMRobertaForSequenceClassification,
      TFXLMRobertaForTokenClassification,
      TFXLMRobertaModel,
      TFXLMRobertaPreTrainedModel,
  )

 try:
  if not is_flax_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_flax_xlm_roberta import (
      FLAX_XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
      FlaxXLMRobertaForCausalLM,
      FlaxXLMRobertaForMaskedLM,
      FlaxXLMRobertaForMultipleChoice,
      FlaxXLMRobertaForQuestionAnswering,
      FlaxXLMRobertaForSequenceClassification,
      FlaxXLMRobertaForTokenClassification,
      FlaxXLMRobertaModel,
      FlaxXLMRobertaPreTrainedModel,
  )

else:
 import sys

 UpperCAmelCase      		=			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

