






'''simple docstring'''







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


__lowerCAmelCase        =							logging.get_logger(__name__)

__lowerCAmelCase        =							{
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}




class   __SCREAMING_SNAKE_CASE       (__A       ):


  """simple docstring"""


  _a  : int      			=     '''megatron-bert'''







  def __init__(			self   ,	UpperCamelCase__=29_056   ,	UpperCamelCase__=1_024   ,	UpperCamelCase__=24   ,	UpperCamelCase__=16   ,	UpperCamelCase__=4_096   ,	UpperCamelCase__="gelu"   ,	UpperCamelCase__=0.1   ,	UpperCamelCase__=0.1   ,	UpperCamelCase__=512   ,	UpperCamelCase__=2   ,	UpperCamelCase__=0.02   ,	UpperCamelCase__=1e-12   ,	UpperCamelCase__=0   ,	UpperCamelCase__="absolute"   ,	UpperCamelCase__=True   ,	**UpperCamelCase__   ,	):






         """simple docstring"""


         super().__init__(pad_token_id=UpperCamelCase__   ,	**UpperCamelCase__	)

         a_						     =			vocab_size
         a_						     =			hidden_size
         a_						     =			num_hidden_layers
         a_						     =			num_attention_heads
         a_						     =			hidden_act
         a_						     =			intermediate_size
         a_						     =			hidden_dropout_prob
         a_						     =			attention_probs_dropout_prob
         a_						     =			max_position_embeddings
         a_						     =			type_vocab_size
         a_						     =			initializer_range
         a_						     =			layer_norm_eps
         a_						     =			position_embedding_type
         a_						     =			use_cache












'''simple docstring'''







import os
import sys
import unittest


__lowerCAmelCase        =							os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
sys.path.append(os.path.join(git_repo_path, "utils"))

import get_test_info  # noqa: E402
from get_test_info import (  # noqa: E402
    get_model_to_test_mapping,
    get_model_to_tester_mapping,
    get_test_to_tester_mapping,
)


__lowerCAmelCase        =							os.path.join("tests", "models", "bert", "test_modeling_bert.py")
__lowerCAmelCase        =							os.path.join("tests", "models", "blip", "test_modeling_blip.py")




class   __SCREAMING_SNAKE_CASE       (unittest.TestCase       ):


  """simple docstring"""


  def    _a       (			self	):






         """simple docstring"""


         a_						     =			get_test_to_tester_mapping(UpperCamelCase__	)
         a_						     =			get_test_to_tester_mapping(UpperCamelCase__	)

         a_						     =			{'BertModelTest': 'BertModelTester'}

         a_						     =			{
             'BlipModelTest': 'BlipModelTester',
             'BlipTextImageModelTest': 'BlipTextImageModelsModelTester',
             'BlipTextModelTest': 'BlipTextModelTester',
             'BlipTextRetrievalModelTest': 'BlipTextRetrievalModelTester',
             'BlipVQAModelTest': 'BlipVQAModelTester',
             'BlipVisionModelTest': 'BlipVisionModelTester',
         }

         self.assertEqual(get_test_info.to_json(UpperCamelCase__	)   ,	UpperCamelCase__	)
         self.assertEqual(get_test_info.to_json(UpperCamelCase__	)   ,	UpperCamelCase__	)







  def    _a       (			self	):






         """simple docstring"""


         a_						     =			get_model_to_test_mapping(UpperCamelCase__	)
         a_						     =			get_model_to_test_mapping(UpperCamelCase__	)

         a_						     =			{
             'BertForMaskedLM': ['BertModelTest'],
             'BertForMultipleChoice': ['BertModelTest'],
             'BertForNextSentencePrediction': ['BertModelTest'],
             'BertForPreTraining': ['BertModelTest'],
             'BertForQuestionAnswering': ['BertModelTest'],
             'BertForSequenceClassification': ['BertModelTest'],
             'BertForTokenClassification': ['BertModelTest'],
             'BertLMHeadModel': ['BertModelTest'],
             'BertModel': ['BertModelTest'],
         }

         a_						     =			{
             'BlipForConditionalGeneration': ['BlipTextImageModelTest'],
             'BlipForImageTextRetrieval': ['BlipTextRetrievalModelTest'],
             'BlipForQuestionAnswering': ['BlipVQAModelTest'],
             'BlipModel': ['BlipModelTest'],
             'BlipTextModel': ['BlipTextModelTest'],
             'BlipVisionModel': ['BlipVisionModelTest'],
         }

         self.assertEqual(get_test_info.to_json(UpperCamelCase__	)   ,	UpperCamelCase__	)
         self.assertEqual(get_test_info.to_json(UpperCamelCase__	)   ,	UpperCamelCase__	)







  def    _a       (			self	):






         """simple docstring"""


         a_						     =			get_model_to_tester_mapping(UpperCamelCase__	)
         a_						     =			get_model_to_tester_mapping(UpperCamelCase__	)

         a_						     =			{
             'BertForMaskedLM': ['BertModelTester'],
             'BertForMultipleChoice': ['BertModelTester'],
             'BertForNextSentencePrediction': ['BertModelTester'],
             'BertForPreTraining': ['BertModelTester'],
             'BertForQuestionAnswering': ['BertModelTester'],
             'BertForSequenceClassification': ['BertModelTester'],
             'BertForTokenClassification': ['BertModelTester'],
             'BertLMHeadModel': ['BertModelTester'],
             'BertModel': ['BertModelTester'],
         }

         a_						     =			{
             'BlipForConditionalGeneration': ['BlipTextImageModelsModelTester'],
             'BlipForImageTextRetrieval': ['BlipTextRetrievalModelTester'],
             'BlipForQuestionAnswering': ['BlipVQAModelTester'],
             'BlipModel': ['BlipModelTester'],
             'BlipTextModel': ['BlipTextModelTester'],
             'BlipVisionModel': ['BlipVisionModelTester'],
         }

         self.assertEqual(get_test_info.to_json(UpperCamelCase__	)   ,	UpperCamelCase__	)
         self.assertEqual(get_test_info.to_json(UpperCamelCase__	)   ,	UpperCamelCase__	)




