
"""simple docstring"""






import unittest

from transformers import MraConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask


if is_torch_available():
					import torch

					from transformers import (
					    MraForMaskedLM,
					    MraForMultipleChoice,
					    MraForQuestionAnswering,
					    MraForSequenceClassification,
					    MraForTokenClassification,
					    MraModel,
					)
					from transformers.models.mra.modeling_mra import MRA_PRETRAINED_MODEL_ARCHIVE_LIST




class 				lowercase__:
	'''simple docstring'''

	def __init__(						self    :int		, lowerCamelCase_    :str		, lowerCamelCase_    :List[Any]=2		, lowerCamelCase_    :int=8		, lowerCamelCase_    :Dict=True		, lowerCamelCase_    :Tuple=True		, lowerCamelCase_    :List[str]=True		, lowerCamelCase_    :Dict=True		, lowerCamelCase_    :List[str]=99		, lowerCamelCase_    :Union[str, Any]=16		, lowerCamelCase_    :Any=5		, lowerCamelCase_    :Any=2		, lowerCamelCase_    :Any=36		, lowerCamelCase_    :Tuple="gelu"		, lowerCamelCase_    :Dict=0.0		, lowerCamelCase_    :Optional[int]=0.0		, lowerCamelCase_    :str=5_12		, lowerCamelCase_    :Optional[int]=16		, lowerCamelCase_    :Dict=2		, lowerCamelCase_    :Dict=0.0_2		, lowerCamelCase_    :Any=3		, lowerCamelCase_    :List[str]=4		, lowerCamelCase_    :Optional[int]=None		, )							->			Any:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Any				= parent
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= batch_size
			SCREAMING_SNAKE_CASE       :     Optional[int]				= seq_length
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= is_training
			SCREAMING_SNAKE_CASE       :     Optional[int]				= use_input_mask
			SCREAMING_SNAKE_CASE       :     Dict				= use_token_type_ids
			SCREAMING_SNAKE_CASE       :     int				= use_labels
			SCREAMING_SNAKE_CASE       :     Any				= vocab_size
			SCREAMING_SNAKE_CASE       :     List[str]				= hidden_size
			SCREAMING_SNAKE_CASE       :     Optional[int]				= num_hidden_layers
			SCREAMING_SNAKE_CASE       :     Any				= num_attention_heads
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= intermediate_size
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= hidden_act
			SCREAMING_SNAKE_CASE       :     int				= hidden_dropout_prob
			SCREAMING_SNAKE_CASE       :     Dict				= attention_probs_dropout_prob
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= max_position_embeddings
			SCREAMING_SNAKE_CASE       :     Tuple				= type_vocab_size
			SCREAMING_SNAKE_CASE       :     Dict				= type_sequence_label_size
			SCREAMING_SNAKE_CASE       :     List[str]				= initializer_range
			SCREAMING_SNAKE_CASE       :     List[str]				= num_labels
			SCREAMING_SNAKE_CASE       :     Dict				= num_choices
			SCREAMING_SNAKE_CASE       :     Any				= scope





	def   __lowerCAmelCase (						self    :List[Any]					)							->			Dict:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     List[str]				= ids_tensor([self.batch_size, self.seq_length]		, self.vocab_size					)

			SCREAMING_SNAKE_CASE       :     List[Any]				= None
			if self.use_input_mask:
					SCREAMING_SNAKE_CASE       :     Optional[Any]				= random_attention_mask([self.batch_size, self.seq_length]					)

			SCREAMING_SNAKE_CASE       :     List[str]				= None
			if self.use_token_type_ids:
					SCREAMING_SNAKE_CASE       :     int				= ids_tensor([self.batch_size, self.seq_length]		, self.type_vocab_size					)

			SCREAMING_SNAKE_CASE       :     List[Any]				= None
			SCREAMING_SNAKE_CASE       :     List[str]				= None
			SCREAMING_SNAKE_CASE       :     List[str]				= None
			if self.use_labels:
					SCREAMING_SNAKE_CASE       :     List[str]				= ids_tensor([self.batch_size]		, self.type_sequence_label_size					)
					SCREAMING_SNAKE_CASE       :     Any				= ids_tensor([self.batch_size, self.seq_length]		, self.num_labels					)
					SCREAMING_SNAKE_CASE       :     Optional[int]				= ids_tensor([self.batch_size]		, self.num_choices					)

			SCREAMING_SNAKE_CASE       :     List[str]				= self.get_config()

			return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels





	def   __lowerCAmelCase (						self    :Any					)							->			Optional[int]:







			'''simple docstring'''




			return MraConfig(
			    vocab_size=self.vocab_size		, hidden_size=self.hidden_size		, num_hidden_layers=self.num_hidden_layers		, num_attention_heads=self.num_attention_heads		, intermediate_size=self.intermediate_size		, hidden_act=self.hidden_act		, hidden_dropout_prob=self.hidden_dropout_prob		, attention_probs_dropout_prob=self.attention_probs_dropout_prob		, max_position_embeddings=self.max_position_embeddings		, type_vocab_size=self.type_vocab_size		, is_decoder=__a		, initializer_range=self.initializer_range		, )





	def   __lowerCAmelCase (						self    :str					)							->			Tuple:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     List[Any]				= self.get_config()
			SCREAMING_SNAKE_CASE       :     List[str]				= 3_00
			return config





	def   __lowerCAmelCase (						self    :List[str]					)							->			Union[str, Any]:







			'''simple docstring'''




			(
			    SCREAMING_SNAKE_CASE  
			)       :     Union[str, Any]				= self.prepare_config_and_inputs()

			SCREAMING_SNAKE_CASE       :     Optional[int]				= True
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= floats_tensor([self.batch_size, self.seq_length, self.hidden_size]					)
			SCREAMING_SNAKE_CASE       :     Optional[int]				= ids_tensor([self.batch_size, self.seq_length]		, vocab_size=2					)

			return (
			    config,
			    input_ids,
			    token_type_ids,
			    input_mask,
			    sequence_labels,
			    token_labels,
			    choice_labels,
			    encoder_hidden_states,
			    encoder_attention_mask,
			)





	def   __lowerCAmelCase (						self    :Optional[Any]		, lowerCamelCase_    :List[str]		, lowerCamelCase_    :Tuple		, lowerCamelCase_    :Tuple		, lowerCamelCase_    :List[Any]		, lowerCamelCase_    :Optional[int]		, lowerCamelCase_    :List[str]		, lowerCamelCase_    :Union[str, Any]					)							->			Tuple:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[Any]				= MraModel(config=__a					)
			model.to(__a					)
			model.eval()
			SCREAMING_SNAKE_CASE       :     Tuple				= model(__a		, attention_mask=__a		, token_type_ids=__a					)
			SCREAMING_SNAKE_CASE       :     str				= model(__a		, token_type_ids=__a					)
			SCREAMING_SNAKE_CASE       :     Tuple				= model(__a					)
			self.parent.assertEqual(result.last_hidden_state.shape		, (self.batch_size, self.seq_length, self.hidden_size)					)





	def   __lowerCAmelCase (						self    :Dict		, lowerCamelCase_    :Any		, lowerCamelCase_    :Optional[Any]		, lowerCamelCase_    :int		, lowerCamelCase_    :List[str]		, lowerCamelCase_    :str		, lowerCamelCase_    :Tuple		, lowerCamelCase_    :Optional[int]		, lowerCamelCase_    :Optional[int]		, lowerCamelCase_    :int		, )							->			int:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     List[Any]				= True
			SCREAMING_SNAKE_CASE       :     str				= MraModel(__a					)
			model.to(__a					)
			model.eval()
			SCREAMING_SNAKE_CASE       :     str				= model(
			    __a		, attention_mask=__a		, token_type_ids=__a		, encoder_hidden_states=__a		, encoder_attention_mask=__a		, )
			SCREAMING_SNAKE_CASE       :     List[str]				= model(
			    __a		, attention_mask=__a		, token_type_ids=__a		, encoder_hidden_states=__a		, )
			SCREAMING_SNAKE_CASE       :     Dict				= model(__a		, attention_mask=__a		, token_type_ids=__a					)
			self.parent.assertEqual(result.last_hidden_state.shape		, (self.batch_size, self.seq_length, self.hidden_size)					)





	def   __lowerCAmelCase (						self    :Tuple		, lowerCamelCase_    :Union[str, Any]		, lowerCamelCase_    :str		, lowerCamelCase_    :Dict		, lowerCamelCase_    :int		, lowerCamelCase_    :List[str]		, lowerCamelCase_    :int		, lowerCamelCase_    :int					)							->			int:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Tuple				= MraForMaskedLM(config=__a					)
			model.to(__a					)
			model.eval()
			SCREAMING_SNAKE_CASE       :     Any				= model(__a		, attention_mask=__a		, token_type_ids=__a		, labels=__a					)
			self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.seq_length, self.vocab_size)					)





	def   __lowerCAmelCase (						self    :Optional[Any]		, lowerCamelCase_    :int		, lowerCamelCase_    :int		, lowerCamelCase_    :int		, lowerCamelCase_    :Any		, lowerCamelCase_    :List[str]		, lowerCamelCase_    :List[str]		, lowerCamelCase_    :Dict					)							->			str:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= MraForQuestionAnswering(config=__a					)
			model.to(__a					)
			model.eval()
			SCREAMING_SNAKE_CASE       :     List[Any]				= model(
			    __a		, attention_mask=__a		, token_type_ids=__a		, start_positions=__a		, end_positions=__a		, )
			self.parent.assertEqual(result.start_logits.shape		, (self.batch_size, self.seq_length)					)
			self.parent.assertEqual(result.end_logits.shape		, (self.batch_size, self.seq_length)					)





	def   __lowerCAmelCase (						self    :Union[str, Any]		, lowerCamelCase_    :Dict		, lowerCamelCase_    :Any		, lowerCamelCase_    :Any		, lowerCamelCase_    :Optional[Any]		, lowerCamelCase_    :List[Any]		, lowerCamelCase_    :Optional[int]		, lowerCamelCase_    :Any					)							->			Optional[Any]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     List[Any]				= self.num_labels
			SCREAMING_SNAKE_CASE       :     Optional[int]				= MraForSequenceClassification(__a					)
			model.to(__a					)
			model.eval()
			SCREAMING_SNAKE_CASE       :     int				= model(__a		, attention_mask=__a		, token_type_ids=__a		, labels=__a					)
			self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.num_labels)					)





	def   __lowerCAmelCase (						self    :List[str]		, lowerCamelCase_    :str		, lowerCamelCase_    :Tuple		, lowerCamelCase_    :int		, lowerCamelCase_    :Any		, lowerCamelCase_    :Optional[int]		, lowerCamelCase_    :str		, lowerCamelCase_    :str					)							->			int:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[int]				= self.num_labels
			SCREAMING_SNAKE_CASE       :     Tuple				= MraForTokenClassification(config=__a					)
			model.to(__a					)
			model.eval()
			SCREAMING_SNAKE_CASE       :     Any				= model(__a		, attention_mask=__a		, token_type_ids=__a		, labels=__a					)
			self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.seq_length, self.num_labels)					)





	def   __lowerCAmelCase (						self    :Tuple		, lowerCamelCase_    :Union[str, Any]		, lowerCamelCase_    :Optional[Any]		, lowerCamelCase_    :Any		, lowerCamelCase_    :Optional[int]		, lowerCamelCase_    :str		, lowerCamelCase_    :Any		, lowerCamelCase_    :Any					)							->			str:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Tuple				= self.num_choices
			SCREAMING_SNAKE_CASE       :     Optional[int]				= MraForMultipleChoice(config=__a					)
			model.to(__a					)
			model.eval()
			SCREAMING_SNAKE_CASE       :     str				= input_ids.unsqueeze(1					).expand(-1		, self.num_choices		, -1					).contiguous()
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= token_type_ids.unsqueeze(1					).expand(-1		, self.num_choices		, -1					).contiguous()
			SCREAMING_SNAKE_CASE       :     Tuple				= input_mask.unsqueeze(1					).expand(-1		, self.num_choices		, -1					).contiguous()
			SCREAMING_SNAKE_CASE       :     Optional[int]				= model(
			    __a		, attention_mask=__a		, token_type_ids=__a		, labels=__a		, )
			self.parent.assertEqual(result.logits.shape		, (self.batch_size, self.num_choices)					)







	def   __lowerCAmelCase (						self    :Optional[Any]					)							->			Optional[Any]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[Any]				= self.prepare_config_and_inputs()
			(
			    SCREAMING_SNAKE_CASE  
			)       :     int				= config_and_inputs
			SCREAMING_SNAKE_CASE       :     str				= {"input_ids": input_ids, "token_type_ids": token_type_ids, "attention_mask": input_mask}
			return config, inputs_dict





