
"""simple docstring"""





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


UpperCamelCase_       :    List[str]						      =			logging.get_logger(__name__)

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



class __lowerCAmelCase					(       _lowercase   ):




			"""simple docstring"""







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




			def __init__(					self    :       List[str]							, _snake_case    :       str=128_112							, _snake_case    :       Optional[Any]=1_024							, _snake_case    :       Tuple=12							, _snake_case    :       Any=4_096							, _snake_case    :       str=16							, _snake_case    :       Optional[Any]=12							, _snake_case    :       List[str]=4_096							, _snake_case    :       int=16							, _snake_case    :       Union[str, Any]=0.0_5							, _snake_case    :       List[Any]=0.0_5							, _snake_case    :       List[str]=True							, _snake_case    :       List[str]=True							, _snake_case    :       Tuple="relu"							, _snake_case    :       List[Any]=1_024							, _snake_case    :       Dict=0.1							, _snake_case    :       str=0.1							, _snake_case    :       Union[str, Any]=0.0							, _snake_case    :       List[str]=0.0_2							, _snake_case    :       Union[str, Any]=2							, _snake_case    :       List[Any]=True							, _snake_case    :       Union[str, Any]=False							, _snake_case    :       List[str]="float32"							, _snake_case    :       str=False							, _snake_case    :       Optional[int]=128							, _snake_case    :       List[Any]=64							, _snake_case    :       List[Any]=4							, _snake_case    :       int=4							, _snake_case    :       Tuple=0.0_0_1							, _snake_case    :       List[Any]=0.0_0_1							, _snake_case    :       Dict="all"							, _snake_case    :       Dict=False							, _snake_case    :       List[str]=False							, _snake_case    :       int=1.0							, _snake_case    :       List[str]=0.2							, _snake_case    :       str=1							, _snake_case    :       Dict=0							, _snake_case    :       Any=2							, _snake_case    :       Optional[int]=False							, **_snake_case    :       Dict							, )   ->			Dict:







								"""simple docstring"""
								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=_snake_case							, bos_token_id=_snake_case							, eos_token_id=_snake_case							, is_encoder_decoder=_snake_case							, decoder_start_token_id=_snake_case							, **_snake_case							, )






"""simple docstring"""





from ..utils import is_flax_available, is_torch_available


if is_torch_available():
		from .autoencoder_kl import AutoencoderKL
		from .controlnet import ControlNetModel
		from .dual_transformer_ad import DualTransformeraDModel
		from .modeling_utils import ModelMixin
		from .prior_transformer import PriorTransformer
		from .ta_film_transformer import TaFilmDecoder
		from .transformer_ad import TransformeraDModel
		from .unet_ad import UNetaDModel
		from .unet_ad import UNetaDModel
		from .unet_ad_condition import UNetaDConditionModel
		from .unet_ad_condition import UNetaDConditionModel
		from .vq_model import VQModel

if is_flax_available():
		from .controlnet_flax import FlaxControlNetModel
		from .unet_ad_condition_flax import FlaxUNetaDConditionModel
		from .vae_flax import FlaxAutoencoderKL




