





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


A   : List[str]             =			{
    "configuration_xlm": ["XLM_PRETRAINED_CONFIG_ARCHIVE_MAP", "XLMConfig", "XLMOnnxConfig"],
    "tokenization_xlm": ["XLMTokenizer"],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A   : Tuple             =			[
		    "XLM_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "XLMForMultipleChoice",
		    "XLMForQuestionAnswering",
		    "XLMForQuestionAnsweringSimple",
		    "XLMForSequenceClassification",
		    "XLMForTokenClassification",
		    "XLMModel",
		    "XLMPreTrainedModel",
		    "XLMWithLMHeadModel",
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A   : List[Any]             =			[
		    "TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "TFXLMForMultipleChoice",
		    "TFXLMForQuestionAnsweringSimple",
		    "TFXLMForSequenceClassification",
		    "TFXLMForTokenClassification",
		    "TFXLMMainLayer",
		    "TFXLMModel",
		    "TFXLMPreTrainedModel",
		    "TFXLMWithLMHeadModel",
		]


if TYPE_CHECKING:
		from .configuration_xlm import XLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XLMConfig, XLMOnnxConfig
		from .tokenization_xlm import XLMTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_xlm import (
				    XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
				    XLMForMultipleChoice,
				    XLMForQuestionAnswering,
				    XLMForQuestionAnsweringSimple,
				    XLMForSequenceClassification,
				    XLMForTokenClassification,
				    XLMModel,
				    XLMPreTrainedModel,
				    XLMWithLMHeadModel,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_xlm import (
				    TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFXLMForMultipleChoice,
				    TFXLMForQuestionAnsweringSimple,
				    TFXLMForSequenceClassification,
				    TFXLMForTokenClassification,
				    TFXLMMainLayer,
				    TFXLMModel,
				    TFXLMPreTrainedModel,
				    TFXLMWithLMHeadModel,
				)

else:
		import sys

		A   : List[Any]             =			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)












'''simple docstring'''






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


A   : Tuple             =			logging.get_logger(__name__)

A   : Any             =			{
    'microsoft/biogpt': 'https://huggingface.co/microsoft/biogpt/resolve/main/config.json',
    # See all BioGPT models at https://huggingface.co/models?filter=biogpt
}







class 			lowerCamelCase					(						__UpperCAmelCase  ):
					_SCREAMING_SNAKE_CASE							   =    "biogpt"


					def __init__(					self	:  Union[str, Any]       ,     __snake_case	:  Tuple=4_23_84       ,     __snake_case	:  Any=10_24       ,     __snake_case	:  Optional[int]=24       ,     __snake_case	:  int=16       ,     __snake_case	:  str=40_96       ,     __snake_case	:  Dict="gelu"       ,     __snake_case	:  List[str]=0.1       ,     __snake_case	:  List[Any]=0.1       ,     __snake_case	:  List[Any]=10_24       ,     __snake_case	:  Optional[int]=0.02       ,     __snake_case	:  Union[str, Any]=1e-12       ,     __snake_case	:  List[Any]=True       ,     __snake_case	:  Union[str, Any]=True       ,     __snake_case	:  Any=0.0       ,     __snake_case	:  int=0.0       ,     __snake_case	:  Dict=1       ,     __snake_case	:  str=0       ,     __snake_case	:  List[str]=2       ,     **__snake_case	:  Optional[int]       ,     ):





											'''simple docstring'''





											_snake_case:   List[str]  					=		vocab_size
											_snake_case:   Optional[int]  					=		max_position_embeddings
											_snake_case:   Dict  					=		hidden_size
											_snake_case:   Union[str, Any]  					=		num_hidden_layers
											_snake_case:   str  					=		num_attention_heads
											_snake_case:   Any  					=		intermediate_size
											_snake_case:   List[Any]  					=		hidden_act
											_snake_case:   int  					=		hidden_dropout_prob
											_snake_case:   List[str]  					=		attention_probs_dropout_prob
											_snake_case:   Optional[Any]  					=		initializer_range
											_snake_case:   Union[str, Any]  					=		layer_norm_eps
											_snake_case:   Dict  					=		scale_embedding
											_snake_case:   Dict  					=		use_cache
											_snake_case:   List[Any]  					=		layerdrop
											_snake_case:   int  					=		activation_dropout
											super().__init__(pad_token_id=__snake_case       ,     bos_token_id=__snake_case       ,     eos_token_id=__snake_case       ,     **__snake_case       )





