
from collections.abc import Sequence






def 	a_		(	__lowercase       :     Sequence[float]	, __lowercase       :     bool = False			)			->  float:
			if not arr:
						return 0

			_snake_case          =      0 if allow_empty_subarrays else float('-inf'			)
			_snake_case          =      0.0
			for num in arr:
						_snake_case          =      max(0 if allow_empty_subarrays else num	, curr_sum + num			)
						_snake_case          =      max(__lowercase	, __lowercase			)

			return max_sum


if __name__ == "__main__":
			from doctest import testmod

			testmod()

			_lowerCamelCase	:    List[Any]          =      [-2, 1, -3, 4, -1, 2, 1, -5, 4]
			print(F'{max_subarray_sum(nums) = }')

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


_lowerCamelCase	:    Tuple          =      logging.get_logger(__name__)

_lowerCamelCase	:    Union[str, Any]          =      {
    '''google/canine-s''': '''https://huggingface.co/google/canine-s/resolve/main/config.json''',
    # See all CANINE models at https://huggingface.co/models?filter=canine
}




class        SCREAMING_SNAKE_CASE__					(     UpperCAmelCase ):





	'''simple docstring'''



	_UpperCAmelCase	:		Any          = "canine"



	def __init__(  self     :   int      ,  lowercase     :   Optional[int]=768      ,  lowercase     :   Tuple=12      ,  lowercase     :   Union[str, Any]=12      ,  lowercase     :   Optional[int]=3_072      ,  lowercase     :   Tuple="gelu"      ,  lowercase     :   Optional[Any]=0.1      ,  lowercase     :   Tuple=0.1      ,  lowercase     :   int=16_384      ,  lowercase     :   Optional[int]=16      ,  lowercase     :   Optional[int]=0.02      ,  lowercase     :   Optional[Any]=1E-12      ,  lowercase     :   Optional[Any]=0      ,  lowercase     :   Dict=0xE000      ,  lowercase     :   Optional[Any]=0xE001      ,  lowercase     :   Union[str, Any]=4      ,  lowercase     :   str=4      ,  lowercase     :   Optional[int]=8      ,  lowercase     :   List[str]=16_384      ,  lowercase     :   Union[str, Any]=128      ,  **lowercase     :   Optional[Any]      ,  ):


				'''simple docstring'''


				super().__init__(pad_token_id=lowercase      ,  bos_token_id=lowercase      ,  eos_token_id=lowercase      ,  **lowercase     )

				_snake_case          =      max_position_embeddings
				_snake_case          =      hidden_size
				_snake_case          =      num_hidden_layers
				_snake_case          =      num_attention_heads
				_snake_case          =      intermediate_size
				_snake_case          =      hidden_act
				_snake_case          =      hidden_dropout_prob
				_snake_case          =      attention_probs_dropout_prob
				_snake_case          =      initializer_range
				_snake_case          =      type_vocab_size
				_snake_case          =      layer_norm_eps

				# Character config:
				_snake_case          =      downsampling_rate
				_snake_case          =      upsampling_kernel_size
				_snake_case          =      num_hash_functions
				_snake_case          =      num_hash_buckets
				_snake_case          =      local_transformer_stride