



"""simple docstring"""

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


lowercase__			   =  logging.get_logger(__name__)

lowercase__			   =  {"openai-gpt": "https://huggingface.co/openai-gpt/resolve/main/config.json"}




class SCREAMING_SNAKE_CASE__					(		__A      ):
	_lowerCAmelCase							=					"""openai-gpt"""
	_lowerCAmelCase							=					{
	    """max_position_embeddings""": """n_positions""",
	    """hidden_size""": """n_embd""",
	    """num_attention_heads""": """n_head""",
	    """num_hidden_layers""": """n_layer""",
	}



	def __init__(self						,     _lowercase=40478						,     _lowercase=512						,     _lowercase=768						,     _lowercase=12						,     _lowercase=12						,     _lowercase="gelu"						,     _lowercase=0.1						,     _lowercase=0.1						,     _lowercase=0.1						,     _lowercase=1e-5						,     _lowercase=0.02						,     _lowercase="cls_index"						,     _lowercase=True						,     _lowercase=None						,     _lowercase=True						,     _lowercase=0.1						,     **_lowercase						,     ):





								'''simple docstring'''

								__a		:		str									=       vocab_size
								__a		:		str									=       n_positions
								__a		:		str									=       n_embd
								__a		:		Dict									=       n_layer
								__a		:		List[str]									=       n_head
								__a		:		Tuple									=       afn
								__a		:		Union[str, Any]									=       resid_pdrop
								__a		:		int									=       embd_pdrop
								__a		:		Any									=       attn_pdrop
								__a		:		str									=       layer_norm_epsilon
								__a		:		List[str]									=       initializer_range
								__a		:		List[Any]									=       summary_type
								__a		:		Tuple									=       summary_use_proj
								__a		:		List[str]									=       summary_activation
								__a		:		Optional[int]									=       summary_first_dropout
								__a		:		List[Any]									=       summary_proj_to_labels
								super().__init__(**UpperCamelCase__							)






"""simple docstring"""

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


lowercase__			   =  {
    "configuration_llama": ["LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP", "LlamaConfig"],
}

try:
	if not is_sentencepiece_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowercase__			   =  ["LlamaTokenizer"]

try:
	if not is_tokenizers_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowercase__			   =  ["LlamaTokenizerFast"]

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowercase__			   =  [
	    "LlamaForCausalLM",
	    "LlamaModel",
	    "LlamaPreTrainedModel",
	    "LlamaForSequenceClassification",
	]


if TYPE_CHECKING:
	from .configuration_llama import LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP, LlamaConfig

	try:
		if not is_sentencepiece_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .tokenization_llama import LlamaTokenizer

	try:
		if not is_tokenizers_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .tokenization_llama_fast import LlamaTokenizerFast

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_llama import LlamaForCausalLM, LlamaForSequenceClassification, LlamaModel, LlamaPreTrainedModel


else:
	import sys

	lowercase__			   =  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)

