


from ...configuration_utils import PretrainedConfig
from ...utils import logging


__UpperCamelCase    :						Dict     =							logging.get_logger(__name__)

__UpperCamelCase    :						str     =							{
    'SCUT-DLVCLab/lilt-roberta-en-base': (
        'https://huggingface.co/SCUT-DLVCLab/lilt-roberta-en-base/resolve/main/config.json'
    ),
}



class 							_UpperCamelCase (						A						):

   '''simple docstring'''







   a_				:							Tuple    = "lilt"

   def __init__(  self  : List[str]       ,  _lowerCamelCase  : Tuple=3_0_5_2_2       ,  _lowerCamelCase  : Optional[Any]=7_6_8       ,  _lowerCamelCase  : Union[str, Any]=1_2       ,  _lowerCamelCase  : int=1_2       ,  _lowerCamelCase  : List[Any]=3_0_7_2       ,  _lowerCamelCase  : Any="gelu"       ,  _lowerCamelCase  : str=0.1       ,  _lowerCamelCase  : Optional[int]=0.1       ,  _lowerCamelCase  : Tuple=5_1_2       ,  _lowerCamelCase  : Any=2       ,  _lowerCamelCase  : int=0.02       ,  _lowerCamelCase  : List[str]=1E-12       ,  _lowerCamelCase  : str=0       ,  _lowerCamelCase  : Optional[int]="absolute"       ,  _lowerCamelCase  : Any=None       ,  _lowerCamelCase  : Optional[int]=4       ,  _lowerCamelCase  : Union[str, Any]=1_0_2_4       ,  **_lowerCamelCase  : List[Any]       ,  ):






         '''simple docstring'''



         super().__init__(pad_token_id=_lowerCamelCase       ,  **_lowerCamelCase							)

         __lowerCamelCase     :      int       						=						vocab_size
         __lowerCamelCase     :      List[Any]       						=						hidden_size
         __lowerCamelCase     :      List[str]       						=						num_hidden_layers
         __lowerCamelCase     :      int       						=						num_attention_heads
         __lowerCamelCase     :      Optional[Any]       						=						hidden_act
         __lowerCamelCase     :      Optional[int]       						=						intermediate_size
         __lowerCamelCase     :      Optional[int]       						=						hidden_dropout_prob
         __lowerCamelCase     :      Tuple       						=						attention_probs_dropout_prob
         __lowerCamelCase     :      Union[str, Any]       						=						max_position_embeddings
         __lowerCamelCase     :      Optional[Any]       						=						type_vocab_size
         __lowerCamelCase     :      Tuple       						=						initializer_range
         __lowerCamelCase     :      Dict       						=						layer_norm_eps
         __lowerCamelCase     :      List[str]       						=						position_embedding_type
         __lowerCamelCase     :      Any       						=						classifier_dropout
         __lowerCamelCase     :      List[Any]       						=						channel_shrink_ratio
         __lowerCamelCase     :      List[str]       						=						max_ad_position_embeddings







from ...configuration_utils import PretrainedConfig
from ...utils import logging


__UpperCamelCase    :						Tuple     =							logging.get_logger(__name__)

__UpperCamelCase    :						Any     =							{
    'facebook/nllb-moe-54B': 'https://huggingface.co/facebook/nllb-moe-54b/resolve/main/config.json',
}



