


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 A    (  UpperCamelCase_	):
      UpperCamelCase__				:    Dict ='gpt_bigcode'
      UpperCamelCase__				:    List[str] =['past_key_values']
      UpperCamelCase__				:    List[Any] ={
          'hidden_size': 'n_embd',
          'max_position_embeddings': 'n_positions',
          'num_attention_heads': 'n_head',
          'num_hidden_layers': 'n_layer',
      }






      def __init__(   self		:	List[Any]     ,  lowercase_		:	int=5_0257     ,  lowercase_		:	Dict=1024     ,  lowercase_		:	List[Any]=768     ,  lowercase_		:	Optional[Any]=12     ,  lowercase_		:	Dict=12     ,  lowercase_		:	Any=None     ,  lowercase_		:	Dict="gelu_pytorch_tanh"     ,  lowercase_		:	Union[str, Any]=0.1     ,  lowercase_		:	Dict=0.1     ,  lowercase_		:	List[Any]=0.1     ,  lowercase_		:	Union[str, Any]=1E-5     ,  lowercase_		:	Dict=0.02     ,  lowercase_		:	Union[str, Any]=True     ,  lowercase_		:	Optional[int]=True     ,  lowercase_		:	Optional[int]=5_0256     ,  lowercase_		:	Union[str, Any]=5_0256     ,  lowercase_		:	Any=True     ,  lowercase_		:	Optional[int]=True     ,  lowercase_		:	str=True     ,  **lowercase_		:	List[Any]     ,  )   ->		Any:
             """simple docstring"""




             _lowerCamelCase			:						Dict            =vocab_size
             _lowerCamelCase			:						Any            =n_positions
             _lowerCamelCase			:						Optional[Any]            =n_embd
             _lowerCamelCase			:						List[Any]            =n_layer
             _lowerCamelCase			:						Optional[int]            =n_head
             _lowerCamelCase			:						Optional[int]            =n_inner
             _lowerCamelCase			:						Optional[int]            =activation_function
             _lowerCamelCase			:						Dict            =resid_pdrop
             _lowerCamelCase			:						List[Any]            =embd_pdrop
             _lowerCamelCase			:						str            =attn_pdrop
             _lowerCamelCase			:						Optional[Any]            =layer_norm_epsilon
             _lowerCamelCase			:						Optional[Any]            =initializer_range
             _lowerCamelCase			:						Tuple            =scale_attn_weights
             _lowerCamelCase			:						Any            =use_cache
             _lowerCamelCase			:						int            =attention_softmax_in_fpaa
             _lowerCamelCase			:						str            =scale_attention_softmax_in_fpaa
             _lowerCamelCase			:						List[Any]            =multi_query

             _lowerCamelCase			:						Optional[int]            =bos_token_id
             _lowerCamelCase			:						Dict            =eos_token_id

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






from __future__ import annotations

import matplotlib.pyplot as plt  # type: ignore
import numpy

# initial triangle of Koch snowflake
lowerCamelCase		   =			numpy.array([0, 0])
lowerCamelCase		   =			numpy.array([0.5, 0.866_0254])
lowerCamelCase		   =			numpy.array([1, 0])
lowerCamelCase		   =			[VECTOR_1, VECTOR_2, VECTOR_3, VECTOR_1]




def       a_ (       SCREAMING_SNAKE_CASE__   : list[numpy.ndarray]						,     SCREAMING_SNAKE_CASE__   : int	):
       '''simple docstring'''





       _lowerCamelCase			:						List[Any]            =initial_vectors
       for _ in range(SCREAMING_SNAKE_CASE__	):
              _lowerCamelCase			:						List[str]            =iteration_step(SCREAMING_SNAKE_CASE__	)
       return vectors




def       a_ (       SCREAMING_SNAKE_CASE__   : list[numpy.ndarray]	):
       '''simple docstring'''





       _lowerCamelCase			:						Dict            =[]
       for i, start_vector in enumerate(vectors[:-1]	):
              _lowerCamelCase			:						Tuple            =vectors[i + 1]
              new_vectors.append(SCREAMING_SNAKE_CASE__	)
              _lowerCamelCase			:						Tuple            =end_vector - start_vector
              new_vectors.append(start_vector + difference_vector / 3	)
              new_vectors.append(
                  start_vector + difference_vector / 3 + rotate(difference_vector / 3						,     60	)	)
              new_vectors.append(start_vector + difference_vector * 2 / 3	)
       new_vectors.append(vectors[-1]	)
       return new_vectors




def       a_ (       SCREAMING_SNAKE_CASE__   : numpy.ndarray						,     SCREAMING_SNAKE_CASE__   : float	):
       '''simple docstring'''





       _lowerCamelCase			:						Union[str, Any]            =numpy.radians(SCREAMING_SNAKE_CASE__	)
       _lowerCamelCase      ,	_lowerCamelCase			:						List[Any]            =numpy.cos(SCREAMING_SNAKE_CASE__	), numpy.sin(SCREAMING_SNAKE_CASE__	)
       _lowerCamelCase			:						str            =numpy.array(((c, -s), (s, c))	)
       return numpy.dot(SCREAMING_SNAKE_CASE__						,     SCREAMING_SNAKE_CASE__	)




def       a_ (       SCREAMING_SNAKE_CASE__   : list[numpy.ndarray]	):
       '''simple docstring'''





       _lowerCamelCase			:						Optional[Any]            =plt.gca()
       axes.set_aspect('equal'	)

       # matplotlib.pyplot.plot takes a list of all x-coordinates and a list of all
       # y-coordinates as inputs, which are constructed from the vector-list using
       # zip()
       _lowerCamelCase      ,	_lowerCamelCase			:						Tuple            =zip(*SCREAMING_SNAKE_CASE__	)
       plt.plot(SCREAMING_SNAKE_CASE__						,     SCREAMING_SNAKE_CASE__	)
       plt.show()


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 lowerCamelCase		   =			iterate(INITIAL_VECTORS, 5)
 plot(processed_vectors)


