

"""simple docstring"""


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


__A						       =      logging.get_logger(__name__)

__A						       =      {}





class    snake_case     (    __snake_case  ):
				SCREAMING_SNAKE_CASE_       :				Optional[Any]       				=  """llama"""
				SCREAMING_SNAKE_CASE_       :				Optional[Any]       				=  ["""past_key_values"""]

				def __init__(     self							:    Optional[int]					,  UpperCamelCase__							:    Dict=3_2_0_0_0					,  UpperCamelCase__							:    Optional[Any]=4_0_9_6					,  UpperCamelCase__							:    Optional[Any]=1_1_0_0_8					,  UpperCamelCase__							:    Tuple=3_2					,  UpperCamelCase__							:    Optional[int]=3_2					,  UpperCamelCase__							:    Any=None					,  UpperCamelCase__							:    Optional[int]="silu"					,  UpperCamelCase__							:    Optional[Any]=2_0_4_8					,  UpperCamelCase__							:    Dict=0.02					,  UpperCamelCase__							:    Optional[Any]=1e-6					,  UpperCamelCase__							:    List[str]=True					,  UpperCamelCase__							:    int=0					,  UpperCamelCase__							:    Union[str, Any]=1					,  UpperCamelCase__							:    Optional[int]=2					,  UpperCamelCase__							:    int=1					,  UpperCamelCase__							:    str=False					,  UpperCamelCase__							:    Optional[Any]=None					,  **UpperCamelCase__							:    List[Any]					,  )->       int:



						'''simple docstring'''


						__lowerCAmelCase:	List[str]   				=      vocab_size
						__lowerCAmelCase:	Union[str, Any]   				=      max_position_embeddings
						__lowerCAmelCase:	Optional[int]   				=      hidden_size
						__lowerCAmelCase:	str   				=      intermediate_size
						__lowerCAmelCase:	List[str]   				=      num_hidden_layers
						__lowerCAmelCase:	int   				=      num_attention_heads

						# for backward compatibility
						if num_key_value_heads is None:
								__lowerCAmelCase:	List[Any]   				=      num_attention_heads

						__lowerCAmelCase:	Union[str, Any]   				=      num_key_value_heads
						__lowerCAmelCase:	Tuple   				=      hidden_act
						__lowerCAmelCase:	Tuple   				=      initializer_range
						__lowerCAmelCase:	Tuple   				=      rms_norm_eps
						__lowerCAmelCase:	Optional[Any]   				=      pretraining_tp
						__lowerCAmelCase:	Optional[Any]   				=      use_cache
						__lowerCAmelCase:	int   				=      rope_scaling
						self._rope_scaling_validation()

						super().__init__(
						    pad_token_id=UpperCamelCase__					,  bos_token_id=UpperCamelCase__					,  eos_token_id=UpperCamelCase__					,  tie_word_embeddings=UpperCamelCase__					,  **UpperCamelCase__					,  )




				def 							lowercase_					(     self							:    Optional[Any])->       Tuple:



						'''simple docstring'''


						if self.rope_scaling is None:
								return

						if not isinstance(self.rope_scaling					,  UpperCamelCase__) or len(self.rope_scaling) != 2:
								raise ValueError(
								    "`rope_scaling` must be a dictionary with with two fields, `name` and `factor`, "
								    f"got {self.rope_scaling}")
						__lowerCAmelCase:	Union[str, Any]   				=      self.rope_scaling.get("type"					,  UpperCamelCase__)
						__lowerCAmelCase:	str   				=      self.rope_scaling.get("factor"					,  UpperCamelCase__)
						if rope_scaling_type is None or rope_scaling_type not in ["linear", "dynamic"]:
								raise ValueError(
								    f"`rope_scaling`'s name field must be one of ['linear', 'dynamic'], got {rope_scaling_type}")
						if rope_scaling_factor is None or not isinstance(UpperCamelCase__					,  UpperCamelCase__) or rope_scaling_factor <= 1.0:
								raise ValueError(f"`rope_scaling`'s factor field must be an float > 1, got {rope_scaling_factor}")





"""simple docstring"""


def    a__   (   __SCREAMING_SNAKE_CASE ,			__SCREAMING_SNAKE_CASE			)     ->     int:
		return int((input_a, input_a).count(0			) == 0			)






def    a__   (   )     ->     None:
		assert and_gate(0 ,			0			) == 0
		assert and_gate(0 ,			1			) == 0
		assert and_gate(1 ,			0			) == 0
		assert and_gate(1 ,			1			) == 1


if __name__ == "__main__":
			test_and_gate()
			print(and_gate(1, 0))
			print(and_gate(0, 0))
			print(and_gate(0, 1))
			print(and_gate(1, 1))


