



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


_lowerCAmelCase	:   Optional[Any]    =   logging.get_logger(__name__)

_lowerCAmelCase	:   Any    =   {
    "bigcode/gpt_bigcode-santacoder": "https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json",
}


class 	__snake_case   ( SCREAMING_SNAKE_CASE ):
		SCREAMING_SNAKE_CASE__								=	'gpt_bigcode'
		SCREAMING_SNAKE_CASE__								=	['past_key_values']
		SCREAMING_SNAKE_CASE__								=	{
		    'hidden_size': 'n_embd',
		    'max_position_embeddings': 'n_positions',
		    'num_attention_heads': 'n_head',
		    'num_hidden_layers': 'n_layer',
		}
		def __init__(							self    ,a_=5_0257    ,a_=1024    ,a_=768    ,a_=12    ,a_=12    ,a_=None    ,a_="gelu_pytorch_tanh"    ,a_=0.1    ,a_=0.1    ,a_=0.1    ,a_=1e-5    ,a_=0.02    ,a_=True    ,a_=True    ,a_=5_0256    ,a_=5_0256    ,a_=True    ,a_=True    ,a_=True    ,**a_    ,):







						"""simple docstring"""
						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_						)





from __future__ import annotations

from collections.abc import Iterator
from typing import Generic, TypeVar

_lowerCAmelCase	:   List[str]    =   TypeVar("T")


class 	__snake_case   ( Generic[T] ):
		def __init__(							self    ,a_						):







						"""simple docstring"""
						lowerCAmelCase__		  =  data
						lowerCAmelCase__		  =  None



		def __str__(							self						):







						"""simple docstring"""
						return f'{self.data}'



class 	__snake_case   ( Generic[T] ):
		def __init__(							self						):







						"""simple docstring"""
						lowerCAmelCase__		  =  None
		def __iter__(							self						):







						"""simple docstring"""
						lowerCAmelCase__		  =  self.top
						while node:
										yield node.data
										lowerCAmelCase__		  =  node.next
		def __str__(							self						):







						"""simple docstring"""
						return "->".join([str(a_						) for item in self]						)
		def __len__(							self						):







						"""simple docstring"""
						return len(tuple(iter(self						)						)						)
		def 						SCREAMING_SNAKE_CASE_					(							self						):







						"""simple docstring"""
						return self.top is None
		def 						SCREAMING_SNAKE_CASE_					(							self    ,a_						):







						"""simple docstring"""
						lowerCAmelCase__		  =  Node(a_						)
						if not self.is_empty():
										lowerCAmelCase__		  =  self.top
						lowerCAmelCase__		  =  node
		def 						SCREAMING_SNAKE_CASE_					(							self						):







						"""simple docstring"""
						if self.is_empty():
										raise IndexError('pop from empty stack'						)
						assert isinstance(self.top    ,a_						)
						lowerCAmelCase__		  =  self.top
						lowerCAmelCase__		  =  self.top.next
						return pop_node.data
		def 						SCREAMING_SNAKE_CASE_					(							self						):







						"""simple docstring"""
						if self.is_empty():
										raise IndexError('peek from empty stack'						)

						assert self.top is not None
						return self.top.data



		def 						SCREAMING_SNAKE_CASE_					(							self						):







						"""simple docstring"""
						lowerCAmelCase__		  =  None


if __name__ == "__main__":
	from doctest import testmod

	testmod()
