






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


__UpperCamelCase					:		List[str]	  =						logging.get_logger(__name__)

__UpperCamelCase					:		List[Any]	  =						{
    """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   __SCREAMING_SNAKE_CASE(	a_	):
							_UpperCAmelCase     =       "funnel"
							_UpperCAmelCase     =       {
							    "hidden_size": "d_model",
							    "num_attention_heads": "n_head",
							}
							def __init__(     self:      str       ,	UpperCamelCase:      Dict=3_05_22       ,	UpperCamelCase:      Optional[Any]=[4, 4, 4]       ,	UpperCamelCase:      List[str]=None       ,	UpperCamelCase:      int=2       ,	UpperCamelCase:      Tuple=7_68       ,	UpperCamelCase:      str=12       ,	UpperCamelCase:      Dict=64       ,	UpperCamelCase:      Tuple=30_72       ,	UpperCamelCase:      Tuple="gelu_new"       ,	UpperCamelCase:      Tuple=0.1       ,	UpperCamelCase:      int=0.1       ,	UpperCamelCase:      Dict=0.0       ,	UpperCamelCase:      Any=0.1       ,	UpperCamelCase:      Dict=None       ,	UpperCamelCase:      int=1e-9       ,	UpperCamelCase:      List[Any]="mean"       ,	UpperCamelCase:      Optional[int]="relative_shift"       ,	UpperCamelCase:      List[Any]=True       ,	UpperCamelCase:      Optional[int]=True       ,	UpperCamelCase:      List[Any]=True       ,	**UpperCamelCase:      int       ,	)		->		List[str]:
											snake_case__									=     vocab_size
											snake_case__									=     block_sizes
											snake_case__									=     [1] * len(UpperCamelCase						) if block_repeats is None else block_repeats
											assert len(UpperCamelCase						) == len(
											    self.block_repeats						), "`block_sizes` and `block_repeats` should have the same length."
											snake_case__									=     num_decoder_layers
											snake_case__									=     d_model
											snake_case__									=     n_head
											snake_case__									=     d_head
											snake_case__									=     d_inner
											snake_case__									=     hidden_act
											snake_case__									=     hidden_dropout
											snake_case__									=     attention_dropout
											snake_case__									=     activation_dropout
											snake_case__									=     initializer_range
											snake_case__									=     initializer_std
											snake_case__									=     layer_norm_eps
											assert pooling_type in [
											    "mean",
											    "max",
											], F'''Got {pooling_type} for `pooling_type` but only \'mean\' and \'max\' are supported.'''
											snake_case__									=     pooling_type
											assert attention_type in [
											    "relative_shift",
											    "factorized",
											], F'''Got {attention_type} for `attention_type` but only \'relative_shift\' and \'factorized\' are supported.'''
											snake_case__									=     attention_type
											snake_case__									=     separate_cls
											snake_case__									=     truncate_seq
											snake_case__									=     pool_q_only

											super().__init__(**UpperCamelCase						)
							@property
							def lowerCAmelCase_ (     self:      List[Any]						)		->		List[Any]:
											return sum(self.block_sizes						)
							@num_hidden_layers.setter
							def lowerCAmelCase_ (     self:      Optional[int]       ,	UpperCamelCase:      int						)		->		List[str]:
											raise NotImplementedError(
											    'This model does not support the setting of `num_hidden_layers`. Please set `block_sizes`.'						)
							@property
							def lowerCAmelCase_ (     self:      List[str]						)		->		List[str]:
											return len(self.block_sizes						)


							@num_blocks.setter
							def lowerCAmelCase_ (     self:      Dict       ,	UpperCamelCase:      Dict						)		->		int:
											raise NotImplementedError('This model does not support the setting of `num_blocks`. Please set `block_sizes`.'						)












from __future__ import annotations
def      a_ (      _A  )			->			bool:







				"""simple docstring"""
				return len(set(_A  )  ) == len(_A  )


if __name__ == "__main__":
							import doctest

							doctest.testmod()




