





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


A   : Tuple			=				logging.get_logger(__name__)

A   : List[str]			=				{
    '''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   A      (SCREAMING_SNAKE_CASE   ):
			'''simple docstring'''




			__lowerCamelCase     :	List[str]          =   '''realm'''






			def __init__(      self       :   Optional[Any]							,     __lowerCAmelCase       :   Optional[Any]=3_05_22							,     __lowerCAmelCase       :   List[str]=7_68							,     __lowerCAmelCase       :   Dict=1_28							,     __lowerCAmelCase       :   List[str]=12							,     __lowerCAmelCase       :   int=12							,     __lowerCAmelCase       :   Dict=8							,     __lowerCAmelCase       :   str=30_72							,     __lowerCAmelCase       :   Union[str, Any]="gelu_new"							,     __lowerCAmelCase       :   Optional[Any]=0.1							,     __lowerCAmelCase       :   Tuple=0.1							,     __lowerCAmelCase       :   int=5_12							,     __lowerCAmelCase       :   Union[str, Any]=2							,     __lowerCAmelCase       :   List[str]=0.0_2							,     __lowerCAmelCase       :   List[Any]=1e-12							,     __lowerCAmelCase       :   Union[str, Any]=2_56							,     __lowerCAmelCase       :   Optional[int]=10							,     __lowerCAmelCase       :   Any=1e-3							,     __lowerCAmelCase       :   str=5							,     __lowerCAmelCase       :   int=3_20							,     __lowerCAmelCase       :   int=13_35_37_18							,     __lowerCAmelCase       :   int=50_00							,     __lowerCAmelCase       :   Union[str, Any]=1							,     __lowerCAmelCase       :   Any=0							,     __lowerCAmelCase       :   Union[str, Any]=2							,     **__lowerCAmelCase       :   Any							,     )     ->     Tuple:







					"""simple docstring"""






					super().__init__(pad_token_id=__lowerCAmelCase							,     bos_token_id=__lowerCAmelCase							,     eos_token_id=__lowerCAmelCase							,     **__lowerCAmelCase       )

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

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

					# Retrieval config
					A__  				=       num_block_records
					A__  				=       searcher_beam_size










from ...utils import is_note_seq_available, is_transformers_available, is_torch_available
from ...utils import OptionalDependencyNotAvailable


try:
					if not (is_transformers_available() and is_torch_available()):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
					from .notes_encoder import SpectrogramNotesEncoder
					from .continous_encoder import SpectrogramContEncoder
					from .pipeline_spectrogram_diffusion import (
					    SpectrogramContEncoder,
					    SpectrogramDiffusionPipeline,
					    TaFilmDecoder,
					)

try:
					if not (is_transformers_available() and is_torch_available() and is_note_seq_available()):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_transformers_and_torch_and_note_seq_objects import *  # noqa F403
else:
					from .midi_utils import MidiProcessor