@require_torch
class 				lowercase__(				_UpperCamelCase		,						unittest.TestCase   ):
	'''simple docstring'''

	UpperCamelCase				=  (
	    (
	        MraModel,
	        MraForMaskedLM,
	        MraForMultipleChoice,
	        MraForQuestionAnswering,
	        MraForSequenceClassification,
	        MraForTokenClassification,
	    )
	    if is_torch_available()
	    else ()
	)
	UpperCamelCase				=  False
	UpperCamelCase				=  False
	UpperCamelCase				=  False
	UpperCamelCase				=  False

	UpperCamelCase				=  ()





	def   __lowerCAmelCase (						self    :int					)							->			Any:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[int]				= MraModelTester(self					)
			SCREAMING_SNAKE_CASE       :     Any				= ConfigTester(self		, config_class=__a		, hidden_size=37					)





	def   __lowerCAmelCase (						self    :int					)							->			Dict:







			'''simple docstring'''




			self.config_tester.run_common_tests()





	def   __lowerCAmelCase (						self    :Tuple					)							->			List[str]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     int				= self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_model(*__a					)





	def   __lowerCAmelCase (						self    :List[Any]					)							->			List[str]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[int]				= self.model_tester.prepare_config_and_inputs()
			for type in ["absolute", "relative_key", "relative_key_query"]:
					SCREAMING_SNAKE_CASE       :     Tuple				= type
					self.model_tester.create_and_check_model(*__a					)





	def   __lowerCAmelCase (						self    :Tuple					)							->			List[str]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_for_masked_lm(*__a					)





	def   __lowerCAmelCase (						self    :List[Any]					)							->			str:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[Any]				= self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_for_multiple_choice(*__a					)





	def   __lowerCAmelCase (						self    :Any					)							->			Optional[int]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     List[Any]				= self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_for_question_answering(*__a					)





	def   __lowerCAmelCase (						self    :Union[str, Any]					)							->			Any:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_for_sequence_classification(*__a					)





	def   __lowerCAmelCase (						self    :Tuple					)							->			Optional[Any]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Tuple				= self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_for_token_classification(*__a					)





	@slow
	def   __lowerCAmelCase (						self    :Optional[int]					)							->			Union[str, Any]:







			'''simple docstring'''




			for model_name in MRA_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
					SCREAMING_SNAKE_CASE       :     Tuple				= MraModel.from_pretrained(__a					)
					self.assertIsNotNone(__a					)







	@unittest.skip(reason='''MRA does not output attentions'''					)
	def   __lowerCAmelCase (						self    :List[str]					)							->			Tuple:







			'''simple docstring'''




			return





