




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


_UpperCAmelCase	:						Optional[int]			=     logging.get_logger(__name__)

_UpperCAmelCase	:						Tuple			=     {"openai-gpt": "https://huggingface.co/openai-gpt/resolve/main/config.json"}




class    __lowerCAmelCase       (							lowerCAmelCase):
       _a 					=						'''openai-gpt'''
       _a 					=						{
           '''max_position_embeddings''': '''n_positions''',
           '''hidden_size''': '''n_embd''',
           '''num_attention_heads''': '''n_head''',
           '''num_hidden_layers''': '''n_layer''',
       }






       def __init__(   self:					Tuple       ,					_lowerCAmelCase:					Optional[int]=4_04_78       ,					_lowerCAmelCase:					Optional[Any]=5_12       ,					_lowerCAmelCase:					List[Any]=7_68       ,					_lowerCAmelCase:					str=12       ,					_lowerCAmelCase:					int=12       ,					_lowerCAmelCase:					Any="gelu"       ,					_lowerCAmelCase:					List[str]=0.1       ,					_lowerCAmelCase:					Optional[Any]=0.1       ,					_lowerCAmelCase:					str=0.1       ,					_lowerCAmelCase:					Optional[int]=1e-5       ,					_lowerCAmelCase:					List[str]=0.02       ,					_lowerCAmelCase:					int="cls_index"       ,					_lowerCAmelCase:					Optional[Any]=True       ,					_lowerCAmelCase:					Tuple=None       ,					_lowerCAmelCase:					str=True       ,					_lowerCAmelCase:					Optional[int]=0.1       ,					**_lowerCAmelCase:					List[str]       ,					):
         lowercase    :Any      	=						vocab_size
         lowercase    :List[str]      	=						n_positions
         lowercase    :Any      	=						n_embd
         lowercase    :Dict      	=						n_layer
         lowercase    :int      	=						n_head
         lowercase    :List[Any]      	=						afn
         lowercase    :int      	=						resid_pdrop
         lowercase    :List[str]      	=						embd_pdrop
         lowercase    :List[Any]      	=						attn_pdrop
         lowercase    :List[str]      	=						layer_norm_epsilon
         lowercase    :List[str]      	=						initializer_range
         lowercase    :Dict      	=						summary_type
         lowercase    :Tuple      	=						summary_use_proj
         lowercase    :Union[str, Any]      	=						summary_activation
         lowercase    :Any      	=						summary_first_dropout
         lowercase    :List[str]      	=						summary_proj_to_labels
         super().__init__(**_lowerCAmelCase				)









def       UpperCAmelCase__  (     lowerCamelCase = "The quick brown fox jumps over the lazy dog",			):
  lowercase    :Dict      	=						set()

  # Replace all the whitespace in our sentence
  lowercase    :Optional[int]      	=						input_str.replace(" ",			""   )
  for alpha in input_str:
    if "a" <= alpha.lower() <= "z":
      frequency.add(alpha.lower()   )
  return len(lowerCamelCase   ) == 26



def       UpperCAmelCase__  (     lowerCamelCase = "The quick brown fox jumps over the lazy dog",			):
  lowercase    :Optional[Any]      	=						[False] * 26
  for char in input_str:
    if char.islower():
      lowercase    :Union[str, Any]      	=						True
    elif char.isupper():
      lowercase    :int      	=						True
  return all(lowerCamelCase   )



def       UpperCAmelCase__  (     lowerCamelCase = "The quick brown fox jumps over the lazy dog",			):
  return len({char for char in input_str.lower() if char.isalpha()}   ) == 26



def       UpperCAmelCase__  (     ):
  from timeit import timeit

  lowercase    :Optional[Any]      	=						"from __main__ import is_pangram, is_pangram_faster, is_pangram_fastest"
  print(timeit("is_pangram()",			setup=lowerCamelCase   )   )
  print(timeit("is_pangram_faster()",			setup=lowerCamelCase   )   )
  print(timeit("is_pangram_fastest()",			setup=lowerCamelCase   )   )
  # 5.348480500048026, 2.6477354579837993, 1.8470395830227062
  # 5.036091582966037, 2.644472333951853,  1.8869528750656173


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     benchmark()



