






'''simple docstring'''




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


lowerCAmelCase__          =						logging.get_logger(__name__)

lowerCAmelCase__          =						{'ctrl': 'https://huggingface.co/ctrl/resolve/main/config.json'}







class       __lowercase					(__lowerCamelCase    ):
 _lowerCamelCase              =  '''ctrl'''
 _lowerCamelCase              =  ['''past_key_values''']
 _lowerCamelCase              =  {
     '''max_position_embeddings''': '''n_positions''',
     '''hidden_size''': '''n_embd''',
     '''num_attention_heads''': '''n_head''',
     '''num_hidden_layers''': '''n_layer''',
 }

 def __init__(      self   :						Optional[Any]  ,					UpperCAmelCase_   :						Any=246_534  ,					UpperCAmelCase_   :						Dict=256  ,					UpperCAmelCase_   :						List[Any]=1_280  ,					UpperCAmelCase_   :						Dict=8_192  ,					UpperCAmelCase_   :						List[str]=48  ,					UpperCAmelCase_   :						int=16  ,					UpperCAmelCase_   :						List[Any]=0.1  ,					UpperCAmelCase_   :						str=0.1  ,					UpperCAmelCase_   :						int=1e-6  ,					UpperCAmelCase_   :						Any=0.02  ,					UpperCAmelCase_   :						Any=True  ,					**UpperCAmelCase_   :						Any  ,					):
   UpperCamelCase__				:					Dict					=					vocab_size
   UpperCamelCase__				:					Any					=					n_positions
   UpperCamelCase__				:					Optional[int]					=					n_embd
   UpperCamelCase__				:					List[Any]					=					n_layer
   UpperCamelCase__				:					Union[str, Any]					=					n_head
   UpperCamelCase__				:					str					=					dff
   UpperCamelCase__				:					Tuple					=					resid_pdrop
   UpperCamelCase__				:					Any					=					embd_pdrop
   UpperCamelCase__				:					Dict					=					layer_norm_epsilon
   UpperCamelCase__				:					Tuple					=					initializer_range

   UpperCamelCase__				:					Any					=					use_cache

   super().__init__(**a_)












'''simple docstring'''




from ..utils import DummyObject, requires_backends







class       __lowercase					(metaclass=__lowerCamelCase    ):
	_lowerCamelCase              =  ['''torch''', '''scipy''']

	def __init__(      self   :						List[Any]  ,					*UpperCAmelCase_   :						Any  ,					**UpperCAmelCase_   :						int):
			requires_backends(self  ,					['torch', 'scipy'])

	@classmethod
	def      __UpperCamelCase							(      cls   :						Union[str, Any]  ,					*UpperCAmelCase_   :						Any  ,					**UpperCAmelCase_   :						List[Any]):
			requires_backends(cls  ,					['torch', 'scipy'])





	@classmethod
	def      __UpperCamelCase							(      cls   :						Union[str, Any]  ,					*UpperCAmelCase_   :						Optional[Any]  ,					**UpperCAmelCase_   :						Any):
			requires_backends(cls  ,					['torch', 'scipy'])




