

"""simple docstring"""





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


_a       =							logging.get_logger(__name__)

_a       =							{
    'RWKV/rwkv-4-169m-pile': 'https://huggingface.co/RWKV/rwkv-4-169m-pile/resolve/main/config.json',
    'RWKV/rwkv-4-430m-pile': 'https://huggingface.co/RWKV/rwkv-4-430m-pile/resolve/main/config.json',
    'RWKV/rwkv-4-1b5-pile': 'https://huggingface.co/RWKV/rwkv-4-1b5-pile/resolve/main/config.json',
    'RWKV/rwkv-4-3b-pile': 'https://huggingface.co/RWKV/rwkv-4-3b-pile/resolve/main/config.json',
    'RWKV/rwkv-4-7b-pile': 'https://huggingface.co/RWKV/rwkv-4-7b-pile/resolve/main/config.json',
    'RWKV/rwkv-4-14b-pile': 'https://huggingface.co/RWKV/rwkv-4-14b-pile/resolve/main/config.json',
    'RWKV/rwkv-raven-1b5': 'https://huggingface.co/RWKV/rwkv-raven-1b5/resolve/main/config.json',
    'RWKV/rwkv-raven-3b': 'https://huggingface.co/RWKV/rwkv-raven-3b/resolve/main/config.json',
    'RWKV/rwkv-raven-7b': 'https://huggingface.co/RWKV/rwkv-raven-7b/resolve/main/config.json',
    'RWKV/rwkv-raven-14b': 'https://huggingface.co/RWKV/rwkv-raven-14b/resolve/main/config.json',
}




class 					_lowerCAmelCase  (	lowercase   ):







 """simple docstring"""







 __UpperCAmelCase	:					List[str]   		=	"rwkv"
 __UpperCAmelCase	:					List[Any]   		=	{"max_position_embeddings": "context_length"}


 def __init__(			self							:			Optional[Any],					UpperCAmelCase__							:			Any=5_0_2_7_7,					UpperCAmelCase__							:			Union[str, Any]=1_0_2_4,					UpperCAmelCase__							:			int=4_0_9_6,					UpperCAmelCase__							:			str=3_2,					UpperCAmelCase__							:			int=None,					UpperCAmelCase__							:			Optional[int]=None,					UpperCAmelCase__							:			Optional[int]=1E-5,					UpperCAmelCase__							:			str=0,					UpperCAmelCase__							:			Optional[int]=0,					UpperCAmelCase__							:			Optional[int]=6,					UpperCAmelCase__							:			Any=False,					UpperCAmelCase__							:			Any=True,					**UpperCAmelCase__							:			int,					):
    __lowercase								=						vocab_size
    __lowercase								=						context_length
    __lowercase								=						hidden_size
    __lowercase								=						num_hidden_layers
    __lowercase								=						attention_hidden_size if attention_hidden_size is not None else hidden_size
    __lowercase								=						intermediate_size if intermediate_size is not None else 4 * hidden_size
    __lowercase								=						layer_norm_epsilon
    __lowercase								=						rescale_every
    __lowercase								=						use_cache

    __lowercase								=						bos_token_id
    __lowercase								=						eos_token_id

    super().__init__(
        tie_word_embeddings=UpperCAmelCase__,					bos_token_id=UpperCAmelCase__,					eos_token_id=UpperCAmelCase__,					**UpperCAmelCase__	)











from typing import TYPE_CHECKING

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


UpperCAmelCase						:   Optional[int]			  =     {
    '''configuration_xlm''': ['''XLM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''XLMConfig''', '''XLMOnnxConfig'''],
    '''tokenization_xlm''': ['''XLMTokenizer'''],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCAmelCase						:   Union[str, Any]			  =     [
				    '''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:
				UpperCAmelCase						:   Optional[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

				UpperCAmelCase						:   str			  =     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




