





import logging

from transformers import PretrainedConfig


__UpperCamelCase:	Union[str, Any] = logging.getLogger(__name__)


__UpperCamelCase:	Tuple = {
    """bertabs-finetuned-cnndm""": """https://huggingface.co/remi/bertabs-finetuned-cnndm-extractive-abstractive-summarization/resolve/main/config.json""",
}


class       __lowerCAmelCase					(       _UpperCamelCase      ):


	'''simple docstring'''





	_A													=				"bertabs"

	def __init__(						self:						str,					lowerCamelCase_:						Tuple=30522,					lowerCamelCase_:						int=512,					lowerCamelCase_:						List[Any]=6,					lowerCamelCase_:						Tuple=512,					lowerCamelCase_:						Tuple=8,					lowerCamelCase_:						Optional[int]=512,					lowerCamelCase_:						int=0.2,					lowerCamelCase_:						Union[str, Any]=6,					lowerCamelCase_:						Tuple=768,					lowerCamelCase_:						Tuple=8,					lowerCamelCase_:						int=2048,					lowerCamelCase_:						Optional[Any]=0.2,					**lowerCamelCase_:						Tuple,					):
			super().__init__(**__UpperCAmelCase			)

			lowercase__					:      Union[str, Any]      =		vocab_size
			lowercase__					:      Any      =		max_pos

			lowercase__					:      List[str]      =		enc_layers
			lowercase__					:      Optional[int]      =		enc_hidden_size
			lowercase__					:      Tuple      =		enc_heads
			lowercase__					:      Tuple      =		enc_ff_size
			lowercase__					:      Tuple      =		enc_dropout

			lowercase__					:      Dict      =		dec_layers
			lowercase__					:      str      =		dec_hidden_size
			lowercase__					:      Dict      =		dec_heads
			lowercase__					:      Optional[int]      =		dec_ff_size
			lowercase__					:      Union[str, Any]      =		dec_dropout







import operator as op


lowerCamelCase		       =      """scaler.pt"""
lowerCamelCase		       =      """pytorch_model"""
lowerCamelCase		       =      """random_states"""
lowerCamelCase		       =      """optimizer"""
lowerCamelCase		       =      """scheduler"""
lowerCamelCase		       =      """pytorch_model.bin"""
lowerCamelCase		       =      """pytorch_model.bin.index.json"""
lowerCamelCase		       =      """model.safetensors"""
lowerCamelCase		       =      """model.safetensors.index.json"""
lowerCamelCase		       =      """1.10.2"""
lowerCamelCase		       =      """py38"""
lowerCamelCase		       =      """4.17.0"""
lowerCamelCase		       =      ["""ml.p3.16xlarge""", """ml.p3dn.24xlarge""", """ml.p4dn.24xlarge"""]
lowerCamelCase		       =      ["""FULL_SHARD""", """SHARD_GRAD_OP""", """NO_SHARD""", """HYBRID_SHARD""", """HYBRID_SHARD_ZERO2"""]
lowerCamelCase		       =      ["""TRANSFORMER_BASED_WRAP""", """SIZE_BASED_WRAP""", """NO_WRAP"""]
lowerCamelCase		       =      ["""BACKWARD_PRE""", """BACKWARD_POST""", """NO_PREFETCH"""]
lowerCamelCase		       =      ["""FULL_STATE_DICT""", """LOCAL_STATE_DICT""", """SHARDED_STATE_DICT"""]
lowerCamelCase		       =      """2.0.1"""
lowerCamelCase		       =      ["""pdsh""", """standard""", """openmpi""", """mvapich"""]
lowerCamelCase		       =      ["""default""", """reduce-overhead""", """max-autotune"""]

lowerCamelCase		       =      {""">""": op.gt, """>=""": op.ge, """==""": op.eq, """!=""": op.ne, """<=""": op.le, """<""": op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
lowerCamelCase		       =      [
    """nnodes""",
    """nproc_per_node""",
    """rdzv_backend""",
    """rdzv_endpoint""",
    """rdzv_id""",
    """rdzv_conf""",
    """standalone""",
    """max_restarts""",
    """monitor_interval""",
    """start_method""",
    """role""",
    """module""",
    """m""",
    """no_python""",
    """run_path""",
    """log_dir""",
    """r""",
    """redirects""",
    """t""",
    """tee""",
    """node_rank""",
    """master_addr""",
    """master_port""",
]

lowerCamelCase		       =      ["""DEEPSPEED""", """MULTI_GPU""", """FSDP""", """MEGATRON_LM"""]
lowerCamelCase		       =      ["""DEEPSPEED""", """MULTI_XPU""", """FSDP"""]


