





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


_snake_case           =			logging.get_logger(__name__)

_snake_case           =			{
    """EleutherAI/gpt-neox-20b""": """https://huggingface.co/EleutherAI/gpt-neox-20b/resolve/main/config.json""",
    # See all GPTNeoX models at https://huggingface.co/models?filter=gpt_neox
}





class  lowerCAmelCase							(       lowercase_ ):
  __lowerCamelCase		=      'gpt_neox'







  def __init__(      self  :int   ,							_lowercase  :str=5_04_32   ,							_lowercase  :Tuple=61_44   ,							_lowercase  :Union[str, Any]=44   ,							_lowercase  :int=64   ,							_lowercase  :str=2_45_76   ,							_lowercase  :Optional[Any]="gelu"   ,							_lowercase  :Optional[Any]=0.25   ,							_lowercase  :str=1_00_00   ,							_lowercase  :List[Any]=0.0   ,							_lowercase  :List[Any]=0.0   ,							_lowercase  :int=0.1   ,							_lowercase  :List[str]=20_48   ,							_lowercase  :int=0.02   ,							_lowercase  :Dict=1e-5   ,							_lowercase  :int=True   ,							_lowercase  :Any=0   ,							_lowercase  :Dict=2   ,							_lowercase  :Union[str, Any]=False   ,							_lowercase  :str=True   ,							_lowercase  :str=None   ,							**_lowercase  :List[Any]   ,							):






     '''simple docstring'''





     super().__init__(bos_token_id=_lowercase   ,							eos_token_id=_lowercase   ,							**_lowercase )
     lowercase__			       =  vocab_size
     lowercase__			       =  max_position_embeddings
     lowercase__			       =  hidden_size
     lowercase__			       =  num_hidden_layers
     lowercase__			       =  num_attention_heads
     lowercase__			       =  intermediate_size
     lowercase__			       =  hidden_act
     lowercase__			       =  rotary_pct
     lowercase__			       =  rotary_emb_base
     lowercase__			       =  attention_dropout
     lowercase__			       =  hidden_dropout
     lowercase__			       =  classifier_dropout
     lowercase__			       =  initializer_range
     lowercase__			       =  layer_norm_eps
     lowercase__			       =  use_cache
     lowercase__			       =  tie_word_embeddings
     lowercase__			       =  use_parallel_residual
     lowercase__			       =  rope_scaling
     self._rope_scaling_validation()

     if self.hidden_size % self.num_attention_heads != 0:
        raise ValueError(
            "The hidden size is not divisble by the number of attention heads! Make sure to update them!" )







  def   UpperCAmelCase					(      self  :Optional[int] ):






     '''simple docstring'''





     if self.rope_scaling is None:
        return

     if not isinstance(self.rope_scaling   ,							_lowercase ) 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}''' )
     lowercase__			       =  self.rope_scaling.get("type"   ,							_lowercase )
     lowercase__			       =  self.rope_scaling.get("factor"   ,							_lowercase )
     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(_lowercase   ,							_lowercase ) or rope_scaling_factor <= 1.0:
        raise ValueError(f'''`rope_scaling`\'s factor field must be an float > 1, got {rope_scaling_factor}''' )













from __future__ import annotations


def _A       (   __magic_name__  , __magic_name__	):
   lowercase__			       =  0
   lowercase__			       =  len(__magic_name__	) - 1

   while i < j:
      if nums[i] + nums[j] == target:
         return [i, j]
      elif nums[i] + nums[j] < target:
         lowercase__			       =  i + 1
      else:
         lowercase__			       =  j - 1

   return []


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  print(F"""{two_pointer([2, 7, 11, 15], 9) = }""")






