






'''simple docstring'''

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


SCREAMING_SNAKE_CASE__     =       logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__     =       {'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}






class     a_						(      lowerCamelCase    ):
  lowercase							=				"""openai-gpt"""
  lowercase							=				{
      """max_position_embeddings""": """n_positions""",
      """hidden_size""": """n_embd""",
      """num_attention_heads""": """n_head""",
      """num_hidden_layers""": """n_layer""",
  }

  def __init__(				self      ,		_SCREAMING_SNAKE_CASE=40478      ,		_SCREAMING_SNAKE_CASE=512      ,		_SCREAMING_SNAKE_CASE=768      ,		_SCREAMING_SNAKE_CASE=12      ,		_SCREAMING_SNAKE_CASE=12      ,		_SCREAMING_SNAKE_CASE="gelu"      ,		_SCREAMING_SNAKE_CASE=0.1      ,		_SCREAMING_SNAKE_CASE=0.1      ,		_SCREAMING_SNAKE_CASE=0.1      ,		_SCREAMING_SNAKE_CASE=1e-5      ,		_SCREAMING_SNAKE_CASE=0.0_2      ,		_SCREAMING_SNAKE_CASE="cls_index"      ,		_SCREAMING_SNAKE_CASE=True      ,		_SCREAMING_SNAKE_CASE=None      ,		_SCREAMING_SNAKE_CASE=True      ,		_SCREAMING_SNAKE_CASE=0.1      ,		**_SCREAMING_SNAKE_CASE      ,		)  ->				Union[str, Any]:



        """simple docstring"""






        UpperCamelCase      = vocab_size
        UpperCamelCase      = n_positions
        UpperCamelCase      = n_embd
        UpperCamelCase      = n_layer
        UpperCamelCase      = n_head
        UpperCamelCase      = afn
        UpperCamelCase      = resid_pdrop
        UpperCamelCase      = embd_pdrop
        UpperCamelCase      = attn_pdrop
        UpperCamelCase      = layer_norm_epsilon
        UpperCamelCase      = initializer_range
        UpperCamelCase      = summary_type
        UpperCamelCase      = summary_use_proj
        UpperCamelCase      = summary_activation
        UpperCamelCase      = summary_first_dropout
        UpperCamelCase      = summary_proj_to_labels
        super().__init__(**_SCREAMING_SNAKE_CASE				)








'''simple docstring'''

from timeit import timeit







def    lowercase__			(				__UpperCamelCase   )->			int:
      if number < 0:
            raise ValueError("""the value of input must not be negative"""   )
      UpperCamelCase      = 0
      while number:
            number &= number - 1
            result += 1
      return result







def    lowercase__			(				__UpperCamelCase   )->			int:
      if number < 0:
            raise ValueError("""the value of input must not be negative"""   )
      UpperCamelCase      = 0
      while number:
            if number % 2 == 1:
                  result += 1
            number >>= 1
      return result







def    lowercase__			(				)->			None:

      def do_benchmark(__UpperCamelCase   ) -> None:
            UpperCamelCase      = """import __main__ as z"""
            print(F"Benchmark when {number = }:"   )
            print(F"{get_set_bits_count_using_modulo_operator(__UpperCamelCase   ) = }"   )
            UpperCamelCase      = timeit("""z.get_set_bits_count_using_modulo_operator(25)"""		,						setup=__UpperCamelCase   )
            print(F"timeit() runs in {timing} seconds"   )
            print(F"{get_set_bits_count_using_brian_kernighans_algorithm(__UpperCamelCase   ) = }"   )
            UpperCamelCase      = timeit(
                """z.get_set_bits_count_using_brian_kernighans_algorithm(25)"""		,						setup=__UpperCamelCase		,						)
            print(F"timeit() runs in {timing} seconds"   )

      for number in (25, 37, 58, 0):
            do_benchmark(__UpperCamelCase   )
            print()


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     benchmark()
