

from collections import OrderedDict
from typing import Mapping

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


a__												=						logging.get_logger(__name__)

a__												=						{
    '''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  ):
							"""simple docstring"""







							UpperCAmelCase__			:		Any             =       "convbert"


							def __init__(     self			,				_a=3_0_5_2_2			,				_a=7_6_8			,				_a=1_2			,				_a=1_2			,				_a=3_0_7_2			,				_a="gelu"			,				_a=0.1			,				_a=0.1			,				_a=5_1_2			,				_a=2			,				_a=0.02			,				_a=1e-1_2			,				_a=1			,				_a=0			,				_a=2			,				_a=7_6_8			,				_a=2			,				_a=9			,				_a=1			,				_a=None			,				**_a			,				)       ->       Tuple:
												super().__init__(
												    pad_token_id=_a			,				bos_token_id=_a			,				eos_token_id=_a			,				**_a			,				)

												_a      :       Optional[int]   =						vocab_size
												_a      :       str   =						hidden_size
												_a      :       str   =						num_hidden_layers
												_a      :       List[Any]   =						num_attention_heads
												_a      :       int   =						intermediate_size
												_a      :       List[str]   =						hidden_act
												_a      :       Union[str, Any]   =						hidden_dropout_prob
												_a      :       Optional[Any]   =						attention_probs_dropout_prob
												_a      :       int   =						max_position_embeddings
												_a      :       str   =						type_vocab_size
												_a      :       Union[str, Any]   =						initializer_range
												_a      :       Union[str, Any]   =						layer_norm_eps
												_a      :       str   =						embedding_size
												_a      :       Tuple   =						head_ratio
												_a      :       Tuple   =						conv_kernel_size
												_a      :       Union[str, Any]   =						num_groups
												_a      :       Dict   =						classifier_dropout



class 							UpperCAmelCase_						(     __lowercase  ):
							"""simple docstring"""







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





# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# 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.
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowerCAmelCase     :	Tuple       			=  {'configuration_timm_backbone': ['TimmBackboneConfig']}


try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowerCAmelCase     :	str       			=  ['TimmBackbone']


if TYPE_CHECKING:
    from .configuration_timm_backbone import TimmBackboneConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_timm_backbone import TimmBackbone

else:
    import sys

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

