

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


__A     :					str     = logging.get_logger(__name__)

__A     :					int     = {
    'bigcode/gpt_bigcode-santacoder': 'https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json',
}


class        _SCREAMING_SNAKE_CASE	(   _UpperCAmelCase):
						_UpperCamelCase:Any     =						"gpt_bigcode"
						_UpperCamelCase:Tuple     =						["past_key_values"]
						_UpperCamelCase:Any     =						{
						    "hidden_size": "n_embd",
						    "max_position_embeddings": "n_positions",
						    "num_attention_heads": "n_head",
						    "num_hidden_layers": "n_layer",
						}







						def __init__(       self			,		_SCREAMING_SNAKE_CASE=5_0257			,		_SCREAMING_SNAKE_CASE=1024			,		_SCREAMING_SNAKE_CASE=768			,		_SCREAMING_SNAKE_CASE=12			,		_SCREAMING_SNAKE_CASE=12			,		_SCREAMING_SNAKE_CASE=None			,		_SCREAMING_SNAKE_CASE="gelu_pytorch_tanh"			,		_SCREAMING_SNAKE_CASE=0.1			,		_SCREAMING_SNAKE_CASE=0.1			,		_SCREAMING_SNAKE_CASE=0.1			,		_SCREAMING_SNAKE_CASE=1E-5			,		_SCREAMING_SNAKE_CASE=0.0_2			,		_SCREAMING_SNAKE_CASE=True			,		_SCREAMING_SNAKE_CASE=True			,		_SCREAMING_SNAKE_CASE=5_0256			,		_SCREAMING_SNAKE_CASE=5_0256			,		_SCREAMING_SNAKE_CASE=True			,		_SCREAMING_SNAKE_CASE=True			,		_SCREAMING_SNAKE_CASE=True			,		**_SCREAMING_SNAKE_CASE			,		)->				Optional[int]:
													lowerCamelCase_				     =vocab_size
													lowerCamelCase_				     =n_positions
													lowerCamelCase_				     =n_embd
													lowerCamelCase_				     =n_layer
													lowerCamelCase_				     =n_head
													lowerCamelCase_				     =n_inner
													lowerCamelCase_				     =activation_function
													lowerCamelCase_				     =resid_pdrop
													lowerCamelCase_				     =embd_pdrop
													lowerCamelCase_				     =attn_pdrop
													lowerCamelCase_				     =layer_norm_epsilon
													lowerCamelCase_				     =initializer_range
													lowerCamelCase_				     =scale_attn_weights
													lowerCamelCase_				     =use_cache
													lowerCamelCase_				     =attention_softmax_in_fpaa
													lowerCamelCase_				     =scale_attention_softmax_in_fpaa
													lowerCamelCase_				     =multi_query

													lowerCamelCase_				     =bos_token_id
													lowerCamelCase_				     =eos_token_id

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



def 		_lowercase (     lowercase__   ,	lowercase__						):
      return (pointa[0] - pointa[0]) ** 2 + (pointa[1] - pointa[1]) ** 2







def 		_lowercase (     lowercase__   ,	lowercase__=0						):
      return sorted(lowercase__   ,	key=lambda lowercase__						: x[column]						)







def 		_lowercase (     lowercase__   ,	lowercase__   ,	lowercase__=float('''inf'''						)						):

      for i in range(points_counts - 1						):
            for j in range(i + 1   ,	lowercase__						):
                  __lowerCAmelCase					:						List[str]					=					euclidean_distance_sqr(points[i]   ,	points[j]						)
                  if current_dis < min_dis:
                        __lowerCAmelCase					:						Tuple					=					current_dis
      return min_dis







def 		_lowercase (     lowercase__   ,	lowercase__   ,	lowercase__=float('''inf'''						)						):

      for i in range(min(6   ,	points_counts - 1						)   ,	lowercase__						):
            for j in range(max(0   ,	i - 6						)   ,	lowercase__						):
                  __lowerCAmelCase					:						Union[str, Any]					=					euclidean_distance_sqr(points[i]   ,	points[j]						)
                  if current_dis < min_dis:
                        __lowerCAmelCase					:						int					=					current_dis
      return min_dis







def 		_lowercase (     lowercase__   ,	lowercase__   ,	lowercase__						):

      # base case
      if points_counts <= 3:
            return dis_between_closest_pair(lowercase__   ,	lowercase__						)

      # recursion
      __lowerCAmelCase					:						Optional[Any]					=					points_counts // 2
      __lowerCAmelCase					:						Optional[Any]					=					closest_pair_of_points_sqr(
          lowercase__   ,	points_sorted_on_y[:mid]   ,	lowercase__						)
      __lowerCAmelCase					:						str					=					closest_pair_of_points_sqr(
          lowercase__   ,	points_sorted_on_y[mid:]   ,	points_counts - mid						)
      __lowerCAmelCase					:						Optional[int]					=					min(lowercase__   ,	lowercase__						)
      __lowerCAmelCase					:						Tuple					=					[]
      for point in points_sorted_on_x:
            if abs(point[0] - points_sorted_on_x[mid][0]						) < closest_pair_dis:
                  cross_strip.append(lowercase__						)

      __lowerCAmelCase					:						List[Any]					=					dis_between_closest_in_strip(
          lowercase__   ,	len(lowercase__						)   ,	lowercase__						)
      return min(lowercase__   ,	lowercase__						)







def 		_lowercase (     lowercase__   ,	lowercase__						):
      __lowerCAmelCase					:						Union[str, Any]					=					column_based_sort(lowercase__   ,	column=0						)
      __lowerCAmelCase					:						Any					=					column_based_sort(lowercase__   ,	column=1						)
      return (
          closest_pair_of_points_sqr(
              lowercase__   ,	lowercase__   ,	lowercase__						)
      ) ** 0.5


if __name__ == "__main__":
 _UpperCamelCase 			=		[(2, 3), (12, 30), (40, 50), (5, 1), (12, 10), (3, 4)]
 print("Distance:", closest_pair_of_points(points, len(points)))


