
import torch

from transformers import PreTrainedModel

from .custom_configuration import CustomConfig, NoSuperInitConfig

class 						snake_case			(       lowerCAmelCase__	):
			'''simple docstring'''

			UpperCAmelCase       :       int       = CustomConfig

			def __init__(	self     :     int							,							lowerCAmelCase_     :     Tuple					)					->					str:




								"""simple docstring"""






								super().__init__(lowerCAmelCase_					)
								SCREAMING_SNAKE_CASE_	      =       torch.nn.Linear(config.hidden_size							,							config.hidden_size					)

			def _lowercase (	self     :     Optional[int]							,							lowerCAmelCase_     :     Optional[Any]					)					->					int:




								"""simple docstring"""






								return self.linear(lowerCAmelCase_					)




			def _lowercase (	self     :     Dict							,							lowerCAmelCase_     :     Tuple					)					->					Optional[Any]:




								"""simple docstring"""






								pass

class 						snake_case			(       lowerCAmelCase__	):
			'''simple docstring'''

			UpperCAmelCase       :       Tuple       = NoSuperInitConfig

			def __init__(	self     :     List[str]							,							lowerCAmelCase_     :     Optional[int]					)					->					Any:




								"""simple docstring"""






								super().__init__(lowerCAmelCase_					)
								SCREAMING_SNAKE_CASE_	      =       torch.nn.Linear(config.attribute							,							config.attribute					)

			def _lowercase (	self     :     int							,							lowerCAmelCase_     :     Optional[int]					)					->					Optional[Any]:




								"""simple docstring"""






								return self.linear(lowerCAmelCase_					)




			def _lowercase (	self     :     List[str]							,							lowerCAmelCase_     :     List[str]					)					->					str:




								"""simple docstring"""






								pass






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,
)


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

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A_														=      [
		    "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

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