@require_torch
class 				lowercase__(				unittest.TestCase   ):
	'''simple docstring'''

	@slow
	def   __lowerCAmelCase (						self    :Dict					)							->			Any:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Tuple				= MraModel.from_pretrained('''uw-madison/mra-base-512-4'''					)
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= torch.arange(2_56					).unsqueeze(0					)

			with torch.no_grad():
					SCREAMING_SNAKE_CASE       :     Dict				= model(__a					)[0]

			SCREAMING_SNAKE_CASE       :     Optional[Any]				= torch.Size((1, 2_56, 7_68)					)
			self.assertEqual(output.shape		, __a					)

			SCREAMING_SNAKE_CASE       :     Any				= torch.tensor(
			    [[[-0.0_1_4_0, 0.0_8_3_0, -0.0_3_8_1], [0.1_5_4_6, 0.1_4_0_2, 0.0_2_2_0], [0.1_1_6_2, 0.0_8_5_1, 0.0_1_6_5]]]					)

			self.assertTrue(torch.allclose(output[:, :3, :3]		, __a		, atol=1E-4					)					)





	@slow
	def   __lowerCAmelCase (						self    :List[Any]					)							->			List[Any]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     List[Any]				= MraForMaskedLM.from_pretrained('''uw-madison/mra-base-512-4'''					)
			SCREAMING_SNAKE_CASE       :     str				= torch.arange(2_56					).unsqueeze(0					)

			with torch.no_grad():
					SCREAMING_SNAKE_CASE       :     Optional[int]				= model(__a					)[0]

			SCREAMING_SNAKE_CASE       :     int				= 5_02_65

			SCREAMING_SNAKE_CASE       :     str				= torch.Size((1, 2_56, vocab_size)					)
			self.assertEqual(output.shape		, __a					)

			SCREAMING_SNAKE_CASE       :     List[str]				= torch.tensor(
			    [[[9.2_5_9_5, -3.6_0_3_8, 1_1.8_8_1_9], [9.3_8_6_9, -3.2_6_9_3, 1_1.0_9_5_6], [1_1.8_5_2_4, -3.4_9_3_8, 1_3.1_2_1_0]]]					)

			self.assertTrue(torch.allclose(output[:, :3, :3]		, __a		, atol=1E-4					)					)







	@slow
	def   __lowerCAmelCase (						self    :List[Any]					)							->			List[Any]:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Dict				= MraForMaskedLM.from_pretrained('''uw-madison/mra-base-4096-8-d3'''					)
			SCREAMING_SNAKE_CASE       :     Any				= torch.arange(40_96					).unsqueeze(0					)

			with torch.no_grad():
					SCREAMING_SNAKE_CASE       :     Any				= model(__a					)[0]

			SCREAMING_SNAKE_CASE       :     Any				= 5_02_65

			SCREAMING_SNAKE_CASE       :     str				= torch.Size((1, 40_96, vocab_size)					)
			self.assertEqual(output.shape		, __a					)

			SCREAMING_SNAKE_CASE       :     List[str]				= torch.tensor(
			    [[[5.4_7_8_9, -2.3_5_6_4, 7.5_0_6_4], [7.9_0_6_7, -1.3_3_6_9, 9.9_6_6_8], [9.0_7_1_2, -1.8_1_0_6, 7.0_3_8_0]]]					)

			self.assertTrue(torch.allclose(output[:, :3, :3]		, __a		, atol=1E-4					)					)







