
"""simple docstring"""






from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxSeqaSeqConfigWithPast
from ...utils import logging


__UpperCAmelCase 					=    logging.get_logger(__name__)




class      _SCREAMING_SNAKE_CASE   (     __SCREAMING_SNAKE_CASE				):
			UpperCAmelCase_    :Any												=		"mt5"
			UpperCAmelCase_    :Any												=		["past_key_values"]






			def __init__(   self			,  __A=25_0112			,  __A=512			,  __A=64			,  __A=1024			,  __A=8			,  __A=None			,  __A=6			,  __A=32			,  __A=128			,  __A=0.1			,  __A=1E-6			,  __A=1.0			,  __A="gated-gelu"			,  __A=True			,  __A=True			,  __A="T5Tokenizer"			,  __A=False			,  __A=0			,  __A=1			,  __A=0			,  **__A			,  )     ->	Dict:
						super().__init__(
						    is_encoder_decoder=__UpperCAmelCase			,  tokenizer_class=__UpperCAmelCase			,  tie_word_embeddings=__UpperCAmelCase			,  pad_token_id=__UpperCAmelCase			,  eos_token_id=__UpperCAmelCase			,  decoder_start_token_id=__UpperCAmelCase			,  **__UpperCAmelCase			,  )
						lowerCAmelCase_       :Any     	=    vocab_size
						lowerCAmelCase_       :str     	=    d_model
						lowerCAmelCase_       :Dict     	=    d_kv
						lowerCAmelCase_       :Tuple     	=    d_ff
						lowerCAmelCase_       :Union[str, Any]     	=    num_layers
						lowerCAmelCase_       :Any     	=    (
						    num_decoder_layers if num_decoder_layers is not None else self.num_layers
						)  # default = symmetry
						lowerCAmelCase_       :Optional[Any]     	=    num_heads
						lowerCAmelCase_       :List[str]     	=    relative_attention_num_buckets
						lowerCAmelCase_       :Tuple     	=    relative_attention_max_distance
						lowerCAmelCase_       :List[Any]     	=    dropout_rate
						lowerCAmelCase_       :Optional[int]     	=    layer_norm_epsilon
						lowerCAmelCase_       :List[Any]     	=    initializer_factor
						lowerCAmelCase_       :Any     	=    feed_forward_proj
						lowerCAmelCase_       :List[Any]     	=    use_cache

						lowerCAmelCase_       :List[Any]     	=    self.feed_forward_proj.split("""-"""			)
						lowerCAmelCase_       :Tuple     	=    act_info[-1]
						lowerCAmelCase_       :Union[str, Any]     	=    act_info[0] == """gated"""

						if len(__UpperCAmelCase			) > 1 and act_info[0] != "gated" or len(__UpperCAmelCase			) > 2:
									raise ValueError(
									    f"""`feed_forward_proj`: {feed_forward_proj} is not a valid activation function of the dense layer."""
									    """Please make sure `feed_forward_proj` is of the format `gated-{ACT_FN}` or `{ACT_FN}`, e.g. """
									    """\'gated-gelu\' or \'relu\'"""			)

						# for backwards compatibility
						if feed_forward_proj == "gated-gelu":
									lowerCAmelCase_       :int     	=    """gelu_new"""






			@property
			def 					__lowerCAmelCase					(   self			)     ->	Optional[Any]:
						return self.d_model






			@property
			def 					__lowerCAmelCase					(   self			)     ->	List[Any]:
						return self.num_heads






			@property
			def 					__lowerCAmelCase					(   self			)     ->	Dict:
						return self.num_layers




class      _SCREAMING_SNAKE_CASE   (     __SCREAMING_SNAKE_CASE				):






			@property
			# Copied from transformers.models.t5.configuration_t5.T5OnnxConfig.inputs
			def 					__lowerCAmelCase					(   self			)     ->	List[Any]:
						lowerCAmelCase_       :str     	=    {
						    """input_ids""": {0: """batch""", 1: """encoder_sequence"""},
						    """attention_mask""": {0: """batch""", 1: """encoder_sequence"""},
						}
						if self.use_past:
									lowerCAmelCase_       :List[Any]     	=    """past_encoder_sequence + sequence"""
									lowerCAmelCase_       :Any     	=    {0: """batch"""}
									lowerCAmelCase_       :Optional[int]     	=    {0: """batch""", 1: """past_decoder_sequence + sequence"""}
						else:
									lowerCAmelCase_       :Optional[int]     	=    {0: """batch""", 1: """decoder_sequence"""}
									lowerCAmelCase_       :int     	=    {0: """batch""", 1: """decoder_sequence"""}

						if self.use_past:
									self.fill_with_past_key_values_(__UpperCAmelCase			,  direction="""inputs"""			)

						return common_inputs






			@property
			# Copied from transformers.models.t5.configuration_t5.T5OnnxConfig.default_onnx_opset
			def 					__lowerCAmelCase					(   self			)     ->	Dict:
						return 13






			@property
			def 					__lowerCAmelCase					(   self			)     ->	Dict:
						return 5E-4








"""simple docstring"""

UpperCamelCase      :							int          =					1_0**8






def 				A		(							snake_case :int						) ->      bool:
 if n % 1_0 == 0:
  return False
 __UpperCamelCase							    =			str(snake_case						)
 return s == s[::-1]






def 				A		(							) ->      int:
 __UpperCamelCase							    =			set()
 __UpperCamelCase							    =			1
 __UpperCamelCase							    =			5
 while sum_squares < LIMIT:
  __UpperCamelCase							    =			first_square + 1
  while sum_squares < LIMIT:
   if is_palindrome(snake_case						):
    answer.add(snake_case						)
   last_square += 1
   sum_squares += last_square**2
  first_square += 1
  __UpperCamelCase							    =			first_square**2 + (first_square + 1) ** 2

 return sum(snake_case						)


if __name__ == "__main__":
      print(solution())



