





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

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


_snake_case     :		Tuple       						= logging.get_logger(__name__)

_snake_case     :		Optional[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 					_UpperCAmelCase   (	lowercase_ ):
					UpperCamelCase      =							'''convbert'''


					def __init__(					self			:Union[str, Any]     ,       __UpperCamelCase			:List[str]=3_05_22     ,       __UpperCamelCase			:Optional[Any]=7_68     ,       __UpperCamelCase			:Optional[int]=12     ,       __UpperCamelCase			:Union[str, Any]=12     ,       __UpperCamelCase			:int=30_72     ,       __UpperCamelCase			:Optional[Any]="gelu"     ,       __UpperCamelCase			:List[Any]=0.1     ,       __UpperCamelCase			:List[Any]=0.1     ,       __UpperCamelCase			:Tuple=5_12     ,       __UpperCamelCase			:List[Any]=2     ,       __UpperCamelCase			:Union[str, Any]=0.02     ,       __UpperCamelCase			:Any=1e-12     ,       __UpperCamelCase			:str=1     ,       __UpperCamelCase			:Union[str, Any]=0     ,       __UpperCamelCase			:Union[str, Any]=2     ,       __UpperCamelCase			:str=7_68     ,       __UpperCamelCase			:Tuple=2     ,       __UpperCamelCase			:Union[str, Any]=9     ,       __UpperCamelCase			:str=1     ,       __UpperCamelCase			:int=None     ,       **__UpperCamelCase			:int     ,       ):
												super().__init__(
												    pad_token_id=__UpperCamelCase     ,       bos_token_id=__UpperCamelCase     ,       eos_token_id=__UpperCamelCase     ,       **__UpperCamelCase     ,       )

												A		=  vocab_size
												A		=  hidden_size
												A		=  num_hidden_layers
												A		=  num_attention_heads
												A		=  intermediate_size
												A		=  hidden_act
												A		=  hidden_dropout_prob
												A		=  attention_probs_dropout_prob
												A		=  max_position_embeddings
												A		=  type_vocab_size
												A		=  initializer_range
												A		=  layer_norm_eps
												A		=  embedding_size
												A		=  head_ratio
												A		=  conv_kernel_size
												A		=  num_groups
												A		=  classifier_dropout







class 					_UpperCAmelCase   (	lowercase_ ):


					@property
					def 	lowerCamelCase       (					self			:Dict		):
												if self.task == "multiple-choice":
																			A		=  {0: "batch", 1: "choice", 2: "sequence"}
												else:
																			A		=  {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_torch_available,
)


_snake_case     :		Union[str, Any]       						= {
    'configuration_encodec': [
        'ENCODEC_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'EncodecConfig',
    ],
    'feature_extraction_encodec': ['EncodecFeatureExtractor'],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_snake_case     :		int       						= [
		    'ENCODEC_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'EncodecModel',
		    'EncodecPreTrainedModel',
		]

if TYPE_CHECKING:
		from .configuration_encodec import (
		    ENCODEC_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    EncodecConfig,
		)
		from .feature_extraction_encodec import EncodecFeatureExtractor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_encodec import (
				    ENCODEC_PRETRAINED_MODEL_ARCHIVE_LIST,
				    EncodecModel,
				    EncodecPreTrainedModel,
				)

else:
		import sys

		_snake_case     :		str       						= _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


