


"""simple docstring"""


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


__lowerCamelCase      :List[str]	    =		logging.get_logger(__name__)

__lowerCamelCase      :List[str]	    =		{'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}


class 			A__	(						__lowercase):


     """simple docstring"""
     snake_case__	:					Dict													='''openai-gpt'''
     snake_case__	:					Any													={
         '''max_position_embeddings''': '''n_positions''',
         '''hidden_size''': '''n_embd''',
         '''num_attention_heads''': '''n_head''',
         '''num_hidden_layers''': '''n_layer''',
     }

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








"""simple docstring"""


from typing import TYPE_CHECKING

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


__lowerCamelCase      :Optional[Any]	    =		{
    'configuration_encodec': [
        'ENCODEC_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'EncodecConfig',
    ],
    'feature_extraction_encodec': ['EncodecFeatureExtractor'],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowerCamelCase      :Union[str, Any]	    =		[
        'ENCODEC_PRETRAINED_MODEL_ARCHIVE_LIST',
        'EncodecModel',
        'EncodecPreTrainedModel',
    ]

if TYPE_CHECKING:
    from .configuration_encodec import (
        ENCODEC_PRETRAINED_CONFIG_ARCHIVE_MAP,
        EncodecConfig,
    )
    from .feature_extraction_encodec import EncodecFeatureExtractor

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_encodec import (
            ENCODEC_PRETRAINED_MODEL_ARCHIVE_LIST,
            EncodecModel,
            EncodecPreTrainedModel,
        )

else:
    import sys

    __lowerCamelCase      :Dict	    =		_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




