
'''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         =    {
    """kssteven/ibert-roberta-base""": """https://huggingface.co/kssteven/ibert-roberta-base/resolve/main/config.json""",
    """kssteven/ibert-roberta-large""": """https://huggingface.co/kssteven/ibert-roberta-large/resolve/main/config.json""",
    """kssteven/ibert-roberta-large-mnli""": (
        """https://huggingface.co/kssteven/ibert-roberta-large-mnli/resolve/main/config.json"""
    ),
}







class UpperCAmelCase__	( _lowerCamelCase	):





  """simple docstring"""

  __UpperCAmelCase				:				Optional[int]   =					'''ibert'''


  def __init__(		self      :     int							,_a      :     Dict=3_0522							,_a      :     List[Any]=768							,_a      :     Union[str, Any]=12							,_a      :     str=12							,_a      :     int=3072							,_a      :     List[str]="gelu"							,_a      :     Tuple=0.1							,_a      :     List[str]=0.1							,_a      :     Tuple=512							,_a      :     List[Any]=2							,_a      :     Tuple=0.02							,_a      :     Union[str, Any]=1E-12							,_a      :     Optional[int]=1							,_a      :     int=0							,_a      :     int=2							,_a      :     int="absolute"							,_a      :     Optional[Any]=False							,_a      :     List[Any]="none"							,**_a      :     int							,):


     '''simple docstring'''






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

     _a				:	str			=   vocab_size
     _a				:	List[str]			=   hidden_size
     _a				:	int			=   num_hidden_layers
     _a				:	List[str]			=   num_attention_heads
     _a				:	Tuple			=   hidden_act
     _a				:	int			=   intermediate_size
     _a				:	Any			=   hidden_dropout_prob
     _a				:	Tuple			=   attention_probs_dropout_prob
     _a				:	Union[str, Any]			=   max_position_embeddings
     _a				:	Dict			=   type_vocab_size
     _a				:	str			=   initializer_range
     _a				:	str			=   layer_norm_eps
     _a				:	Optional[Any]			=   position_embedding_type
     _a				:	List[str]			=   quant_mode
     _a				:	int			=   force_dequant







class UpperCAmelCase__	( _lowerCamelCase	):





  """simple docstring"""

  @property
  def   __lowercase		(		self      :     Dict       ):


     '''simple docstring'''






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








'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


A_							: Optional[Any]						 =	{
    """configuration_llama""": ["""LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LlamaConfig"""],
}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   A_							: List[str]						 =	["""LlamaTokenizer"""]

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   A_							: Dict						 =	["""LlamaTokenizerFast"""]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   A_							: Optional[int]						 =	[
       """LlamaForCausalLM""",
       """LlamaModel""",
       """LlamaPreTrainedModel""",
       """LlamaForSequenceClassification""",
   ]


if TYPE_CHECKING:
   from .configuration_llama import LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP, LlamaConfig

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_llama import LlamaTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_llama_fast import LlamaTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_llama import LlamaForCausalLM, LlamaForSequenceClassification, LlamaModel, LlamaPreTrainedModel


else:
   import sys

   A_							: Any						 =	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



