





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


UpperCAmelCase_           =	logging.get_logger(__name__)

UpperCAmelCase_           =	{
    "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    (							A__    ):
     __A	:  int							  =   """xglm"""
     __A	:  Tuple							  =   ["""past_key_values"""]

     __A	:  Union[str, Any]							  =   {
         """num_attention_heads""": """attention_heads""",
         """hidden_size""": """d_model""",
         """num_hidden_layers""": """num_layers""",
     }





     def __init__(     self				,							_UpperCamelCase=256008				,							_UpperCamelCase=2048				,							_UpperCamelCase=1024				,							_UpperCamelCase=4096				,							_UpperCamelCase=24				,							_UpperCamelCase=16				,							_UpperCamelCase="gelu"				,							_UpperCamelCase=0.1				,							_UpperCamelCase=0.1				,							_UpperCamelCase=0.0				,							_UpperCamelCase=0.0				,							_UpperCamelCase=0.02				,							_UpperCamelCase=True				,							_UpperCamelCase=True				,							_UpperCamelCase=2				,							_UpperCamelCase=1				,							_UpperCamelCase=0				,							_UpperCamelCase=2				,							**_UpperCamelCase				,							):
        _UpperCAmelCase           =   vocab_size
        _UpperCAmelCase           =   max_position_embeddings
        _UpperCAmelCase           =   d_model
        _UpperCAmelCase           =   ffn_dim
        _UpperCAmelCase           =   num_layers
        _UpperCAmelCase           =   attention_heads
        _UpperCAmelCase           =   activation_function
        _UpperCAmelCase           =   dropout
        _UpperCAmelCase           =   attention_dropout
        _UpperCAmelCase           =   activation_dropout
        _UpperCAmelCase           =   layerdrop
        _UpperCAmelCase           =   init_std
        _UpperCAmelCase           =   scale_embedding  # scale factor will be sqrt(d_model) if True
        _UpperCAmelCase           =   use_cache

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






from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Value
from .base import TaskTemplate




@dataclass(frozen=A__    )
class 			__UpperCamelCase    (							A__    ):
     __A	:  str							  =   field(default="""language-modeling"""	, metadata={"""include_in_asdict_even_if_is_default""": True}    )

     __A	:  ClassVar[Features]							  =   Features({"""text""": Value("""string"""    )}    )
     __A	:  ClassVar[Features]							  =   Features({}    )
     __A	:  str							  =   "text"





     @property
     def 		UpperCamelCase(     self					):
        return {self.text_column: "text"}