



'''simple docstring'''





from collections import OrderedDict
from typing import Mapping

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


_lowerCAmelCase      						=	logging.get_logger(__name__)

_lowerCAmelCase      						=	{
    '''facebook/xmod-base''': '''https://huggingface.co/facebook/xmod-base/resolve/main/config.json''',
    '''facebook/xmod-large-prenorm''': '''https://huggingface.co/facebook/xmod-large-prenorm/resolve/main/config.json''',
    '''facebook/xmod-base-13-125k''': '''https://huggingface.co/facebook/xmod-base-13-125k/resolve/main/config.json''',
    '''facebook/xmod-base-30-125k''': '''https://huggingface.co/facebook/xmod-base-30-125k/resolve/main/config.json''',
    '''facebook/xmod-base-30-195k''': '''https://huggingface.co/facebook/xmod-base-30-195k/resolve/main/config.json''',
    '''facebook/xmod-base-60-125k''': '''https://huggingface.co/facebook/xmod-base-60-125k/resolve/main/config.json''',
    '''facebook/xmod-base-60-265k''': '''https://huggingface.co/facebook/xmod-base-60-265k/resolve/main/config.json''',
    '''facebook/xmod-base-75-125k''': '''https://huggingface.co/facebook/xmod-base-75-125k/resolve/main/config.json''',
    '''facebook/xmod-base-75-269k''': '''https://huggingface.co/facebook/xmod-base-75-269k/resolve/main/config.json''',
}






class        lowerCAmelCase_(				SCREAMING_SNAKE_CASE_     ):
  '''simple docstring'''




  __lowercase							:      Optional[int]				=      '''xmod'''




  def __init__(    self  ,__UpperCAmelCase=3_0522  ,__UpperCAmelCase=768  ,__UpperCAmelCase=12  ,__UpperCAmelCase=12  ,__UpperCAmelCase=3072  ,__UpperCAmelCase="gelu"  ,__UpperCAmelCase=0.1  ,__UpperCAmelCase=0.1  ,__UpperCAmelCase=512  ,__UpperCAmelCase=2  ,__UpperCAmelCase=0.0_2  ,__UpperCAmelCase=1E-12  ,__UpperCAmelCase=1  ,__UpperCAmelCase=0  ,__UpperCAmelCase=2  ,__UpperCAmelCase="absolute"  ,__UpperCAmelCase=True  ,__UpperCAmelCase=None  ,__UpperCAmelCase=False  ,__UpperCAmelCase=2  ,__UpperCAmelCase=False  ,__UpperCAmelCase=True  ,__UpperCAmelCase=True  ,__UpperCAmelCase=("en_XX",)  ,__UpperCAmelCase=None  ,**__UpperCAmelCase  ,)    ->		List[Any]:
      super().__init__(pad_token_id=__UpperCAmelCase  ,bos_token_id=__UpperCAmelCase  ,eos_token_id=__UpperCAmelCase  ,**__UpperCAmelCase      )

      lowerCAmelCase__ :  Dict							      =					vocab_size
      lowerCAmelCase__ :  Optional[int]							      =					hidden_size
      lowerCAmelCase__ :  Union[str, Any]							      =					num_hidden_layers
      lowerCAmelCase__ :  List[Any]							      =					num_attention_heads
      lowerCAmelCase__ :  int							      =					hidden_act
      lowerCAmelCase__ :  str							      =					intermediate_size
      lowerCAmelCase__ :  List[Any]							      =					hidden_dropout_prob
      lowerCAmelCase__ :  Union[str, Any]							      =					attention_probs_dropout_prob
      lowerCAmelCase__ :  Optional[Any]							      =					max_position_embeddings
      lowerCAmelCase__ :  Tuple							      =					type_vocab_size
      lowerCAmelCase__ :  Optional[int]							      =					initializer_range
      lowerCAmelCase__ :  Dict							      =					layer_norm_eps
      lowerCAmelCase__ :  List[Any]							      =					position_embedding_type
      lowerCAmelCase__ :  Dict							      =					use_cache
      lowerCAmelCase__ :  Tuple							      =					classifier_dropout
      lowerCAmelCase__ :  Union[str, Any]							      =					pre_norm
      lowerCAmelCase__ :  Union[str, Any]							      =					adapter_reduction_factor
      lowerCAmelCase__ :  List[str]							      =					adapter_layer_norm
      lowerCAmelCase__ :  Optional[Any]							      =					adapter_reuse_layer_norm
      lowerCAmelCase__ :  int							      =					ln_before_adapter
      lowerCAmelCase__ :  Any							      =					list(__UpperCAmelCase      )
      lowerCAmelCase__ :  Optional[int]							      =					default_language







class        lowerCAmelCase_(				SCREAMING_SNAKE_CASE_     ):
  '''simple docstring'''




  @property
  def 							UpperCAmelCase_	(    self      )    ->		Mapping[str, Mapping[int, str]]:
      if self.task == "multiple-choice":
          lowerCAmelCase__ :  List[str]							      =					{0: """batch""", 1: """choice""", 2: """sequence"""}
      else:
          lowerCAmelCase__ :  Optional[Any]							      =					{0: """batch""", 1: """sequence"""}
      return OrderedDict(
          [
              ("""input_ids""", dynamic_axis),
              ("""attention_mask""", dynamic_axis),
          ]      )







'''simple docstring'''





# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# this script dumps information about the environment

import os
import sys

import transformers


_lowerCAmelCase      						=	'''3'''

print('''Python version:''', sys.version)
print('''transformers version:''', transformers.__version__)

try:
 import torch

 print('''Torch version:''', torch.__version__)
 print('''Cuda available:''', torch.cuda.is_available())
 print('''Cuda version:''', torch.version.cuda)
 print('''CuDNN version:''', torch.backends.cudnn.version())
 print('''Number of GPUs available:''', torch.cuda.device_count())
 print('''NCCL version:''', torch.cuda.nccl.version())
except ImportError:
 print('''Torch version:''', None)

try:
 import deepspeed

 print('''DeepSpeed version:''', deepspeed.__version__)
except ImportError:
 print('''DeepSpeed version:''', None)

try:
 import tensorflow as tf

 print('''TensorFlow version:''', tf.__version__)
 print('''TF GPUs available:''', bool(tf.config.list_physical_devices('''GPU''')))
 print('''Number of TF GPUs available:''', len(tf.config.list_physical_devices('''GPU''')))
except ImportError:
 print('''TensorFlow version:''', None)