"""simple docstring"""






from typing import TYPE_CHECKING

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


lowerCamelCase__ :       Optional[Any]						     =			{
    "configuration_funnel": ["FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP", "FunnelConfig"],
    "convert_funnel_original_tf_checkpoint_to_pytorch": [],
    "tokenization_funnel": ["FunnelTokenizer"],
}

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCamelCase__ :       Optional[Any]						     =			["FunnelTokenizerFast"]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCamelCase__ :       Dict						     =			[
					    "FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "FunnelBaseModel",
					    "FunnelForMaskedLM",
					    "FunnelForMultipleChoice",
					    "FunnelForPreTraining",
					    "FunnelForQuestionAnswering",
					    "FunnelForSequenceClassification",
					    "FunnelForTokenClassification",
					    "FunnelModel",
					    "FunnelPreTrainedModel",
					    "load_tf_weights_in_funnel",
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCamelCase__ :       Tuple						     =			[
					    "TF_FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "TFFunnelBaseModel",
					    "TFFunnelForMaskedLM",
					    "TFFunnelForMultipleChoice",
					    "TFFunnelForPreTraining",
					    "TFFunnelForQuestionAnswering",
					    "TFFunnelForSequenceClassification",
					    "TFFunnelForTokenClassification",
					    "TFFunnelModel",
					    "TFFunnelPreTrainedModel",
					]


if TYPE_CHECKING:
					from .configuration_funnel import FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP, FunnelConfig
					from .tokenization_funnel import FunnelTokenizer

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_funnel_fast import FunnelTokenizerFast

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_funnel import (
										    FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST,
										    FunnelBaseModel,
										    FunnelForMaskedLM,
										    FunnelForMultipleChoice,
										    FunnelForPreTraining,
										    FunnelForQuestionAnswering,
										    FunnelForSequenceClassification,
										    FunnelForTokenClassification,
										    FunnelModel,
										    FunnelPreTrainedModel,
										    load_tf_weights_in_funnel,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_funnel import (
										    TF_FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TFFunnelBaseModel,
										    TFFunnelForMaskedLM,
										    TFFunnelForMultipleChoice,
										    TFFunnelForPreTraining,
										    TFFunnelForQuestionAnswering,
										    TFFunnelForSequenceClassification,
										    TFFunnelForTokenClassification,
										    TFFunnelModel,
										    TFFunnelPreTrainedModel,
										)

else:
					import sys

					lowerCamelCase__ :       Optional[int]						     =			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





