



from collections import OrderedDict
from typing import Mapping

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


__UpperCAmelCase    	=  logging.get_logger(__name__)

__UpperCAmelCase    	=  {
    '''flaubert/flaubert_small_cased''': '''https://huggingface.co/flaubert/flaubert_small_cased/resolve/main/config.json''',
    '''flaubert/flaubert_base_uncased''': '''https://huggingface.co/flaubert/flaubert_base_uncased/resolve/main/config.json''',
    '''flaubert/flaubert_base_cased''': '''https://huggingface.co/flaubert/flaubert_base_cased/resolve/main/config.json''',
    '''flaubert/flaubert_large_cased''': '''https://huggingface.co/flaubert/flaubert_large_cased/resolve/main/config.json''',
}


class 						lowerCamelCase__			(		_a ):
						_lowerCAmelCase             =			'''flaubert'''
						_lowerCAmelCase             =			{
						    '''hidden_size''': '''emb_dim''',
						    '''num_attention_heads''': '''n_heads''',
						    '''num_hidden_layers''': '''n_layers''',
						    '''n_words''': '''vocab_size''',  # For backward compatibility
						}


						def __init__(			self    :	Union[str, Any]   ,							_a    :	Tuple=False   ,							_a    :	Dict=0.0   ,							_a    :	str=3_0_1_4_5   ,							_a    :	Union[str, Any]=2_0_4_8   ,							_a    :	List[Any]=1_2   ,							_a    :	List[str]=1_6   ,							_a    :	Dict=0.1   ,							_a    :	Optional[int]=0.1   ,							_a    :	Dict=True   ,							_a    :	str=False   ,							_a    :	List[Any]=False   ,							_a    :	int=False   ,							_a    :	Optional[int]=1   ,							_a    :	str=True   ,							_a    :	List[str]=5_1_2   ,							_a    :	Tuple=2_0_4_8**-0.5   ,							_a    :	Optional[Any]=1e-12   ,							_a    :	Optional[Any]=0.0_2   ,							_a    :	Optional[Any]=0   ,							_a    :	Tuple=1   ,							_a    :	List[str]=2   ,							_a    :	Dict=3   ,							_a    :	str=5   ,							_a    :	Dict=True   ,							_a    :	Optional[int]="first"   ,							_a    :	Tuple=True   ,							_a    :	Any=None   ,							_a    :	Optional[int]=True   ,							_a    :	int=0.1   ,							_a    :	Optional[int]=5   ,							_a    :	List[Any]=5   ,							_a    :	str=0   ,							_a    :	List[Any]=0   ,							_a    :	List[str]=2   ,							_a    :	List[Any]=0   ,							**_a    :	Optional[Any]   ,							):
													a__:							List[Any]									=pre_norm
													a__:							List[str]									=layerdrop
													a__:							List[str]									=vocab_size
													a__:							str									=emb_dim
													a__:							Optional[int]									=n_layers
													a__:							int									=n_heads
													a__:							Optional[Any]									=dropout
													a__:							Optional[int]									=attention_dropout
													a__:							Dict									=gelu_activation
													a__:							str									=sinusoidal_embeddings
													a__:							Tuple									=causal
													a__:							Any									=asm
													a__:							List[str]									=n_langs
													a__:							str									=use_lang_emb
													a__:							List[Any]									=layer_norm_eps
													a__:							Optional[Any]									=bos_index
													a__:							Dict									=eos_index
													a__:							int									=pad_index
													a__:							Union[str, Any]									=unk_index
													a__:							List[Any]									=mask_index
													a__:							List[Any]									=is_encoder
													a__:							Any									=max_position_embeddings
													a__:							List[str]									=embed_init_std
													a__:							List[str]									=init_std
													a__:							Any									=summary_type
													a__:							Optional[int]									=summary_use_proj
													a__:							Dict									=summary_activation
													a__:							int									=summary_proj_to_labels
													a__:							int									=summary_first_dropout
													a__:							Tuple									=start_n_top
													a__:							Dict									=end_n_top
													a__:							str									=mask_token_id
													a__:							str									=lang_id

													if "n_words" in kwargs:
																				a__:							Tuple									=kwargs["n_words"]

													super().__init__(pad_token_id=UpperCAmelCase_   ,							bos_token_id=UpperCAmelCase_   ,							**UpperCAmelCase_      )


class 						lowerCamelCase__			(		_a ):


						@property
						def 	_lowerCamelCase      (			self    :	Any      ):
													if self.task == "multiple-choice":
																				a__:							Union[str, Any]									={0: "batch", 1: "choice", 2: "sequence"}
													else:
																				a__:							Dict									={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,
)


UpperCAmelCase__    :      Optional[Any]       					={
    '''configuration_rwkv''': ['''RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''RwkvConfig''', '''RwkvOnnxConfig'''],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCAmelCase__    :      Optional[Any]       					=[
							    '''RWKV_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''RwkvForCausalLM''',
							    '''RwkvModel''',
							    '''RwkvPreTrainedModel''',
							]


if TYPE_CHECKING:
							from .configuration_rwkv import RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP, RwkvConfig, RwkvOnnxConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_rwkv import (
														    RWKV_PRETRAINED_MODEL_ARCHIVE_LIST,
														    RwkvForCausalLM,
														    RwkvModel,
														    RwkvPreTrainedModel,
														)
else:
							import sys

							UpperCAmelCase__    :      int       					=_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





