




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


_SCREAMING_SNAKE_CASE			=						logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE			=						{"openai-gpt": "https://huggingface.co/openai-gpt/resolve/main/config.json"}
class   __UpperCAmelCase				(     lowerCAmelCase				):



					'''simple docstring'''





					_UpperCamelCase							=		"""openai-gpt"""
					_UpperCamelCase							=		{
					    """max_position_embeddings""": """n_positions""",
					    """hidden_size""": """n_embd""",
					    """num_attention_heads""": """n_head""",
					    """num_hidden_layers""": """n_layer""",
					}



					def __init__(	self     :						Any      ,       _lowercase     :						List[Any]=40_478      ,       _lowercase     :						Tuple=512      ,       _lowercase     :						Dict=768      ,       _lowercase     :						List[str]=12      ,       _lowercase     :						Optional[int]=12      ,       _lowercase     :						Tuple="gelu"      ,       _lowercase     :						int=0.1      ,       _lowercase     :						Tuple=0.1      ,       _lowercase     :						Any=0.1      ,       _lowercase     :						List[str]=1E-5      ,       _lowercase     :						str=0.02      ,       _lowercase     :						Optional[Any]="cls_index"      ,       _lowercase     :						int=True      ,       _lowercase     :						str=None      ,       _lowercase     :						Tuple=True      ,       _lowercase     :						List[Any]=0.1      ,       **_lowercase     :						int      ,       )    ->							Optional[int]:
								A_									= vocab_size
								A_									= n_positions
								A_									= n_embd
								A_									= n_layer
								A_									= n_head
								A_									= afn
								A_									= resid_pdrop
								A_									= embd_pdrop
								A_									= attn_pdrop
								A_									= layer_norm_epsilon
								A_									= initializer_range
								A_									= summary_type
								A_									= summary_use_proj
								A_									= summary_activation
								A_									= summary_first_dropout
								A_									= summary_proj_to_labels
								super().__init__(**_lowercase)










'''simple docstring'''
from argparse import ArgumentParser

from .add_new_model import AddNewModelCommand
from .add_new_model_like import AddNewModelLikeCommand
from .convert import ConvertCommand
from .download import DownloadCommand
from .env import EnvironmentCommand
from .lfs import LfsCommands
from .pt_to_tf import PTtoTFCommand
from .run import RunCommand
from .serving import ServeCommand
from .user import UserCommands





def 			lowerCamelCase(							)		->		int:
			A_									= ArgumentParser('Transformers CLI tool'       ,usage='transformers-cli <command> [<args>]'     )
			A_									= parser.add_subparsers(help='transformers-cli command helpers'     )

			# Register commands
			ConvertCommand.register_subcommand(SCREAMING_SNAKE_CASE_     )
			DownloadCommand.register_subcommand(SCREAMING_SNAKE_CASE_     )
			EnvironmentCommand.register_subcommand(SCREAMING_SNAKE_CASE_     )
			RunCommand.register_subcommand(SCREAMING_SNAKE_CASE_     )
			ServeCommand.register_subcommand(SCREAMING_SNAKE_CASE_     )
			UserCommands.register_subcommand(SCREAMING_SNAKE_CASE_     )
			AddNewModelCommand.register_subcommand(SCREAMING_SNAKE_CASE_     )
			AddNewModelLikeCommand.register_subcommand(SCREAMING_SNAKE_CASE_     )
			LfsCommands.register_subcommand(SCREAMING_SNAKE_CASE_     )
			PTtoTFCommand.register_subcommand(SCREAMING_SNAKE_CASE_     )

			# Let's go
			A_									= parser.parse_args()

			if not hasattr(SCREAMING_SNAKE_CASE_       ,'func'     ):
						parser.print_help()
						exit(1     )

			# Run
			A_									= args.func(SCREAMING_SNAKE_CASE_     )
			service.run()


if __name__ == "__main__":
							main()




