





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


UpperCAmelCase_ 							=       logging.get_logger(__name__)

UpperCAmelCase_ 							=       {
    "abeja/gpt-neox-japanese-2.7b": "https://huggingface.co/abeja/gpt-neox-japanese-2.7b/resolve/main/config.json",
}
class      UpperCamelCase_						(					SCREAMING_SNAKE_CASE__   ):
					lowerCAmelCase_							=		'gpt_neox_japanese'




					def __init__(						self			,  lowerCAmelCase_=3_2000			,  lowerCAmelCase_=2560			,  lowerCAmelCase_=32			,  lowerCAmelCase_=32			,  lowerCAmelCase_=4			,  lowerCAmelCase_="gelu"			,  lowerCAmelCase_=1.00			,  lowerCAmelCase_=1_0000			,  lowerCAmelCase_=2048			,  lowerCAmelCase_=0.02			,  lowerCAmelCase_=1E-5			,  lowerCAmelCase_=True			,  lowerCAmelCase_=3_1996			,  lowerCAmelCase_=3_1999			,  lowerCAmelCase_=0.1			,  lowerCAmelCase_=0.0			,  **lowerCAmelCase_			,  )						->							Optional[int]:
										super().__init__(bos_token_id=a_			,  eos_token_id=a_			,  **a_					)
										_snake_case													=			vocab_size
										_snake_case													=			max_position_embeddings
										_snake_case													=			hidden_size
										_snake_case													=			num_hidden_layers
										_snake_case													=			num_attention_heads
										_snake_case													=			intermediate_multiple_size
										_snake_case													=			hidden_act
										_snake_case													=			rotary_pct
										_snake_case													=			rotary_emb_base
										_snake_case													=			initializer_range
										_snake_case													=			layer_norm_eps
										_snake_case													=			use_cache
										_snake_case													=			attention_dropout
										_snake_case													=			hidden_dropout










from collections.abc import Sequence





def   lowerCamelCase__       (       UpperCamelCase__     :    Sequence[float]    ,      UpperCamelCase__     :    bool = False  )     ->	float:



					'''simple docstring'''




					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(UpperCamelCase__    ,      UpperCamelCase__  )

					return max_sum


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

					testmod()

					UpperCAmelCase_ 							=       [-2, 1, -3, 4, -1, 2, 1, -5, 4]
					print(F"{max_subarray_sum(nums) = }")



