

"""simple docstring"""




from typing import Callable, Optional, Union

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


SCREAMING_SNAKE_CASE_     :			List[Any]	  =			logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_     :			str	  =			{
    '''microsoft/xprophetnet-large-wiki100-cased''': (
        '''https://huggingface.co/microsoft/xprophetnet-large-wiki100-cased/resolve/main/config.json'''
    ),
}


class 		_A       (			__lowerCAmelCase					):
      __a								=	'''xlm-prophetnet'''
      __a								=	['''past_key_values''']
      __a								=	{
          '''num_attention_heads''': '''num_encoder_attention_heads''',
      }





      def __init__(  self    ,						SCREAMING_SNAKE_CASE__ = 0.1    ,						SCREAMING_SNAKE_CASE__ = "gelu"    ,						SCREAMING_SNAKE_CASE__ = 30522    ,						SCREAMING_SNAKE_CASE__ = 1024    ,						SCREAMING_SNAKE_CASE__ = 4096    ,						SCREAMING_SNAKE_CASE__ = 12    ,						SCREAMING_SNAKE_CASE__ = 16    ,						SCREAMING_SNAKE_CASE__ = 4096    ,						SCREAMING_SNAKE_CASE__ = 12    ,						SCREAMING_SNAKE_CASE__ = 16    ,						SCREAMING_SNAKE_CASE__ = 0.1    ,						SCREAMING_SNAKE_CASE__ = 0.1    ,						SCREAMING_SNAKE_CASE__ = 512    ,						SCREAMING_SNAKE_CASE__ = 0.02    ,						SCREAMING_SNAKE_CASE__ = True    ,						SCREAMING_SNAKE_CASE__ = True    ,						SCREAMING_SNAKE_CASE__ = 0    ,						SCREAMING_SNAKE_CASE__ = 2    ,						SCREAMING_SNAKE_CASE__ = 32    ,						SCREAMING_SNAKE_CASE__ = 128    ,						SCREAMING_SNAKE_CASE__ = False    ,						SCREAMING_SNAKE_CASE__ = 0.0    ,						SCREAMING_SNAKE_CASE__ = True    ,						SCREAMING_SNAKE_CASE__ = 0    ,						SCREAMING_SNAKE_CASE__ = 1    ,						SCREAMING_SNAKE_CASE__ = 2    ,						**SCREAMING_SNAKE_CASE__    ,						)   ->					Optional[Any]:
         lowerCamelCase__						=			vocab_size
         lowerCamelCase__						=			hidden_size
         lowerCamelCase__						=			encoder_ffn_dim
         lowerCamelCase__						=			num_encoder_layers
         lowerCamelCase__						=			num_encoder_attention_heads
         lowerCamelCase__						=			decoder_ffn_dim
         lowerCamelCase__						=			num_decoder_layers
         lowerCamelCase__						=			num_decoder_attention_heads
         lowerCamelCase__						=			max_position_embeddings
         lowerCamelCase__						=			init_std  # Normal(0, this parameter)
         lowerCamelCase__						=			activation_function

         # parameters for xlmprophetnet
         lowerCamelCase__						=			ngram
         lowerCamelCase__						=			num_buckets
         lowerCamelCase__						=			relative_max_distance
         lowerCamelCase__						=			disable_ngram_loss
         lowerCamelCase__						=			eps

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

         lowerCamelCase__						=			use_cache

         super().__init__(
             pad_token_id=lowerCAmelCase_    ,						bos_token_id=lowerCAmelCase_    ,						eos_token_id=lowerCAmelCase_    ,						is_encoder_decoder=lowerCAmelCase_    ,						add_cross_attention=lowerCAmelCase_    ,						decoder_start_token_id=lowerCAmelCase_    ,						**lowerCAmelCase_    ,						)





      @property
      def 					_lowerCamelCase  (  self		)   ->					int:
         return self.num_encoder_layers + self.num_decoder_layers





      @num_hidden_layers.setter
      def 					_lowerCamelCase  (  self    ,						SCREAMING_SNAKE_CASE__		)   ->					Optional[Any]:
         raise NotImplementedError(
             "This model does not support the setting of `num_hidden_layers`. Please set `num_encoder_layers` and"
             " `num_decoder_layers`."		)







"""simple docstring"""




def 	UpperCAmelCase__   (				A__   )      ->      str:




   """simple docstring"""
   return " ".join(input_str.split()[::-1]   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()




