




"""simple docstring"""
import enum
import shutil
import sys


a_						,							a_				:    Union[str, Any]										=     shutil.get_terminal_size()

a_				:    str										=     {'''UP''': '''A''', '''DOWN''': '''B''', '''RIGHT''': '''C''', '''LEFT''': '''D'''}

class __lowercase(      enum.Enum				):




					'''simple docstring'''


					__a						:						int     		= 0
					__a						:						Optional[int]     		= 1





def 						UpperCAmelCase				(			A__:    List[Any]							,				A__:    str=""     )  ->     Dict:
			sys.stdout.write(str(A__     ) + end     )
			sys.stdout.flush()





def 						UpperCAmelCase				(			A__:    List[str]							,				A__:    List[str]							,				A__:    Optional[int]=""     )  ->     Optional[Any]:
			forceWrite(f'''\u001b[{color}m{content}\u001b[0m'''							,				A__     )





def 						UpperCAmelCase				(			)  ->     Optional[Any]:
			forceWrite('\r'     )





def 						UpperCAmelCase				(			A__:    int							,				A__:    str     )  ->     Optional[int]:
			forceWrite(f'''\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}'''     )





def 						UpperCAmelCase				(			)  ->     Optional[Any]:
			forceWrite(' ' * TERMINAL_WIDTH     )
			reset_cursor()






def 						UpperCAmelCase				(			)  ->     Optional[Any]:
			reset_cursor()
			forceWrite('-' * TERMINAL_WIDTH     )









"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


a_				:    Tuple										=     logging.get_logger(__name__)

a_				:    str										=     {'''openai-gpt''': '''https://huggingface.co/openai-gpt/resolve/main/config.json'''}

class __lowercase(      lowercase__				):




					'''simple docstring'''


					__a						:						Union[str, Any]     		= 'openai-gpt'
					__a						:						List[Any]     		= {
					    'max_position_embeddings': 'n_positions',
					    'hidden_size': 'n_embd',
					    'num_attention_heads': 'n_head',
					    'num_hidden_layers': 'n_layer',
					}
					def __init__(    self						,	__a=40478						,	__a=512						,	__a=768						,	__a=12						,	__a=12						,	__a="gelu"						,	__a=0.1						,	__a=0.1						,	__a=0.1						,	__a=1E-5						,	__a=0.02						,	__a="cls_index"						,	__a=True						,	__a=None						,	__a=True						,	__a=0.1						,	**__a						,	):
								__lowerCamelCase					:	List[str]	       =				vocab_size
								__lowerCamelCase					:	Union[str, Any]	       =				n_positions
								__lowerCamelCase					:	Optional[Any]	       =				n_embd
								__lowerCamelCase					:	int	       =				n_layer
								__lowerCamelCase					:	List[str]	       =				n_head
								__lowerCamelCase					:	Dict	       =				afn
								__lowerCamelCase					:	Optional[Any]	       =				resid_pdrop
								__lowerCamelCase					:	int	       =				embd_pdrop
								__lowerCamelCase					:	int	       =				attn_pdrop
								__lowerCamelCase					:	Dict	       =				layer_norm_epsilon
								__lowerCamelCase					:	List[str]	       =				initializer_range
								__lowerCamelCase					:	Any	       =				summary_type
								__lowerCamelCase					:	Tuple	       =				summary_use_proj
								__lowerCamelCase					:	List[Any]	       =				summary_activation
								__lowerCamelCase					:	str	       =				summary_first_dropout
								__lowerCamelCase					:	Tuple	       =				summary_proj_to_labels
								super().__init__(**__a     )



