



from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig


__snake_case						:List[Any]						=					{
    '''albert-base-v1''': '''https://huggingface.co/albert-base-v1/resolve/main/config.json''',
    '''albert-large-v1''': '''https://huggingface.co/albert-large-v1/resolve/main/config.json''',
    '''albert-xlarge-v1''': '''https://huggingface.co/albert-xlarge-v1/resolve/main/config.json''',
    '''albert-xxlarge-v1''': '''https://huggingface.co/albert-xxlarge-v1/resolve/main/config.json''',
    '''albert-base-v2''': '''https://huggingface.co/albert-base-v2/resolve/main/config.json''',
    '''albert-large-v2''': '''https://huggingface.co/albert-large-v2/resolve/main/config.json''',
    '''albert-xlarge-v2''': '''https://huggingface.co/albert-xlarge-v2/resolve/main/config.json''',
    '''albert-xxlarge-v2''': '''https://huggingface.co/albert-xxlarge-v2/resolve/main/config.json''',
}

class    _A	(     __UpperCAmelCase   ):
       UpperCamelCase__  :   Optional[Any]						 =						'''albert'''



       def __init__(		self							:					Any					,		__SCREAMING_SNAKE_CASE							:					Optional[Any]=30_000					,		__SCREAMING_SNAKE_CASE							:					Tuple=128					,		__SCREAMING_SNAKE_CASE							:					List[str]=4_096					,		__SCREAMING_SNAKE_CASE							:					Optional[Any]=12					,		__SCREAMING_SNAKE_CASE							:					List[Any]=1					,		__SCREAMING_SNAKE_CASE							:					List[str]=64					,		__SCREAMING_SNAKE_CASE							:					str=16_384					,		__SCREAMING_SNAKE_CASE							:					Optional[Any]=1					,		__SCREAMING_SNAKE_CASE							:					List[Any]="gelu_new"					,		__SCREAMING_SNAKE_CASE							:					Optional[int]=0					,		__SCREAMING_SNAKE_CASE							:					Optional[int]=0					,		__SCREAMING_SNAKE_CASE							:					Dict=512					,		__SCREAMING_SNAKE_CASE							:					List[str]=2					,		__SCREAMING_SNAKE_CASE							:					int=0.02					,		__SCREAMING_SNAKE_CASE							:					Optional[Any]=1E-12					,		__SCREAMING_SNAKE_CASE							:					int=0.1					,		__SCREAMING_SNAKE_CASE							:					Optional[int]="absolute"					,		__SCREAMING_SNAKE_CASE							:					int=0					,		__SCREAMING_SNAKE_CASE							:					str=2					,		__SCREAMING_SNAKE_CASE							:					Dict=3					,		**__SCREAMING_SNAKE_CASE							:					List[Any]					,		):


           '''simple docstring'''

           super().__init__(pad_token_id=__SCREAMING_SNAKE_CASE					,		bos_token_id=__SCREAMING_SNAKE_CASE					,		eos_token_id=__SCREAMING_SNAKE_CASE					,		**__SCREAMING_SNAKE_CASE)

           __a							=    vocab_size
           __a							=    embedding_size
           __a							=    hidden_size
           __a							=    num_hidden_layers
           __a							=    num_hidden_groups
           __a							=    num_attention_heads
           __a							=    inner_group_num
           __a							=    hidden_act
           __a							=    intermediate_size
           __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							=    classifier_dropout_prob
           __a							=    position_embedding_type


class    _A	(     __UpperCAmelCase   ):



       @property
       def 		_lowerCamelCase      (		self							:					List[str]):


           '''simple docstring'''

           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),
               ])










# Lint as: python3
import itertools
import os
import re


__snake_case						:int						=					re.compile(r'''([A-Z]+)([A-Z][a-z])''')
__snake_case						:List[Any]						=					re.compile(r'''([a-z\d])([A-Z])''')

__snake_case						:Dict						=					re.compile(r'''(?<!_)_(?!_)''')
__snake_case						:Optional[int]						=					re.compile(r'''(_{2,})''')

__snake_case						:Optional[Any]						=					r'''^\w+(\.\w+)*$'''

__snake_case						:Union[str, Any]						=					r'''<>:/\|?*'''





def 					__snake_case     (      _UpperCAmelCase    ):
    __a							=    _uppercase_uppercase_re.sub(R'''\1_\2'''       ,			_UpperCAmelCase    )
    __a							=    _lowercase_uppercase_re.sub(R'''\1_\2'''       ,			_UpperCAmelCase    )
    return name.lower()





def 					__snake_case     (      _UpperCAmelCase    ):
    __a							=    _single_underscore_re.split(_UpperCAmelCase    )
    __a							=    [_multiple_underscores_re.split(_UpperCAmelCase    ) for n in name]
    return "".join(n.capitalize() for n in itertools.chain.from_iterable(_UpperCAmelCase    ) if n != ''''''    )





def 					__snake_case     (      _UpperCAmelCase    ):
    if os.path.basename(_UpperCAmelCase    ) != name:
        raise ValueError(f'Should be a dataset name, not a path: {name}'    )
    return camelcase_to_snakecase(_UpperCAmelCase    )





def 					__snake_case     (      _UpperCAmelCase       ,			_UpperCAmelCase    ):
    if os.path.basename(_UpperCAmelCase    ) != name:
        raise ValueError(f'Should be a dataset name, not a path: {name}'    )
    if not re.match(_split_re       ,			_UpperCAmelCase    ):
        raise ValueError(f'Split name should match \'{_split_re}\'\' but got \'{split}\'.'    )
    return f'{filename_prefix_for_name(_UpperCAmelCase    )}-{split}'





def 					__snake_case     (      _UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase=None    ):
    __a							=    filename_prefix_for_split(_UpperCAmelCase       ,			_UpperCAmelCase    )
    if filetype_suffix:
        prefix += f'.{filetype_suffix}'
    __a							=    os.path.join(_UpperCAmelCase       ,			_UpperCAmelCase    )
    return f'{filepath}*'





def 					__snake_case     (      _UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase=None       ,			_UpperCAmelCase=None    ):
    __a							=    filename_prefix_for_split(_UpperCAmelCase       ,			_UpperCAmelCase    )
    __a							=    os.path.join(_UpperCAmelCase       ,			_UpperCAmelCase    )

    if shard_lengths:
        __a							=    len(_UpperCAmelCase    )
        __a							=    [f'{prefix}-{shard_id:05d}-of-{num_shards:05d}' for shard_id in range(_UpperCAmelCase    )]
        if filetype_suffix:
            __a							=    [filename + f'.{filetype_suffix}' for filename in filenames]
        return filenames
    else:
        __a							=    prefix
        if filetype_suffix:
            filename += f'.{filetype_suffix}'
        return [filename]





