



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


UpperCAmelCase							 =					logging.get_logger(__name__)

UpperCAmelCase							 =					{
    """funnel-transformer/small""": """https://huggingface.co/funnel-transformer/small/resolve/main/config.json""",
    """funnel-transformer/small-base""": """https://huggingface.co/funnel-transformer/small-base/resolve/main/config.json""",
    """funnel-transformer/medium""": """https://huggingface.co/funnel-transformer/medium/resolve/main/config.json""",
    """funnel-transformer/medium-base""": """https://huggingface.co/funnel-transformer/medium-base/resolve/main/config.json""",
    """funnel-transformer/intermediate""": (
        """https://huggingface.co/funnel-transformer/intermediate/resolve/main/config.json"""
    ),
    """funnel-transformer/intermediate-base""": (
        """https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/config.json"""
    ),
    """funnel-transformer/large""": """https://huggingface.co/funnel-transformer/large/resolve/main/config.json""",
    """funnel-transformer/large-base""": """https://huggingface.co/funnel-transformer/large-base/resolve/main/config.json""",
    """funnel-transformer/xlarge""": """https://huggingface.co/funnel-transformer/xlarge/resolve/main/config.json""",
    """funnel-transformer/xlarge-base""": """https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/config.json""",
}

class  __snake_case      (   SCREAMING_SNAKE_CASE):







							'''simple docstring'''






							UpperCamelCase__				:      int         =					"""funnel"""
							UpperCamelCase__				:      Optional[Any]         =					{
							    """hidden_size""": """d_model""",
							    """num_attention_heads""": """n_head""",
							}


							def __init__(							self  ,  a_=30_522  ,  a_=[4, 4, 4]  ,  a_=None  ,  a_=2  ,  a_=768  ,  a_=12  ,  a_=64  ,  a_=3_072  ,  a_="gelu_new"  ,  a_=0.1  ,  a_=0.1  ,  a_=0.0  ,  a_=0.1  ,  a_=None  ,  a_=1E-9  ,  a_="mean"  ,  a_="relative_shift"  ,  a_=True  ,  a_=True  ,  a_=True  ,  **a_  ,  ):
											a__				      =		vocab_size
											a__				      =		block_sizes
											a__				      =		[1] * len(a_		) if block_repeats is None else block_repeats
											assert len(a_		) == len(
											    self.block_repeats		), "`block_sizes` and `block_repeats` should have the same length."
											a__				      =		num_decoder_layers
											a__				      =		d_model
											a__				      =		n_head
											a__				      =		d_head
											a__				      =		d_inner
											a__				      =		hidden_act
											a__				      =		hidden_dropout
											a__				      =		attention_dropout
											a__				      =		activation_dropout
											a__				      =		initializer_range
											a__				      =		initializer_std
											a__				      =		layer_norm_eps
											assert pooling_type in [
											    "mean",
											    "max",
											], F'''Got {pooling_type} for `pooling_type` but only \'mean\' and \'max\' are supported.'''
											a__				      =		pooling_type
											assert attention_type in [
											    "relative_shift",
											    "factorized",
											], F'''Got {attention_type} for `attention_type` but only \'relative_shift\' and \'factorized\' are supported.'''
											a__				      =		attention_type
											a__				      =		separate_cls
											a__				      =		truncate_seq
											a__				      =		pool_q_only

											super().__init__(**a_		)


							@property
							def _a      (							self		):
											return sum(self.block_sizes		)


							@num_hidden_layers.setter
							def _a      (							self  ,  a_		):
											raise NotImplementedError(
											    """This model does not support the setting of `num_hidden_layers`. Please set `block_sizes`."""		)


							@property
							def _a      (							self		):
											return len(self.block_sizes		)







							@num_blocks.setter
							def _a      (							self  ,  a_		):
											raise NotImplementedError("""This model does not support the setting of `num_blocks`. Please set `block_sizes`."""		)






def 			A_      (	__a     :				int ,		__a     :				int		):

				"""simple docstring"""
				return abs(__a		) if a == 0 else greatest_common_divisor(b % a ,		__a		)

def 			A_      (	__a     :				int ,		__a     :				int		):

				"""simple docstring"""
				while y:  # --> when y=0 then loop will terminate and return x as final GCD.
								a__      ,			a__				      =		y, x % y
				return abs(__a		)

def 			A_      (	):

				"""simple docstring"""
				try:
								a__				      =		input("""Enter two integers separated by comma (,): """		).split(""","""		)
								a__				      =		int(nums[0]		)
								a__				      =		int(nums[1]		)
								print(
								    F'''greatest_common_divisor({num_a}, {num_a}) = '''
								    F'''{greatest_common_divisor(__a ,		__a		)}'''		)
								print(F'''By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(__a ,		__a		)}'''		)
				except (IndexError, UnboundLocalError, ValueError):
								print("""Wrong input"""		)


if __name__ == "__main__":
	main()

