'''simple docstring'''




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


_A								=   logging.get_logger(__name__)

_A								=   {
    "facebook/xglm-564M": "https://huggingface.co/facebook/xglm-564M/resolve/main/config.json",
    # See all XGLM models at https://huggingface.co/models?filter=xglm
}


class       UpperCAmelCase__  (       lowercase__			):






   """simple docstring"""
   A							:       Dict     =    '''xglm'''
   A							:       Optional[Any]     =    ['''past_key_values''']

   A							:       Union[str, Any]     =    {
       '''num_attention_heads''': '''attention_heads''',
       '''hidden_size''': '''d_model''',
       '''num_hidden_layers''': '''num_layers''',
   }
   def __init__(self       ,				_a=256_008       ,				_a=2_048       ,				_a=1_024       ,				_a=4_096       ,				_a=24       ,				_a=16       ,				_a="gelu"       ,				_a=0.1       ,				_a=0.1       ,				_a=0.0       ,				_a=0.0       ,				_a=0.02       ,				_a=True       ,				_a=True       ,				_a=2       ,				_a=1       ,				_a=0       ,				_a=2       ,				**_a       ,				)    ->     Tuple:
        lowercase_					:       str     				=					vocab_size
        lowercase_					:       str     				=					max_position_embeddings
        lowercase_					:       str     				=					d_model
        lowercase_					:       Any     				=					ffn_dim
        lowercase_					:       str     				=					num_layers
        lowercase_					:       List[Any]     				=					attention_heads
        lowercase_					:       Optional[int]     				=					activation_function
        lowercase_					:       Optional[int]     				=					dropout
        lowercase_					:       Union[str, Any]     				=					attention_dropout
        lowercase_					:       Union[str, Any]     				=					activation_dropout
        lowercase_					:       Optional[int]     				=					layerdrop
        lowercase_					:       int     				=					init_std
        lowercase_					:       str     				=					scale_embedding  # scale factor will be sqrt(d_model) if True
        lowercase_					:       str     				=					use_cache

        super().__init__(
            pad_token_id=_a       ,				bos_token_id=_a       ,				eos_token_id=_a       ,				decoder_start_token_id=_a       ,				**_a       ,				)







'''simple docstring'''




from decimal import Decimal, getcontext
from math import ceil, factorial

def _UpperCamelCase   (       SCREAMING_SNAKE_CASE_							):

     if not isinstance(SCREAMING_SNAKE_CASE_  ,       SCREAMING_SNAKE_CASE_							):
          raise TypeError('Undefined for non-integers'							)
     elif precision < 1:
          raise ValueError('Undefined for non-natural numbers'							)

     lowercase_					:       str     				=					precision
     lowercase_					:       List[str]     				=					ceil(precision / 14							)
     lowercase_					:       Union[str, Any]     				=					426_880 * Decimal(10_005							).sqrt()
     lowercase_					:       List[Any]     				=					1
     lowercase_					:       Optional[int]     				=					13_591_409
     lowercase_					:       Dict     				=					Decimal(SCREAMING_SNAKE_CASE_							)
     for k in range(1  ,       SCREAMING_SNAKE_CASE_							):
          lowercase_					:       List[str]     				=					factorial(6 * k							) // (factorial(3 * k							) * factorial(SCREAMING_SNAKE_CASE_							) ** 3)
          linear_term += 545_140_134
          exponential_term *= -262_537_412_640_768_000
          partial_sum += Decimal(multinomial_term * linear_term							) / exponential_term
     return str(constant_term / partial_sum							)[:-1]


if __name__ == "__main__":
 _A								=   5_0
 print(F"""The first {n} digits of pi is: {pi(n)}""")