class 							_UpperCamelCase (						A						):

   '''simple docstring'''







   a_				:							int    = "nllb-moe"
   a_				:							Optional[int]    = ["past_key_values"]
   a_				:							Optional[Any]    = {"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}

   def __init__(  self  : int       ,  _lowerCamelCase  : Union[str, Any]=1_2_8_1_1_2       ,  _lowerCamelCase  : List[str]=1_0_2_4       ,  _lowerCamelCase  : Optional[int]=1_2       ,  _lowerCamelCase  : int=4_0_9_6       ,  _lowerCamelCase  : Union[str, Any]=1_6       ,  _lowerCamelCase  : int=1_2       ,  _lowerCamelCase  : Optional[int]=4_0_9_6       ,  _lowerCamelCase  : Any=1_6       ,  _lowerCamelCase  : Any=0.05       ,  _lowerCamelCase  : List[Any]=0.05       ,  _lowerCamelCase  : Tuple=True       ,  _lowerCamelCase  : Any=True       ,  _lowerCamelCase  : Optional[int]="relu"       ,  _lowerCamelCase  : Dict=1_0_2_4       ,  _lowerCamelCase  : Optional[int]=0.1       ,  _lowerCamelCase  : Optional[int]=0.1       ,  _lowerCamelCase  : Optional[int]=0.0       ,  _lowerCamelCase  : List[Any]=0.02       ,  _lowerCamelCase  : List[str]=2       ,  _lowerCamelCase  : List[str]=True       ,  _lowerCamelCase  : Union[str, Any]=False       ,  _lowerCamelCase  : Optional[Any]="float32"       ,  _lowerCamelCase  : Union[str, Any]=False       ,  _lowerCamelCase  : Tuple=1_2_8       ,  _lowerCamelCase  : Dict=6_4       ,  _lowerCamelCase  : Any=4       ,  _lowerCamelCase  : List[Any]=4       ,  _lowerCamelCase  : str=0.001       ,  _lowerCamelCase  : Dict=0.001       ,  _lowerCamelCase  : Any="all"       ,  _lowerCamelCase  : Optional[Any]=False       ,  _lowerCamelCase  : List[Any]=False       ,  _lowerCamelCase  : Optional[Any]=1.0       ,  _lowerCamelCase  : List[str]=0.2       ,  _lowerCamelCase  : List[Any]=1       ,  _lowerCamelCase  : str=0       ,  _lowerCamelCase  : int=2       ,  _lowerCamelCase  : int=False       ,  **_lowerCamelCase  : List[str]       ,  ):






         '''simple docstring'''



         __lowerCamelCase     :      Optional[Any]       						=						vocab_size
         __lowerCamelCase     :      str       						=						max_position_embeddings
         __lowerCamelCase     :      int       						=						d_model
         __lowerCamelCase     :      Optional[Any]       						=						encoder_ffn_dim
         __lowerCamelCase     :      str       						=						encoder_layers
         __lowerCamelCase     :      Tuple       						=						encoder_attention_heads
         __lowerCamelCase     :      Union[str, Any]       						=						decoder_ffn_dim
         __lowerCamelCase     :      Dict       						=						decoder_layers
         __lowerCamelCase     :      Any       						=						decoder_attention_heads
         __lowerCamelCase     :      Union[str, Any]       						=						dropout
         __lowerCamelCase     :      Dict       						=						attention_dropout
         __lowerCamelCase     :      int       						=						activation_dropout
         __lowerCamelCase     :      Union[str, Any]       						=						activation_function
         __lowerCamelCase     :      Optional[int]       						=						init_std
         __lowerCamelCase     :      Union[str, Any]       						=						encoder_layerdrop
         __lowerCamelCase     :      Dict       						=						decoder_layerdrop
         __lowerCamelCase     :      List[str]       						=						use_cache
         __lowerCamelCase     :      Any       						=						encoder_layers
         __lowerCamelCase     :      List[Any]       						=						scale_embedding  # scale factor will be sqrt(d_model) if True
         __lowerCamelCase     :      Optional[Any]       						=						router_z_loss_coef
         __lowerCamelCase     :      Union[str, Any]       						=						router_aux_loss_coef
         __lowerCamelCase     :      Dict       						=						decoder_sparse_step
         __lowerCamelCase     :      Optional[int]       						=						encoder_sparse_step
         __lowerCamelCase     :      Any       						=						num_experts
         __lowerCamelCase     :      int       						=						expert_capacity
         __lowerCamelCase     :      Dict       						=						router_bias
         if router_dtype not in ["float32", "float16", "bfloat16"]:
               raise ValueError(F"""`router_dtype` must be one of 'float32', 'float16' or 'bfloat16', got {router_dtype}"""							)
         __lowerCamelCase     :      Tuple       						=						router_dtype

         __lowerCamelCase     :      Dict       						=						router_ignore_padding_tokens
         __lowerCamelCase     :      str       						=						batch_prioritized_routing
         __lowerCamelCase     :      List[str]       						=						second_expert_policy
         __lowerCamelCase     :      Tuple       						=						normalize_router_prob_before_dropping
         __lowerCamelCase     :      Dict       						=						moe_eval_capacity_token_fraction
         __lowerCamelCase     :      Optional[int]       						=						moe_token_dropout
         __lowerCamelCase     :      Dict       						=						output_router_logits
         super().__init__(
             pad_token_id=_lowerCamelCase       ,  bos_token_id=_lowerCamelCase       ,  eos_token_id=_lowerCamelCase       ,  is_encoder_decoder=_lowerCamelCase       ,  decoder_start_token_id=_lowerCamelCase       ,  **_lowerCamelCase       ,  )



