



"""simple docstring"""





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


lowerCamelCase      =		logging.get_logger(__name__)

lowerCamelCase      =		{
    """bigcode/gpt_bigcode-santacoder""": """https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json""",
}
class    lowercase__     (					SCREAMING_SNAKE_CASE   ):







       '''simple docstring'''


       UpperCamelCase		=  '''gpt_bigcode'''
       UpperCamelCase		=  ['''past_key_values''']
       UpperCamelCase		=  {
           '''hidden_size''': '''n_embd''',
           '''max_position_embeddings''': '''n_positions''',
           '''num_attention_heads''': '''n_head''',
           '''num_hidden_layers''': '''n_layer''',
       }



       def __init__(							self    :						List[Any]	,       _UpperCAmelCase    :						List[str]=50257	,       _UpperCAmelCase    :						Any=1024	,       _UpperCAmelCase    :						Dict=768	,       _UpperCAmelCase    :						List[str]=12	,       _UpperCAmelCase    :						Tuple=12	,       _UpperCAmelCase    :						Union[str, Any]=None	,       _UpperCAmelCase    :						Optional[int]="gelu_pytorch_tanh"	,       _UpperCAmelCase    :						List[Any]=0.1	,       _UpperCAmelCase    :						Optional[int]=0.1	,       _UpperCAmelCase    :						List[Any]=0.1	,       _UpperCAmelCase    :						Dict=1e-5	,       _UpperCAmelCase    :						Union[str, Any]=0.02	,       _UpperCAmelCase    :						Tuple=True	,       _UpperCAmelCase    :						Optional[Any]=True	,       _UpperCAmelCase    :						Tuple=50256	,       _UpperCAmelCase    :						Optional[Any]=50256	,       _UpperCAmelCase    :						int=True	,       _UpperCAmelCase    :						Union[str, Any]=True	,       _UpperCAmelCase    :						Optional[int]=True	,       **_UpperCAmelCase    :						List[str]	,       )				->		Any:


             '''simple docstring'''




             UpperCAmelCase_    				=							vocab_size
             UpperCAmelCase_    				=							n_positions
             UpperCAmelCase_    				=							n_embd
             UpperCAmelCase_    				=							n_layer
             UpperCAmelCase_    				=							n_head
             UpperCAmelCase_    				=							n_inner
             UpperCAmelCase_    				=							activation_function
             UpperCAmelCase_    				=							resid_pdrop
             UpperCAmelCase_    				=							embd_pdrop
             UpperCAmelCase_    				=							attn_pdrop
             UpperCAmelCase_    				=							layer_norm_epsilon
             UpperCAmelCase_    				=							initializer_range
             UpperCAmelCase_    				=							scale_attn_weights
             UpperCAmelCase_    				=							use_cache
             UpperCAmelCase_    				=							attention_softmax_in_fpaa
             UpperCAmelCase_    				=							scale_attention_softmax_in_fpaa
             UpperCAmelCase_    				=							multi_query

             UpperCAmelCase_    				=							bos_token_id
             UpperCAmelCase_    				=							eos_token_id

             super().__init__(bos_token_id=_UpperCAmelCase	,       eos_token_id=_UpperCAmelCase	,       **_UpperCAmelCase					)









"""simple docstring"""





import colorsys

from PIL import Image  # type: ignore
def      a__			(   lowerCAmelCase__			,    lowerCAmelCase__			,    lowerCAmelCase__   ):
      UpperCAmelCase_    				=							x
      UpperCAmelCase_    				=							y
      for step in range(lowerCAmelCase__   ):  # noqa: B007
            UpperCAmelCase_    				=							a * a - b * b + x
            UpperCAmelCase_    				=							2 * a * b + y
            UpperCAmelCase_    				=							a_new

            # divergence happens for all complex number with an absolute value
            # greater than 4
            if a * a + b * b > 4:
                  break
      return step / (max_step - 1)
def      a__			(   lowerCAmelCase__   ):
      if distance == 1:
            return (0, 0, 0)
      else:
            return (255, 255, 255)
def      a__			(   lowerCAmelCase__   ):
      if distance == 1:
            return (0, 0, 0)
      else:
            return tuple(round(i * 255   ) for i in colorsys.hsv_to_rgb(lowerCAmelCase__			,    1			,    1   )   )
def      a__			(   lowerCAmelCase__ = 800			,    lowerCAmelCase__ = 600			,    lowerCAmelCase__ = -0.6			,    lowerCAmelCase__ = 0			,    lowerCAmelCase__ = 3.2			,    lowerCAmelCase__ = 50			,    lowerCAmelCase__ = True			,    ):
      UpperCAmelCase_    				=							Image.new("RGB"			,    (image_width, image_height)   )
      UpperCAmelCase_    				=							img.load()

      # loop through the image-coordinates
      for image_x in range(lowerCAmelCase__   ):
            for image_y in range(lowerCAmelCase__   ):
                  # determine the figure-coordinates based on the image-coordinates
                  UpperCAmelCase_    				=							figure_width / image_width * image_height
                  UpperCAmelCase_    				=							figure_center_x + (image_x / image_width - 0.5) * figure_width
                  UpperCAmelCase_    				=							figure_center_y + (image_y / image_height - 0.5) * figure_height

                  UpperCAmelCase_    				=							get_distance(lowerCAmelCase__			,    lowerCAmelCase__			,    lowerCAmelCase__   )

                  # color the corresponding pixel based on the selected coloring-function
                  if use_distance_color_coding:
                        UpperCAmelCase_    				=							get_color_coded_rgb(lowerCAmelCase__   )
                  else:
                        UpperCAmelCase_    				=							get_black_and_white_rgb(lowerCAmelCase__   )

      return img


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  # colored version, full figure
  lowerCamelCase      =		get_image()

  # uncomment for colored version, different section, zoomed in
  # img = get_image(figure_center_x = -0.6, figure_center_y = -0.4,
  # figure_width = 0.8)

  # uncomment for black and white version, full figure
  # img = get_image(use_distance_color_coding = False)

  # uncomment to save the image
  # img.save("mandelbrot.png")

  img.show()




