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


lowerCAmelCase__  	=      logging.get_logger(__name__)

lowerCAmelCase__  	=      {
    "uw-madison/yoso-4096": "https://huggingface.co/uw-madison/yoso-4096/resolve/main/config.json",
    # See all YOSO models at https://huggingface.co/models?filter=yoso
}
class 	_a  (							lowerCamelCase_					):



	"""simple docstring"""



	__SCREAMING_SNAKE_CASE              =					'yoso'


	def __init__(   self       ,  lowerCAmelCase_=50265       ,  lowerCAmelCase_=768       ,  lowerCAmelCase_=12       ,  lowerCAmelCase_=12       ,  lowerCAmelCase_=3072       ,  lowerCAmelCase_="gelu"       ,  lowerCAmelCase_=0.1       ,  lowerCAmelCase_=0.1       ,  lowerCAmelCase_=4096       ,  lowerCAmelCase_=1       ,  lowerCAmelCase_=0.0_2       ,  lowerCAmelCase_=1e-12       ,  lowerCAmelCase_="absolute"       ,  lowerCAmelCase_=True       ,  lowerCAmelCase_=9       ,  lowerCAmelCase_=64       ,  lowerCAmelCase_=None       ,  lowerCAmelCase_=True       ,  lowerCAmelCase_=True       ,  lowerCAmelCase_=1       ,  lowerCAmelCase_=0       ,  lowerCAmelCase_=2       ,  **lowerCAmelCase_       ,  ):
		super().__init__(pad_token_id=lowerCAmelCase_       ,  bos_token_id=lowerCAmelCase_       ,  eos_token_id=lowerCAmelCase_       ,  **lowerCAmelCase_       )

		_lowercase   =vocab_size
		_lowercase   =max_position_embeddings
		_lowercase   =hidden_size
		_lowercase   =num_hidden_layers
		_lowercase   =num_attention_heads
		_lowercase   =intermediate_size
		_lowercase   =hidden_act
		_lowercase   =hidden_dropout_prob
		_lowercase   =attention_probs_dropout_prob
		_lowercase   =initializer_range
		_lowercase   =type_vocab_size
		_lowercase   =layer_norm_eps
		_lowercase   =position_embedding_type
		_lowercase   =use_expectation
		_lowercase   =hash_code_len
		_lowercase   =num_hash
		_lowercase   =conv_window
		_lowercase   =use_fast_hash
		_lowercase   =lsh_backward





"""simple docstring"""


from typing import TYPE_CHECKING

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


__UpperCamelCase       :    Any         =		{
    "configuration_openai": ["OPENAI_GPT_PRETRAINED_CONFIG_ARCHIVE_MAP", "OpenAIGPTConfig"],
    "tokenization_openai": ["OpenAIGPTTokenizer"],
}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __UpperCamelCase       :    Optional[int]         =		["OpenAIGPTTokenizerFast"]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __UpperCamelCase       :    List[Any]         =		[
      "OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST",
      "OpenAIGPTDoubleHeadsModel",
      "OpenAIGPTForSequenceClassification",
      "OpenAIGPTLMHeadModel",
      "OpenAIGPTModel",
      "OpenAIGPTPreTrainedModel",
      "load_tf_weights_in_openai_gpt",
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __UpperCamelCase       :    Tuple         =		[
      "TF_OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST",
      "TFOpenAIGPTDoubleHeadsModel",
      "TFOpenAIGPTForSequenceClassification",
      "TFOpenAIGPTLMHeadModel",
      "TFOpenAIGPTMainLayer",
      "TFOpenAIGPTModel",
      "TFOpenAIGPTPreTrainedModel",
  ]


if TYPE_CHECKING:
  from .configuration_openai import OPENAI_GPT_PRETRAINED_CONFIG_ARCHIVE_MAP, OpenAIGPTConfig
  from .tokenization_openai import OpenAIGPTTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_openai_fast import OpenAIGPTTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_openai import (
        OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST,
        OpenAIGPTDoubleHeadsModel,
        OpenAIGPTForSequenceClassification,
        OpenAIGPTLMHeadModel,
        OpenAIGPTModel,
        OpenAIGPTPreTrainedModel,
        load_tf_weights_in_openai_gpt,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_openai import (
        TF_OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFOpenAIGPTDoubleHeadsModel,
        TFOpenAIGPTForSequenceClassification,
        TFOpenAIGPTLMHeadModel,
        TFOpenAIGPTMainLayer,
        TFOpenAIGPTModel,
        TFOpenAIGPTPreTrainedModel,
    )

else:
  import sys

  __UpperCamelCase       :    str         =		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)