



"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_UpperCAmelCase     	=			{
    """configuration_roformer""": ["""ROFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""", """RoFormerConfig""", """RoFormerOnnxConfig"""],
    """tokenization_roformer""": ["""RoFormerTokenizer"""],
}

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase     	=			["""RoFormerTokenizerFast"""]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase     	=			[
       """ROFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """RoFormerForCausalLM""",
       """RoFormerForMaskedLM""",
       """RoFormerForMultipleChoice""",
       """RoFormerForQuestionAnswering""",
       """RoFormerForSequenceClassification""",
       """RoFormerForTokenClassification""",
       """RoFormerLayer""",
       """RoFormerModel""",
       """RoFormerPreTrainedModel""",
       """load_tf_weights_in_roformer""",
   ]


try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase     	=			[
       """TF_ROFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """TFRoFormerForCausalLM""",
       """TFRoFormerForMaskedLM""",
       """TFRoFormerForMultipleChoice""",
       """TFRoFormerForQuestionAnswering""",
       """TFRoFormerForSequenceClassification""",
       """TFRoFormerForTokenClassification""",
       """TFRoFormerLayer""",
       """TFRoFormerModel""",
       """TFRoFormerPreTrainedModel""",
   ]


try:
   if not is_flax_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase     	=			[
       """FLAX_ROFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """FlaxRoFormerForMaskedLM""",
       """FlaxRoFormerForMultipleChoice""",
       """FlaxRoFormerForQuestionAnswering""",
       """FlaxRoFormerForSequenceClassification""",
       """FlaxRoFormerForTokenClassification""",
       """FlaxRoFormerModel""",
       """FlaxRoFormerPreTrainedModel""",
   ]


if TYPE_CHECKING:
   from .configuration_roformer import ROFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, RoFormerConfig, RoFormerOnnxConfig
   from .tokenization_roformer import RoFormerTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_roformer_fast import RoFormerTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_roformer import (
          ROFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          RoFormerForCausalLM,
          RoFormerForMaskedLM,
          RoFormerForMultipleChoice,
          RoFormerForQuestionAnswering,
          RoFormerForSequenceClassification,
          RoFormerForTokenClassification,
          RoFormerLayer,
          RoFormerModel,
          RoFormerPreTrainedModel,
          load_tf_weights_in_roformer,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_roformer import (
          TF_ROFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFRoFormerForCausalLM,
          TFRoFormerForMaskedLM,
          TFRoFormerForMultipleChoice,
          TFRoFormerForQuestionAnswering,
          TFRoFormerForSequenceClassification,
          TFRoFormerForTokenClassification,
          TFRoFormerLayer,
          TFRoFormerModel,
          TFRoFormerPreTrainedModel,
      )

   try:
      if not is_flax_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_flax_roformer import (
          FLAX_ROFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          FlaxRoFormerForMaskedLM,
          FlaxRoFormerForMultipleChoice,
          FlaxRoFormerForQuestionAnswering,
          FlaxRoFormerForSequenceClassification,
          FlaxRoFormerForTokenClassification,
          FlaxRoFormerModel,
          FlaxRoFormerPreTrainedModel,
      )


else:
   import sys

   _UpperCAmelCase     	=			_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)








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

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


_UpperCAmelCase     =			{
    """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	:				Any     						=					'albert'



  def __init__(						self :					Dict       ,		lowerCAmelCase :					List[str]=3_0000       ,		lowerCAmelCase :					List[Any]=128       ,		lowerCAmelCase :					List[str]=4096       ,		lowerCAmelCase :					str=12       ,		lowerCAmelCase :					str=1       ,		lowerCAmelCase :					Tuple=64       ,		lowerCAmelCase :					Dict=1_6384       ,		lowerCAmelCase :					int=1       ,		lowerCAmelCase :					str="gelu_new"       ,		lowerCAmelCase :					Dict=0       ,		lowerCAmelCase :					Optional[Any]=0       ,		lowerCAmelCase :					str=512       ,		lowerCAmelCase :					Optional[int]=2       ,		lowerCAmelCase :					List[Any]=0.0_2       ,		lowerCAmelCase :					Union[str, Any]=1E-12       ,		lowerCAmelCase :					Tuple=0.1       ,		lowerCAmelCase :					List[Any]="absolute"       ,		lowerCAmelCase :					List[Any]=0       ,		lowerCAmelCase :					int=2       ,		lowerCAmelCase :					Optional[int]=3       ,		**lowerCAmelCase :					int       ,		)     ->					Tuple:


     '''simple docstring'''




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

     SCREAMING_SNAKE_CASE_: List[str]     			=vocab_size
     SCREAMING_SNAKE_CASE_: Optional[int]     			=embedding_size
     SCREAMING_SNAKE_CASE_: Optional[int]     			=hidden_size
     SCREAMING_SNAKE_CASE_: Tuple     			=num_hidden_layers
     SCREAMING_SNAKE_CASE_: Any     			=num_hidden_groups
     SCREAMING_SNAKE_CASE_: List[Any]     			=num_attention_heads
     SCREAMING_SNAKE_CASE_: List[Any]     			=inner_group_num
     SCREAMING_SNAKE_CASE_: Optional[int]     			=hidden_act
     SCREAMING_SNAKE_CASE_: int     			=intermediate_size
     SCREAMING_SNAKE_CASE_: Any     			=hidden_dropout_prob
     SCREAMING_SNAKE_CASE_: Union[str, Any]     			=attention_probs_dropout_prob
     SCREAMING_SNAKE_CASE_: int     			=max_position_embeddings
     SCREAMING_SNAKE_CASE_: Any     			=type_vocab_size
     SCREAMING_SNAKE_CASE_: int     			=initializer_range
     SCREAMING_SNAKE_CASE_: List[Any]     			=layer_norm_eps
     SCREAMING_SNAKE_CASE_: Dict     			=classifier_dropout_prob
     SCREAMING_SNAKE_CASE_: int     			=position_embedding_type







class 					a	(  UpperCAmelCase__       ):



  @property
  def 	lowerCamelCase__       (						self :					Optional[int]		)     ->					Mapping[str, Mapping[int, str]]:


     '''simple docstring'''




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



