


"""simple docstring"""







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


lowerCamelCase_   :   Dict									=  logging.get_logger(__name__)

lowerCamelCase_   :   List[Any]									=  {
    """facebook/nllb-moe-54B""": """https://huggingface.co/facebook/nllb-moe-54b/resolve/main/config.json""",
}






class       __A				(       _SCREAMING_SNAKE_CASE			):






 """simple docstring"""




 __lowerCAmelCase 					=  "nllb-moe"
 __lowerCAmelCase 					=  ["past_key_values"]
 __lowerCAmelCase 					=  {"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}


 def __init__(		self ,    __A=12_8112 ,    __A=1024 ,    __A=12 ,    __A=4096 ,    __A=16 ,    __A=12 ,    __A=4096 ,    __A=16 ,    __A=0.05 ,    __A=0.05 ,    __A=True ,    __A=True ,    __A="relu" ,    __A=1024 ,    __A=0.1 ,    __A=0.1 ,    __A=0.0 ,    __A=0.02 ,    __A=2 ,    __A=True ,    __A=False ,    __A="float32" ,    __A=False ,    __A=128 ,    __A=64 ,    __A=4 ,    __A=4 ,    __A=0.001 ,    __A=0.001 ,    __A="all" ,    __A=False ,    __A=False ,    __A=1.0 ,    __A=0.2 ,    __A=1 ,    __A=0 ,    __A=2 ,    __A=False ,    **__A ,    )					->     List[Any]:
     a 		=vocab_size
     a 		=max_position_embeddings
     a 		=d_model
     a 		=encoder_ffn_dim
     a 		=encoder_layers
     a 		=encoder_attention_heads
     a 		=decoder_ffn_dim
     a 		=decoder_layers
     a 		=decoder_attention_heads
     a 		=dropout
     a 		=attention_dropout
     a 		=activation_dropout
     a 		=activation_function
     a 		=init_std
     a 		=encoder_layerdrop
     a 		=decoder_layerdrop
     a 		=use_cache
     a 		=encoder_layers
     a 		=scale_embedding  # scale factor will be sqrt(d_model) if True
     a 		=router_z_loss_coef
     a 		=router_aux_loss_coef
     a 		=decoder_sparse_step
     a 		=encoder_sparse_step
     a 		=num_experts
     a 		=expert_capacity
     a 		=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}'''						)
     a 		=router_dtype

     a 		=router_ignore_padding_tokens
     a 		=batch_prioritized_routing
     a 		=second_expert_policy
     a 		=normalize_router_prob_before_dropping
     a 		=moe_eval_capacity_token_fraction
     a 		=moe_token_dropout
     a 		=output_router_logits
     super().__init__(
         pad_token_id=__A ,    bos_token_id=__A ,    eos_token_id=__A ,    is_encoder_decoder=__A ,    decoder_start_token_id=__A ,    **__A ,    )



'''simple docstring'''

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


lowerCamelCase							:   Tuple  						=	logging.get_logger(__name__)

lowerCamelCase							:   Dict  						=	{
    'microsoft/cvt-13': 'https://huggingface.co/microsoft/cvt-13/resolve/main/config.json',
    # See all Cvt models at https://huggingface.co/models?filter=cvt
}
class   __lowerCAmelCase						(lowercase_     ):





      '''simple docstring'''






      lowerCAmelCase__					:     Tuple  					=							"""cvt"""



      def __init__(self    :    int   ,						UpperCamelCase    :    List[Any]=3   ,						UpperCamelCase    :    int=[7, 3, 3]   ,						UpperCamelCase    :    str=[4, 2, 2]   ,						UpperCamelCase    :    Dict=[2, 1, 1]   ,						UpperCamelCase    :    Dict=[64, 192, 384]   ,						UpperCamelCase    :    Dict=[1, 3, 6]   ,						UpperCamelCase    :    Dict=[1, 2, 10]   ,						UpperCamelCase    :    Any=[4.0, 4.0, 4.0]   ,						UpperCamelCase    :    Optional[int]=[0.0, 0.0, 0.0]   ,						UpperCamelCase    :    Optional[int]=[0.0, 0.0, 0.0]   ,						UpperCamelCase    :    int=[0.0, 0.0, 0.1]   ,						UpperCamelCase    :    Any=[True, True, True]   ,						UpperCamelCase    :    int=[False, False, True]   ,						UpperCamelCase    :    Union[str, Any]=["dw_bn", "dw_bn", "dw_bn"]   ,						UpperCamelCase    :    Optional[int]=[3, 3, 3]   ,						UpperCamelCase    :    Tuple=[1, 1, 1]   ,						UpperCamelCase    :    Any=[2, 2, 2]   ,						UpperCamelCase    :    Dict=[1, 1, 1]   ,						UpperCamelCase    :    List[str]=[1, 1, 1]   ,						UpperCamelCase    :    str=0.02   ,						UpperCamelCase    :    int=1E-12   ,						**UpperCamelCase    :    Union[str, Any]   ,						):

             '''simple docstring'''







             super().__init__(**UpperCamelCase )
             lowercase__      			= num_channels
             lowercase__      			= patch_sizes
             lowercase__      			= patch_stride
             lowercase__      			= patch_padding
             lowercase__      			= embed_dim
             lowercase__      			= num_heads
             lowercase__      			= depth
             lowercase__      			= mlp_ratio
             lowercase__      			= attention_drop_rate
             lowercase__      			= drop_rate
             lowercase__      			= drop_path_rate
             lowercase__      			= qkv_bias
             lowercase__      			= cls_token
             lowercase__      			= qkv_projection_method
             lowercase__      			= kernel_qkv
             lowercase__      			= padding_kv
             lowercase__      			= stride_kv
             lowercase__      			= padding_q
             lowercase__      			= stride_q
             lowercase__      			= initializer_range
             lowercase__      			= layer_norm_eps




