
'''simple docstring'''







from collections import OrderedDict
from typing import Mapping

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


lowercase    :							Tuple      =					logging.get_logger(__name__)

lowercase    :							Any      =					{
    '''distilbert-base-uncased''': '''https://huggingface.co/distilbert-base-uncased/resolve/main/config.json''',
    '''distilbert-base-uncased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-cased''': '''https://huggingface.co/distilbert-base-cased/resolve/main/config.json''',
    '''distilbert-base-cased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-german-cased''': '''https://huggingface.co/distilbert-base-german-cased/resolve/main/config.json''',
    '''distilbert-base-multilingual-cased''': (
        '''https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/config.json'''
    ),
    '''distilbert-base-uncased-finetuned-sst-2-english''': (
        '''https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english/resolve/main/config.json'''
    ),
}


class 						__UpperCAmelCase      (					lowerCamelCase_						):
							__lowercase      		=       """distilbert"""
							__lowercase      		=       {
							    """hidden_size""": """dim""",
							    """num_attention_heads""": """n_heads""",
							    """num_hidden_layers""": """n_layers""",
							}


							def __init__(       self    ,   lowerCAmelCase_=3_05_22    ,   lowerCAmelCase_=5_12    ,   lowerCAmelCase_=False    ,   lowerCAmelCase_=6    ,   lowerCAmelCase_=12    ,   lowerCAmelCase_=7_68    ,   lowerCAmelCase_=4 * 7_68    ,   lowerCAmelCase_=0.1    ,   lowerCAmelCase_=0.1    ,   lowerCAmelCase_="gelu"    ,   lowerCAmelCase_=0.02    ,   lowerCAmelCase_=0.1    ,   lowerCAmelCase_=0.2    ,   lowerCAmelCase_=0    ,   **lowerCAmelCase_    ,   ):





								"""simple docstring"""






								_snake_case   						=		vocab_size
								_snake_case   						=		max_position_embeddings
								_snake_case   						=		sinusoidal_pos_embds
								_snake_case   						=		n_layers
								_snake_case   						=		n_heads
								_snake_case   						=		dim
								_snake_case   						=		hidden_dim
								_snake_case   						=		dropout
								_snake_case   						=		attention_dropout
								_snake_case   						=		activation
								_snake_case   						=		initializer_range
								_snake_case   						=		qa_dropout
								_snake_case   						=		seq_classif_dropout
								super().__init__(**_lowercase    ,   pad_token_id=_lowercase  )


class 						__UpperCAmelCase      (					lowerCamelCase_						):


							@property
							def  lowerCamelCase				(       self  ):





								"""simple docstring"""






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


# coding=utf-8
# Copyright 2023 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 platform
import sys


__lowerCamelCase			: Union[str, Any]							   =		'''3'''

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

print('''OS platform:''', platform.platform())
print('''OS architecture:''', platform.machine())

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())
except ImportError:
   print('''Torch version:''', None)

try:
   import transformers

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