

'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


lowerCAmelCase__						:       Optional[int]										=						{
    """configuration_bloom""": ["""BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP""", """BloomConfig""", """BloomOnnxConfig"""],
}
try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase__						:       str										=						["""BloomTokenizerFast"""]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase__						:       Any										=						[
					    """BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """BloomForCausalLM""",
					    """BloomModel""",
					    """BloomPreTrainedModel""",
					    """BloomForSequenceClassification""",
					    """BloomForTokenClassification""",
					    """BloomForQuestionAnswering""",
					]

if TYPE_CHECKING:
					from .configuration_bloom import BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP, BloomConfig, BloomOnnxConfig

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_bloom_fast import BloomTokenizerFast

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_bloom import (
										    BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST,
										    BloomForCausalLM,
										    BloomForQuestionAnswering,
										    BloomForSequenceClassification,
										    BloomForTokenClassification,
										    BloomModel,
										    BloomPreTrainedModel,
										)

else:
					import sys

					lowerCAmelCase__						:       Tuple										=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






'''simple docstring'''


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


lowerCAmelCase__						:       Dict										=						logging.get_logger(__name__)

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




class     a			(				SCREAMING_SNAKE_CASE       ):






						"""simple docstring"""




						__UpperCAmelCase			     =    """ctrl"""
						__UpperCAmelCase			     =    ["""past_key_values"""]
						__UpperCAmelCase			     =    {
						    """max_position_embeddings""": """n_positions""",
						    """hidden_size""": """n_embd""",
						    """num_attention_heads""": """n_head""",
						    """num_hidden_layers""": """n_layer""",
						}







						def __init__(							self					:      Tuple			,			snake_case_					:      Dict=2_4_6_5_3_4			,			snake_case_					:      Optional[int]=2_5_6			,			snake_case_					:      Dict=1_2_8_0			,			snake_case_					:      Union[str, Any]=8_1_9_2			,			snake_case_					:      Any=4_8			,			snake_case_					:      List[Any]=1_6			,			snake_case_					:      Optional[Any]=0.1			,			snake_case_					:      Union[str, Any]=0.1			,			snake_case_					:      Optional[Any]=1e-6			,			snake_case_					:      List[Any]=0.0_2			,			snake_case_					:      Dict=True			,			**snake_case_					:      List[Any]			,			):



								'''simple docstring'''



								snake_case__						:       Any       						=  vocab_size
								snake_case__						:       int       						=  n_positions
								snake_case__						:       Optional[int]       						=  n_embd
								snake_case__						:       str       						=  n_layer
								snake_case__						:       Any       						=  n_head
								snake_case__						:       str       						=  dff
								snake_case__						:       Any       						=  resid_pdrop
								snake_case__						:       Tuple       						=  embd_pdrop
								snake_case__						:       List[str]       						=  layer_norm_epsilon
								snake_case__						:       int       						=  initializer_range

								snake_case__						:       Optional[int]       						=  use_cache

								super().__init__(**snake_case_  )



