
'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


__lowerCAmelCase												=	logging.get_logger(__name__)

__lowerCAmelCase												=	{
    'google/realm-cc-news-pretrained-embedder': (
        'https://huggingface.co/google/realm-cc-news-pretrained-embedder/resolve/main/config.json'
    ),
    'google/realm-cc-news-pretrained-encoder': (
        'https://huggingface.co/google/realm-cc-news-pretrained-encoder/resolve/main/config.json'
    ),
    'google/realm-cc-news-pretrained-scorer': (
        'https://huggingface.co/google/realm-cc-news-pretrained-scorer/resolve/main/config.json'
    ),
    'google/realm-cc-news-pretrained-openqa': (
        'https://huggingface.co/google/realm-cc-news-pretrained-openqa/aresolve/main/config.json'
    ),
    'google/realm-orqa-nq-openqa': 'https://huggingface.co/google/realm-orqa-nq-openqa/resolve/main/config.json',
    'google/realm-orqa-nq-reader': 'https://huggingface.co/google/realm-orqa-nq-reader/resolve/main/config.json',
    'google/realm-orqa-wq-openqa': 'https://huggingface.co/google/realm-orqa-wq-openqa/resolve/main/config.json',
    'google/realm-orqa-wq-reader': 'https://huggingface.co/google/realm-orqa-wq-reader/resolve/main/config.json',
    # See all REALM models at https://huggingface.co/models?filter=realm
}


class       _lowerCAmelCase   (   __snake_case				):







							'''simple docstring'''

							lowerCAmelCase_ 						=						"realm"

							def __init__(self  ,  UpperCAmelCase=30522  ,  UpperCAmelCase=768  ,  UpperCAmelCase=128  ,  UpperCAmelCase=12  ,  UpperCAmelCase=12  ,  UpperCAmelCase=8  ,  UpperCAmelCase=3072  ,  UpperCAmelCase="gelu_new"  ,  UpperCAmelCase=0.1  ,  UpperCAmelCase=0.1  ,  UpperCAmelCase=512  ,  UpperCAmelCase=2  ,  UpperCAmelCase=0.02  ,  UpperCAmelCase=1e-1_2  ,  UpperCAmelCase=256  ,  UpperCAmelCase=10  ,  UpperCAmelCase=1e-3  ,  UpperCAmelCase=5  ,  UpperCAmelCase=320  ,  UpperCAmelCase=13353718  ,  UpperCAmelCase=5000  ,  UpperCAmelCase=1  ,  UpperCAmelCase=0  ,  UpperCAmelCase=2  ,  **UpperCAmelCase  ,  )					->       Dict:
														super().__init__(pad_token_id=UpperCAmelCase  ,  bos_token_id=UpperCAmelCase  ,  eos_token_id=UpperCAmelCase  ,  **UpperCAmelCase  )

														# Common config
														_snake_case       =  vocab_size
														_snake_case       =  max_position_embeddings
														_snake_case       =  hidden_size
														_snake_case       =  retriever_proj_size
														_snake_case       =  num_hidden_layers
														_snake_case       =  num_attention_heads
														_snake_case       =  num_candidates
														_snake_case       =  intermediate_size
														_snake_case       =  hidden_act
														_snake_case       =  hidden_dropout_prob
														_snake_case       =  attention_probs_dropout_prob
														_snake_case       =  initializer_range
														_snake_case       =  type_vocab_size
														_snake_case       =  layer_norm_eps

														# Reader config
														_snake_case       =  span_hidden_size
														_snake_case       =  max_span_width
														_snake_case       =  reader_layer_norm_eps
														_snake_case       =  reader_beam_size
														_snake_case       =  reader_seq_len

														# Retrieval config
														_snake_case       =  num_block_records
														_snake_case       =  searcher_beam_size

'''simple docstring'''
from typing import TYPE_CHECKING

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


__lowerCAmelCase												=	{
    'configuration_encodec': [
        'ENCODEC_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'EncodecConfig',
    ],
    'feature_extraction_encodec': ['EncodecFeatureExtractor'],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__lowerCAmelCase												=	[
				    'ENCODEC_PRETRAINED_MODEL_ARCHIVE_LIST',
				    'EncodecModel',
				    'EncodecPreTrainedModel',
				]

if TYPE_CHECKING:
				from .configuration_encodec import (
				    ENCODEC_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    EncodecConfig,
				)
				from .feature_extraction_encodec import EncodecFeatureExtractor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_encodec import (
								    ENCODEC_PRETRAINED_MODEL_ARCHIVE_LIST,
								    EncodecModel,
								    EncodecPreTrainedModel,
								)

else:
				import sys

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