


from typing import List, Union

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


__UpperCAmelCase      			=  logging.get_logger(__name__)

__UpperCAmelCase      			=  {
    """allenai/led-base-16384""": """https://huggingface.co/allenai/led-base-16384/resolve/main/config.json""",
    # See all LED models at https://huggingface.co/models?filter=led
}



class 							lowercase__(						snake_case__			):






      '''simple docstring'''







      snake_case__       =					'''led'''
      snake_case__       =					{
          '''num_attention_heads''': '''encoder_attention_heads''',
          '''hidden_size''': '''d_model''',
          '''attention_probs_dropout_prob''': '''attention_dropout''',
          '''initializer_range''': '''init_std''',
      }




      def __init__(		self   ,			__SCREAMING_SNAKE_CASE=5_02_65   ,			__SCREAMING_SNAKE_CASE=1_63_84   ,			__SCREAMING_SNAKE_CASE=10_24   ,			__SCREAMING_SNAKE_CASE=12   ,			__SCREAMING_SNAKE_CASE=40_96   ,			__SCREAMING_SNAKE_CASE=16   ,			__SCREAMING_SNAKE_CASE=12   ,			__SCREAMING_SNAKE_CASE=40_96   ,			__SCREAMING_SNAKE_CASE=16   ,			__SCREAMING_SNAKE_CASE=0.0   ,			__SCREAMING_SNAKE_CASE=0.0   ,			__SCREAMING_SNAKE_CASE=True   ,			__SCREAMING_SNAKE_CASE=True   ,			__SCREAMING_SNAKE_CASE="gelu"   ,			__SCREAMING_SNAKE_CASE=10_24   ,			__SCREAMING_SNAKE_CASE=0.1   ,			__SCREAMING_SNAKE_CASE=0.0   ,			__SCREAMING_SNAKE_CASE=0.0   ,			__SCREAMING_SNAKE_CASE=0.02   ,			__SCREAMING_SNAKE_CASE=2   ,			__SCREAMING_SNAKE_CASE=0.0   ,			__SCREAMING_SNAKE_CASE=1   ,			__SCREAMING_SNAKE_CASE=0   ,			__SCREAMING_SNAKE_CASE=2   ,			__SCREAMING_SNAKE_CASE = 5_12   ,			**__SCREAMING_SNAKE_CASE   ,			)					->						List[Any]:







         """simple docstring"""







         UpperCamelCase__ :			Union[str, Any] 						=vocab_size
         UpperCamelCase__ :			List[Any] 						=max_encoder_position_embeddings
         UpperCamelCase__ :			Optional[int] 						=max_decoder_position_embeddings
         UpperCamelCase__ :			Dict 						=d_model
         UpperCamelCase__ :			Dict 						=encoder_ffn_dim
         UpperCamelCase__ :			str 						=encoder_layers
         UpperCamelCase__ :			Dict 						=encoder_attention_heads
         UpperCamelCase__ :			Optional[int] 						=decoder_ffn_dim
         UpperCamelCase__ :			Union[str, Any] 						=decoder_layers
         UpperCamelCase__ :			str 						=decoder_attention_heads
         UpperCamelCase__ :			str 						=dropout
         UpperCamelCase__ :			List[str] 						=attention_dropout
         UpperCamelCase__ :			List[Any] 						=activation_dropout
         UpperCamelCase__ :			int 						=activation_function
         UpperCamelCase__ :			List[str] 						=init_std
         UpperCamelCase__ :			Any 						=encoder_layerdrop
         UpperCamelCase__ :			str 						=decoder_layerdrop
         UpperCamelCase__ :			Dict 						=classifier_dropout
         UpperCamelCase__ :			str 						=use_cache
         UpperCamelCase__ :			int 						=encoder_layers
         UpperCamelCase__ :			int 						=attention_window

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





from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


__UpperCAmelCase      			=  {
    """configuration_switch_transformers""": [
        """SWITCH_TRANSFORMERS_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """SwitchTransformersConfig""",
        """SwitchTransformersOnnxConfig""",
    ]
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     __UpperCAmelCase      			=  [
         """SWITCH_TRANSFORMERS_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """SwitchTransformersEncoderModel""",
         """SwitchTransformersForConditionalGeneration""",
         """SwitchTransformersModel""",
         """SwitchTransformersPreTrainedModel""",
         """SwitchTransformersTop1Router""",
         """SwitchTransformersSparseMLP""",
     ]


if TYPE_CHECKING:
     from .configuration_switch_transformers import (
         SWITCH_TRANSFORMERS_PRETRAINED_CONFIG_ARCHIVE_MAP,
         SwitchTransformersConfig,
         SwitchTransformersOnnxConfig,
     )

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_switch_transformers import (
              SWITCH_TRANSFORMERS_PRETRAINED_MODEL_ARCHIVE_LIST,
              SwitchTransformersEncoderModel,
              SwitchTransformersForConditionalGeneration,
              SwitchTransformersModel,
              SwitchTransformersPreTrainedModel,
              SwitchTransformersSparseMLP,
              SwitchTransformersTopaRouter,
          )


else:
     import sys

     __UpperCAmelCase      			=  _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

