



'''simple docstring'''





from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowercase_	       =			logging.get_logger(__name__)

lowercase_	       =			{
    '''facebook/xlm-roberta-xl''': '''https://huggingface.co/facebook/xlm-roberta-xl/resolve/main/config.json''',
    '''facebook/xlm-roberta-xxl''': '''https://huggingface.co/facebook/xlm-roberta-xxl/resolve/main/config.json''',
    # See all XLM-RoBERTa-XL models at https://huggingface.co/models?filter=xlm-roberta-xl
}






class 						__a (     SCREAMING_SNAKE_CASE				):
	SCREAMING_SNAKE_CASE       =       "xlm-roberta-xl"



	def __init__(						self							:    Any				,	snake_case_							:    Optional[int]=25_08_80				,	snake_case_							:    int=25_60				,	snake_case_							:    Optional[Any]=36				,	snake_case_							:    List[Any]=32				,	snake_case_							:    Optional[int]=1_02_40				,	snake_case_							:    Optional[Any]="gelu"				,	snake_case_							:    Tuple=0.1				,	snake_case_							:    Dict=0.1				,	snake_case_							:    str=5_14				,	snake_case_							:    List[Any]=1				,	snake_case_							:    Dict=0.0_2				,	snake_case_							:    Tuple=1e-05				,	snake_case_							:    Union[str, Any]=1				,	snake_case_							:    Union[str, Any]=0				,	snake_case_							:    int=2				,	snake_case_							:    Optional[int]="absolute"				,	snake_case_							:    str=True				,	snake_case_							:    Optional[Any]=None				,	**snake_case_							:    Tuple				,	)->							Any:
						super().__init__(pad_token_id=_UpperCAmelCase				,	bos_token_id=_UpperCAmelCase				,	eos_token_id=_UpperCAmelCase				,	**_UpperCAmelCase)
						__lowerCAmelCase	   =vocab_size
						__lowerCAmelCase	   =hidden_size
						__lowerCAmelCase	   =num_hidden_layers
						__lowerCAmelCase	   =num_attention_heads
						__lowerCAmelCase	   =hidden_act
						__lowerCAmelCase	   =intermediate_size
						__lowerCAmelCase	   =hidden_dropout_prob
						__lowerCAmelCase	   =attention_probs_dropout_prob
						__lowerCAmelCase	   =max_position_embeddings
						__lowerCAmelCase	   =type_vocab_size
						__lowerCAmelCase	   =initializer_range
						__lowerCAmelCase	   =layer_norm_eps
						__lowerCAmelCase	   =position_embedding_type
						__lowerCAmelCase	   =use_cache
						__lowerCAmelCase	   =classifier_dropout






class 						__a (     SCREAMING_SNAKE_CASE				):



	@property
	def 		UpperCamelCase							(						self							:    Any)->							Mapping[str, Mapping[int, str]]:




						if self.task == "multiple-choice":
											__lowerCAmelCase	   ={0: """batch""", 1: """choice""", 2: """sequence"""}
						else:
											__lowerCAmelCase	   ={0: """batch""", 1: """sequence"""}
						return OrderedDict(
						    [
						        ("""input_ids""", dynamic_axis),
						        ("""attention_mask""", dynamic_axis),
						    ])









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase_	       =			{
    '''configuration_blip_2''': [
        '''BLIP_2_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''Blip2Config''',
        '''Blip2QFormerConfig''',
        '''Blip2VisionConfig''',
    ],
    '''processing_blip_2''': ['''Blip2Processor'''],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase_	       =			[
				    '''BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST''',
				    '''Blip2Model''',
				    '''Blip2QFormerModel''',
				    '''Blip2PreTrainedModel''',
				    '''Blip2ForConditionalGeneration''',
				    '''Blip2VisionModel''',
				]

if TYPE_CHECKING:
				from .configuration_blip_a import (
				    BLIP_2_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    BlipaConfig,
				    BlipaQFormerConfig,
				    BlipaVisionConfig,
				)
				from .processing_blip_a import BlipaProcessor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_blip_a import (
								    BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST,
								    BlipaForConditionalGeneration,
								    BlipaModel,
								    BlipaPreTrainedModel,
								    BlipaQFormerModel,
								    BlipaVisionModel,
								)

else:
				import sys

				lowercase_	       =			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




