

import copy

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


A__							=				logging.get_logger(__name__)

A__							=				{}

class 					__UpperCamelCase					(       _snake_case      ):
	_lowercase	: Any												=	"""fsmt_decoder"""







	def __init__( self:			Union[str, Any]	,			__UpperCamelCase:			Any=0	,			__UpperCamelCase:			int=0   ):

						'''simple docstring'''





						super().__init__()
						__magic_name__				=     vocab_size
						__magic_name__				=     bos_token_id




class 					__UpperCamelCase					(       _snake_case      ):
	_lowercase	: List[str]												=	"""fsmt"""
	_lowercase	: Optional[Any]												=	{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}







	def __init__( self:			Dict	,			__UpperCamelCase:			str=["en", "de"]	,			__UpperCamelCase:			Dict=4_20_24	,			__UpperCamelCase:			str=4_20_24	,			__UpperCamelCase:			Optional[int]="relu"	,			__UpperCamelCase:			Tuple=10_24	,			__UpperCamelCase:			Tuple=2_00	,			__UpperCamelCase:			Optional[int]=10_24	,			__UpperCamelCase:			int=40_96	,			__UpperCamelCase:			Optional[Any]=12	,			__UpperCamelCase:			Any=16	,			__UpperCamelCase:			Union[str, Any]=0.0	,			__UpperCamelCase:			List[str]=40_96	,			__UpperCamelCase:			Optional[int]=12	,			__UpperCamelCase:			int=16	,			__UpperCamelCase:			Dict=0.0	,			__UpperCamelCase:			str=0.0	,			__UpperCamelCase:			Optional[Any]=0.1	,			__UpperCamelCase:			Any=0.0	,			__UpperCamelCase:			Optional[Any]=0.02	,			__UpperCamelCase:			Tuple=2	,			__UpperCamelCase:			Tuple=True	,			__UpperCamelCase:			Dict=True	,			__UpperCamelCase:			Optional[Any]=False	,			__UpperCamelCase:			Any=5	,			__UpperCamelCase:			Optional[Any]=1.0	,			__UpperCamelCase:			Optional[int]=False	,			__UpperCamelCase:			Optional[int]=True	,			__UpperCamelCase:			Dict=1	,			__UpperCamelCase:			Union[str, Any]=0	,			__UpperCamelCase:			str=2	,			__UpperCamelCase:			List[str]=2	,			**__UpperCamelCase:			Any	,			):

						'''simple docstring'''





						__magic_name__				=     langs
						__magic_name__				=     src_vocab_size
						__magic_name__				=     tgt_vocab_size
						__magic_name__				=     d_model  # encoder_embed_dim and decoder_embed_dim

						__magic_name__				=     encoder_ffn_dim
						__magic_name__				=     encoder_layers
						__magic_name__				=     encoder_attention_heads
						__magic_name__				=     encoder_layerdrop
						__magic_name__				=     decoder_layerdrop
						__magic_name__				=     decoder_ffn_dim
						__magic_name__				=     decoder_layers
						__magic_name__				=     decoder_attention_heads
						__magic_name__				=     max_position_embeddings
						__magic_name__				=     init_std  # Normal(0, this parameter)
						__magic_name__				=     activation_function

						__magic_name__				=     DecoderConfig(vocab_size=snake_case_	,			bos_token_id=snake_case_   )
						if "decoder" in common_kwargs:
											del common_kwargs["decoder"]

						__magic_name__				=     scale_embedding  # scale factor will be sqrt(d_model) if True

						# 3 Types of Dropout
						__magic_name__				=     attention_dropout
						__magic_name__				=     activation_dropout
						__magic_name__				=     dropout

						__magic_name__				=     use_cache
						super().__init__(
						    pad_token_id=snake_case_	,			bos_token_id=snake_case_	,			eos_token_id=snake_case_	,			decoder_start_token_id=snake_case_	,			is_encoder_decoder=snake_case_	,			tie_word_embeddings=snake_case_	,			forced_eos_token_id=snake_case_	,			max_length=snake_case_	,			num_beams=snake_case_	,			length_penalty=snake_case_	,			early_stopping=snake_case_	,			**snake_case_	,			)







	def 						_SCREAMING_SNAKE_CASE				( self:			Any   ):

						'''simple docstring'''





						__magic_name__				=     copy.deepcopy(self.__dict__   )
						__magic_name__				=     self.decoder.to_dict()
						__magic_name__				=     self.__class__.model_type
						return output






"""simple docstring"""
from ..utils import requires_backends


_a   :      List[str]       =				None






class   _UpperCAmelCase					:
    def __init__(     self    ,     *snake_case_    ,     **snake_case_  ):
      requires_backends(self    ,     ["detectron2"]  )


    @classmethod
    def        lowerCamelCase__						(     cls    ,     *snake_case_    ,     **snake_case_  ):
      requires_backends(cls    ,     ["detectron2"]  )

