



'''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		     =  {
    '''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       __magic_name__		(       _UpperCamelCase  ):
							lowerCAmelCase			:       int  							=   'distilbert'
							lowerCAmelCase			:       str  							=   {
							    'hidden_size': 'dim',
							    'num_attention_heads': 'n_heads',
							    'num_hidden_layers': 'n_layers',
							}







							def __init__(				self   :			List[Any]      ,_UpperCAmelCase   :			str=30522      ,_UpperCAmelCase   :			Optional[Any]=512      ,_UpperCAmelCase   :			Optional[Any]=False      ,_UpperCAmelCase   :			Union[str, Any]=6      ,_UpperCAmelCase   :			Optional[int]=12      ,_UpperCAmelCase   :			Optional[int]=768      ,_UpperCAmelCase   :			Optional[int]=4 * 768      ,_UpperCAmelCase   :			Optional[Any]=0.1      ,_UpperCAmelCase   :			List[str]=0.1      ,_UpperCAmelCase   :			Optional[int]="gelu"      ,_UpperCAmelCase   :			List[Any]=0.02      ,_UpperCAmelCase   :			Optional[Any]=0.1      ,_UpperCAmelCase   :			Optional[Any]=0.2      ,_UpperCAmelCase   :			int=0      ,**_UpperCAmelCase   :			int      ,):
									_a	: str								=				vocab_size
									_a	: List[str]								=				max_position_embeddings
									_a	: Dict								=				sinusoidal_pos_embds
									_a	: Optional[int]								=				n_layers
									_a	: Tuple								=				n_heads
									_a	: Union[str, Any]								=				dim
									_a	: Optional[Any]								=				hidden_dim
									_a	: Dict								=				dropout
									_a	: Optional[int]								=				attention_dropout
									_a	: int								=				activation
									_a	: Dict								=				initializer_range
									_a	: Optional[Any]								=				qa_dropout
									_a	: List[str]								=				seq_classif_dropout
									super().__init__(**_UpperCAmelCase      ,pad_token_id=_UpperCAmelCase						)

class       __magic_name__		(       _UpperCamelCase  ):







							@property
							def 				__lowercase     (				self   :			Union[str, Any]						):
									if self.task == "multiple-choice":
											_a	: Dict								=				{0: 'batch', 1: 'choice', 2: 'sequence'}
									else:
											_a	: Dict								=				{0: 'batch', 1: 'sequence'}
									return OrderedDict(
									    [
									        ('input_ids', dynamic_axis),
									        ('attention_mask', dynamic_axis),
									    ]						)









'''simple docstring'''

from abc import ABC, abstractmethod
from argparse import ArgumentParser

class       __magic_name__		(       _UpperCamelCase  ):







							@staticmethod
							@abstractmethod
							def 				__lowercase     (				_UpperCAmelCase   :			ArgumentParser						):
									raise NotImplementedError()







							@abstractmethod
							def 				__lowercase     (				self   :			str						):
									raise NotImplementedError()




