




"""simple docstring"""






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


UpperCamelCase__						=			logging.get_logger(__name__)

UpperCamelCase__						=			{
    "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   a__     (       _A  ):
						snake_case__             = '''rwkv'''
						snake_case__             = {'''max_position_embeddings''': '''context_length'''}





						def __init__(							self      :	str     ,a__      :	List[Any]=5_0277     ,a__      :	Optional[int]=1024     ,a__      :	int=4096     ,a__      :	Union[str, Any]=32     ,a__      :	Optional[Any]=None     ,a__      :	List[Any]=None     ,a__      :	Union[str, Any]=1E-5     ,a__      :	Optional[int]=0     ,a__      :	Union[str, Any]=0     ,a__      :	Tuple=6     ,a__      :	Dict=False     ,a__      :	List[str]=True     ,**a__      :	Tuple     ,)						->       Dict:




											"""simple docstring"""







											_lowerCAmelCase:Dict									=  vocab_size
											_lowerCAmelCase:Optional[int]									=  context_length
											_lowerCAmelCase:int									=  hidden_size
											_lowerCAmelCase:Optional[Any]									=  num_hidden_layers
											_lowerCAmelCase:Union[str, Any]									=  attention_hidden_size if attention_hidden_size is not None else hidden_size
											_lowerCAmelCase:List[Any]									=  intermediate_size if intermediate_size is not None else 4 * hidden_size
											_lowerCAmelCase:List[str]									=  layer_norm_epsilon
											_lowerCAmelCase:Tuple									=  rescale_every
											_lowerCAmelCase:Optional[int]									=  use_cache

											_lowerCAmelCase:Dict									=  bos_token_id
											_lowerCAmelCase:List[str]									=  eos_token_id

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












"""simple docstring"""






from typing import TYPE_CHECKING

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


UpperCamelCase__						=			{
    '''configuration_convbert''': ['''CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ConvBertConfig''', '''ConvBertOnnxConfig'''],
    '''tokenization_convbert''': ['''ConvBertTokenizer'''],
}

try:
				if not is_tokenizers_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCamelCase__						=			['''ConvBertTokenizerFast''']

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCamelCase__						=			[
				    '''CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
				    '''ConvBertForMaskedLM''',
				    '''ConvBertForMultipleChoice''',
				    '''ConvBertForQuestionAnswering''',
				    '''ConvBertForSequenceClassification''',
				    '''ConvBertForTokenClassification''',
				    '''ConvBertLayer''',
				    '''ConvBertModel''',
				    '''ConvBertPreTrainedModel''',
				    '''load_tf_weights_in_convbert''',
				]


try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCamelCase__						=			[
				    '''TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
				    '''TFConvBertForMaskedLM''',
				    '''TFConvBertForMultipleChoice''',
				    '''TFConvBertForQuestionAnswering''',
				    '''TFConvBertForSequenceClassification''',
				    '''TFConvBertForTokenClassification''',
				    '''TFConvBertLayer''',
				    '''TFConvBertModel''',
				    '''TFConvBertPreTrainedModel''',
				]


if TYPE_CHECKING:
				from .configuration_convbert import CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, ConvBertConfig, ConvBertOnnxConfig
				from .tokenization_convbert import ConvBertTokenizer

				try:
								if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_convbert_fast import ConvBertTokenizerFast

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_convbert import (
								    CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    ConvBertForMaskedLM,
								    ConvBertForMultipleChoice,
								    ConvBertForQuestionAnswering,
								    ConvBertForSequenceClassification,
								    ConvBertForTokenClassification,
								    ConvBertLayer,
								    ConvBertModel,
								    ConvBertPreTrainedModel,
								    load_tf_weights_in_convbert,
								)

				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_convbert import (
								    TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    TFConvBertForMaskedLM,
								    TFConvBertForMultipleChoice,
								    TFConvBertForQuestionAnswering,
								    TFConvBertForSequenceClassification,
								    TFConvBertForTokenClassification,
								    TFConvBertLayer,
								    TFConvBertModel,
								    TFConvBertPreTrainedModel,
								)


else:
				import sys

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






