



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


a      :  List[Any]			     =			logging.get_logger(__name__)

a      :  Optional[Any]			     =			{'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}







class 				_a				(   _lowerCAmelCase					):
			A      		=	'''openai-gpt'''
			A      		=	{
			    '''max_position_embeddings''': '''n_positions''',
			    '''hidden_size''': '''n_embd''',
			    '''num_attention_heads''': '''n_head''',
			    '''num_hidden_layers''': '''n_layer''',
			}

			def __init__(self,   SCREAMING_SNAKE_CASE_=40478,   SCREAMING_SNAKE_CASE_=512,   SCREAMING_SNAKE_CASE_=768,   SCREAMING_SNAKE_CASE_=12,   SCREAMING_SNAKE_CASE_=12,   SCREAMING_SNAKE_CASE_="gelu",   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_="cls_index",   SCREAMING_SNAKE_CASE_=True,   SCREAMING_SNAKE_CASE_=None,   SCREAMING_SNAKE_CASE_=True,   SCREAMING_SNAKE_CASE_=0.1,   **SCREAMING_SNAKE_CASE_,   )       ->   Any:
						UpperCAmelCase_:		str							      =     vocab_size
						UpperCAmelCase_:		Union[str, Any]							      =     n_positions
						UpperCAmelCase_:		Optional[int]							      =     n_embd
						UpperCAmelCase_:		List[Any]							      =     n_layer
						UpperCAmelCase_:		Tuple							      =     n_head
						UpperCAmelCase_:		List[Any]							      =     afn
						UpperCAmelCase_:		Optional[int]							      =     resid_pdrop
						UpperCAmelCase_:		List[str]							      =     embd_pdrop
						UpperCAmelCase_:		Dict							      =     attn_pdrop
						UpperCAmelCase_:		Dict							      =     layer_norm_epsilon
						UpperCAmelCase_:		List[str]							      =     initializer_range
						UpperCAmelCase_:		List[Any]							      =     summary_type
						UpperCAmelCase_:		Union[str, Any]							      =     summary_use_proj
						UpperCAmelCase_:		int							      =     summary_activation
						UpperCAmelCase_:		Dict							      =     summary_first_dropout
						UpperCAmelCase_:		List[str]							      =     summary_proj_to_labels
						super().__init__(**SCREAMING_SNAKE_CASE_					)











import logging
from dataclasses import dataclass, field
from typing import Optional

from seqaseq_trainer import arg_to_scheduler

from transformers import TrainingArguments


a      :  Optional[int]			     =			logging.getLogger(__name__)







@dataclass
class 				_a				(   _lowerCAmelCase					):
			A      		=	field(
			    default=0.0 ,		metadata={'''help''': '''The label smoothing epsilon to apply (if not zero).'''}					)
			A      		=	field(default=_lowerCAmelCase ,		metadata={'''help''': '''Whether to SortishSamler or not.'''}					)
			A      		=	field(
			    default=_lowerCAmelCase ,		metadata={'''help''': '''Whether to use generate to calculate generative metrics (ROUGE, BLEU).'''}					)
			A      		=	field(default=_lowerCAmelCase ,		metadata={'''help''': '''whether to use adafactor'''}					)
			A      		=	field(
			    default=_lowerCAmelCase ,		metadata={'''help''': '''Encoder layer dropout probability. Goes into model.config.'''}					)
			A      		=	field(
			    default=_lowerCAmelCase ,		metadata={'''help''': '''Decoder layer dropout probability. Goes into model.config.'''}					)
			A      		=	field(default=_lowerCAmelCase ,		metadata={'''help''': '''Dropout probability. Goes into model.config.'''}					)
			A      		=	field(
			    default=_lowerCAmelCase ,		metadata={'''help''': '''Attention dropout probability. Goes into model.config.'''}					)
			A      		=	field(
			    default='''linear''' ,		metadata={'''help''': F'''Which lr scheduler to use. Selected in {sorted(arg_to_scheduler.keys()					)}'''} ,		)






