



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


lowerCAmelCase:      Dict		 =		logging.get_logger(__name__)

lowerCAmelCase:      Dict		 =		{
    '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__(      snake_case__			):
    lowercase__				=					"""realm"""







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

      # Common config
      a		:      str       =  vocab_size
      a		:      str       =  max_position_embeddings
      a		:      Union[str, Any]       =  hidden_size
      a		:      List[str]       =  retriever_proj_size
      a		:      Any       =  num_hidden_layers
      a		:      Optional[int]       =  num_attention_heads
      a		:      Optional[int]       =  num_candidates
      a		:      List[Any]       =  intermediate_size
      a		:      str       =  hidden_act
      a		:      Union[str, Any]       =  hidden_dropout_prob
      a		:      Dict       =  attention_probs_dropout_prob
      a		:      Optional[Any]       =  initializer_range
      a		:      str       =  type_vocab_size
      a		:      Optional[Any]       =  layer_norm_eps

      # Reader config
      a		:      int       =  span_hidden_size
      a		:      Union[str, Any]       =  max_span_width
      a		:      str       =  reader_layer_norm_eps
      a		:      Tuple       =  reader_beam_size
      a		:      Dict       =  reader_seq_len

      # Retrieval config
      a		:      Union[str, Any]       =  num_block_records
      a		:      Union[str, Any]       =  searcher_beam_size




'''simple docstring'''






import warnings

from ...utils import logging
from .image_processing_chinese_clip import ChineseCLIPImageProcessor


lowerCAmelCase:      Optional[Any]		 =		logging.get_logger(__name__)

class 							a__(      lowerCamelCase__			):







    def __init__(   self				:						Union[str, Any]		,    *__snake_case				:						List[str]		,    **__snake_case				:						Union[str, Any]			):
      warnings.warn(
          'The class ChineseCLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers.'
          ' Please use ChineseCLIPImageProcessor instead.'		,    __snake_case		,    )
      super().__init__(*__snake_case		,    **__snake_case			)