





'''simple docstring'''






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


lowerCAmelCase       		=      logging.get_logger(__name__)

lowerCAmelCase       		=      {
    """facebook/nllb-moe-54B""": """https://huggingface.co/facebook/nllb-moe-54b/resolve/main/config.json""",
}
class 		lowerCamelCase  (      _A       ):
	snake_case_      =   "nllb-moe"
	snake_case_      =   ["past_key_values"]
	snake_case_      =   {"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}



	def __init__(   self		,      a_=128_112		,      a_=1_024		,      a_=12		,      a_=4_096		,      a_=16		,      a_=12		,      a_=4_096		,      a_=16		,      a_=0.05		,      a_=0.05		,      a_=True		,      a_=True		,      a_="relu"		,      a_=1_024		,      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_		,      ):
			lowerCAmelCase     :    List[str]						=   vocab_size
			lowerCAmelCase     :    Union[str, Any]						=   max_position_embeddings
			lowerCAmelCase     :    Dict						=   d_model
			lowerCAmelCase     :    int						=   encoder_ffn_dim
			lowerCAmelCase     :    int						=   encoder_layers
			lowerCAmelCase     :    Any						=   encoder_attention_heads
			lowerCAmelCase     :    List[Any]						=   decoder_ffn_dim
			lowerCAmelCase     :    Tuple						=   decoder_layers
			lowerCAmelCase     :    List[Any]						=   decoder_attention_heads
			lowerCAmelCase     :    List[Any]						=   dropout
			lowerCAmelCase     :    Tuple						=   attention_dropout
			lowerCAmelCase     :    Optional[int]						=   activation_dropout
			lowerCAmelCase     :    Any						=   activation_function
			lowerCAmelCase     :    List[str]						=   init_std
			lowerCAmelCase     :    str						=   encoder_layerdrop
			lowerCAmelCase     :    str						=   decoder_layerdrop
			lowerCAmelCase     :    Any						=   use_cache
			lowerCAmelCase     :    List[str]						=   encoder_layers
			lowerCAmelCase     :    str						=   scale_embedding  # scale factor will be sqrt(d_model) if True
			lowerCAmelCase     :    List[Any]						=   router_z_loss_coef
			lowerCAmelCase     :    Optional[int]						=   router_aux_loss_coef
			lowerCAmelCase     :    Dict						=   decoder_sparse_step
			lowerCAmelCase     :    int						=   encoder_sparse_step
			lowerCAmelCase     :    Any						=   num_experts
			lowerCAmelCase     :    Optional[Any]						=   expert_capacity
			lowerCAmelCase     :    str						=   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     :    Dict						=   batch_prioritized_routing
			lowerCAmelCase     :    str						=   second_expert_policy
			lowerCAmelCase     :    Tuple						=   normalize_router_prob_before_dropping
			lowerCAmelCase     :    Any						=   moe_eval_capacity_token_fraction
			lowerCAmelCase     :    Dict						=   moe_token_dropout
			lowerCAmelCase     :    List[Any]						=   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 ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
					if not (is_transformers_available() and is_torch_available()):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_torch_and_transformers_objects import KandinskyPipeline, KandinskyPriorPipeline
else:
					from .pipeline_kandinsky import KandinskyPipeline
					from .pipeline_kandinsky_imgaimg import KandinskyImgaImgPipeline
					from .pipeline_kandinsky_inpaint import KandinskyInpaintPipeline
					from .pipeline_kandinsky_prior import KandinskyPriorPipeline, KandinskyPriorPipelineOutput
					from .text_encoder import MultilingualCLIP



