"""simple docstring"""





import math
import unittest

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

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
       import torch

       from transformers import (
           BioGptForCausalLM,
           BioGptForSequenceClassification,
           BioGptForTokenClassification,
           BioGptModel,
           BioGptTokenizer,
       )
       from transformers.models.biogpt.modeling_biogpt import BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST


class      UpperCAmelCase_	:


      def __init__(   self		,			a		,			a=1_3		,			a=7		,			a=True		,			a=True		,			a=False		,			a=True		,			a=9_9		,			a=3_2		,			a=5		,			a=4		,			a=3_7		,			a="gelu"		,			a=0.1		,			a=0.1		,			a=5_1_2		,			a=1_6		,			a=2		,			a=0.02		,			a=3		,			a=4		,			a=None		,			)       ->					Any:
             lowercase__			:		List[Any]       =	parent
             lowercase__			:		Tuple       =	batch_size
             lowercase__			:		Tuple       =	seq_length
             lowercase__			:		Optional[int]       =	is_training
             lowercase__			:		Any       =	use_input_mask
             lowercase__			:		Union[str, Any]       =	use_token_type_ids
             lowercase__			:		Optional[Any]       =	use_labels
             lowercase__			:		Optional[Any]       =	vocab_size
             lowercase__			:		List[str]       =	hidden_size
             lowercase__			:		str       =	num_hidden_layers
             lowercase__			:		Optional[Any]       =	num_attention_heads
             lowercase__			:		Tuple       =	intermediate_size
             lowercase__			:		List[Any]       =	hidden_act
             lowercase__			:		List[Any]       =	hidden_dropout_prob
             lowercase__			:		Union[str, Any]       =	attention_probs_dropout_prob
             lowercase__			:		Tuple       =	max_position_embeddings
             lowercase__			:		str       =	type_vocab_size
             lowercase__			:		int       =	type_sequence_label_size
             lowercase__			:		List[Any]       =	initializer_range
             lowercase__			:		Optional[int]       =	num_labels
             lowercase__			:		Tuple       =	num_choices
             lowercase__			:		str       =	scope


      def 		_UpperCAmelCase       (   self							)       ->					Union[str, Any]:
             lowercase__			:		str       =	ids_tensor([self.batch_size, self.seq_length]		,			self.vocab_size							)

             lowercase__			:		Tuple       =	None
             if self.use_input_mask:
                    lowercase__			:		Optional[int]       =	random_attention_mask([self.batch_size, self.seq_length]							)

             lowercase__			:		Optional[Any]       =	None
             if self.use_token_type_ids:
                    lowercase__			:		Dict       =	ids_tensor([self.batch_size, self.seq_length]		,			self.type_vocab_size							)

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

             lowercase__			:		List[Any]       =	self.get_config()

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


      def 		_UpperCAmelCase       (   self							)       ->					Optional[Any]:
             return BioGptConfig(
                 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 		_UpperCAmelCase       (   self		,			a		,			a		,			a		,			a		,			a		,			a		,			a							)       ->					List[str]:
             lowercase__			:		Optional[Any]       =	BioGptModel(config=a							)
             model.to(a							)
             model.eval()
             lowercase__			:		Any       =	model(a		,			attention_mask=a							)
             lowercase__			:		Dict       =	model(a							)
             self.parent.assertEqual(result.last_hidden_state.shape		,			(self.batch_size, self.seq_length, self.hidden_size)							)


      def 		_UpperCAmelCase       (   self		,			a		,			a		,			a		,			a		,			a		,			a		,			a		,			a		,			a		,			)       ->					Dict:
             lowercase__			:		int       =	BioGptForCausalLM(config=a							)
             model.to(a							)
             model.eval()
             lowercase__			:		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 		_UpperCAmelCase       (   self		,			a		,			a		,			a		,			a		,			a		,			*a							)       ->					int:
             lowercase__			:		Any       =	BioGptModel(config=a							)
             model.to(a							)
             model.eval()

             # create attention mask
             lowercase__			:		Dict       =	torch.ones(input_ids.shape		,			dtype=torch.long		,			device=a							)
             lowercase__			:		Tuple       =	self.seq_length // 2
             lowercase__			:		List[str]       =	0

             # first forward pass
             lowercase__    ,      lowercase__			:		str       =	model(a		,			attention_mask=a							).to_tuple()

             # create hypothetical next token and extent to next_input_ids
             lowercase__			:		str       =	ids_tensor((self.batch_size, 1)		,			config.vocab_size							)

             # change a random masked slice from input_ids
             lowercase__			:		List[Any]       =	ids_tensor((1,)		,			a							).item() + 1
             lowercase__			:		int       =	ids_tensor((self.batch_size, 1)		,			config.vocab_size							).squeeze(-1							)
             lowercase__			:		Optional[int]       =	random_other_next_tokens

             # append to next input_ids and attn_mask
             lowercase__			:		Union[str, Any]       =	torch.cat([input_ids, next_tokens]		,			dim=-1							)
             lowercase__			:		List[Any]       =	torch.cat(
                 [attn_mask, torch.ones((attn_mask.shape[0], 1)		,			dtype=torch.long		,			device=a							)]		,			dim=1		,			)

             # get two different outputs
             lowercase__			:		Tuple       =	model(a		,			attention_mask=a							)['last_hidden_state']
             lowercase__			:		Any       =	model(a		,			past_key_values=a		,			attention_mask=a							)['last_hidden_state']

             # select random slice
             lowercase__			:		Any       =	ids_tensor((1,)		,			output_from_past.shape[-1]							).item()
             lowercase__			:		str       =	output_from_no_past[:, -1, random_slice_idx].detach()
             lowercase__			:		Optional[int]       =	output_from_past[:, 0, random_slice_idx].detach()

             # test that outputs are equal for slice
             self.parent.assertTrue(torch.allclose(a		,			a		,			atol=1e-3							)							)


      def 		_UpperCAmelCase       (   self		,			a		,			a		,			a		,			a		,			a		,			*a							)       ->					Optional[Any]:
             lowercase__			:		int       =	BioGptModel(config=a							).to(a							).eval()

             lowercase__			:		Optional[int]       =	torch.ones(input_ids.shape		,			dtype=torch.long		,			device=a							)

             # first forward pass
             lowercase__			:		Tuple       =	model(a		,			attention_mask=a		,			use_cache=a							)

             lowercase__    ,      lowercase__			:		Union[str, Any]       =	outputs.to_tuple()

             # create hypothetical multiple next token and extent to next_input_ids
             lowercase__			:		int       =	ids_tensor((self.batch_size, 3)		,			config.vocab_size							)
             lowercase__			:		str       =	ids_tensor((self.batch_size, 3)		,			2							)

             # append to next input_ids and
             lowercase__			:		int       =	torch.cat([input_ids, next_tokens]		,			dim=-1							)
             lowercase__			:		Optional[int]       =	torch.cat([attention_mask, next_attn_mask]		,			dim=-1							)

             lowercase__			:		Any       =	model(a		,			attention_mask=a							)['last_hidden_state']
             lowercase__			:		List[Any]       =	model(a		,			attention_mask=a		,			past_key_values=a							)[
                 'last_hidden_state'
             ]

             # select random slice
             lowercase__			:		Dict       =	ids_tensor((1,)		,			output_from_past.shape[-1]							).item()
             lowercase__			:		str       =	output_from_no_past[:, -3:, random_slice_idx].detach()
             lowercase__			:		List[str]       =	output_from_past[:, :, random_slice_idx].detach()

             self.parent.assertTrue(output_from_past_slice.shape[1] == next_tokens.shape[1]							)

             # test that outputs are equal for slice
             self.parent.assertTrue(torch.allclose(a		,			a		,			atol=1e-3							)							)


      def 		_UpperCAmelCase       (   self		,			a		,			a		,			a		,			a		,			a		,			*a		,			a=False							)       ->					str:
             lowercase__			:		Optional[Any]       =	BioGptForCausalLM(a							)
             model.to(a							)
             if gradient_checkpointing:
                    model.gradient_checkpointing_enable()

             lowercase__			:		Tuple       =	model(a		,			labels=a							)
             self.parent.assertEqual(result.loss.shape		,			()							)
             self.parent.assertEqual(result.logits.shape		,			(self.batch_size, self.seq_length, self.vocab_size)							)
             result.loss.backward()


      def 		_UpperCAmelCase       (   self		,			a		,			*a							)       ->					Tuple:
             lowercase__			:		Optional[Any]       =	BioGptModel(a							)
             lowercase__			:		Union[str, Any]       =	model.config.initializer_range / math.sqrt(2 * model.config.num_hidden_layers							)
             for key in model.state_dict().keys():
                    if "c_proj" in key and "weight" in key:
                           self.parent.assertLessEqual(abs(torch.std(model.state_dict()[key]							) - model_std							)		,			0.001							)
                           self.parent.assertLessEqual(abs(torch.mean(model.state_dict()[key]							) - 0.0							)		,			0.01							)


      def 		_UpperCAmelCase       (   self		,			a		,			a		,			a		,			a		,			a		,			*a							)       ->					Any:
             lowercase__			:		Optional[int]       =	self.num_labels
             lowercase__			:		Any       =	BioGptForTokenClassification(a							)
             model.to(a							)
             model.eval()
             lowercase__			:		Optional[Any]       =	model(a		,			attention_mask=a		,			token_type_ids=a							)
             self.parent.assertEqual(result.logits.shape		,			(self.batch_size, self.seq_length, self.num_labels)							)


      def 		_UpperCAmelCase       (   self							)       ->					List[Any]:
             lowercase__			:		int       =	self.prepare_config_and_inputs()
             (
                 (
                 lowercase__					
             )    ,      (
                 lowercase__					
             )    ,      (
                 lowercase__					
             )    ,      (
                 lowercase__					
             )    ,      (
                 lowercase__					
             )    ,      (
                 lowercase__					
             )    ,      (
                 lowercase__					
             )    ,      					
             )			:		Optional[Any]       =	config_and_inputs
             lowercase__			:		Union[str, Any]       =	{'input_ids': input_ids, 'attention_mask': input_mask}
             return config, inputs_dict





@require_torch
class      UpperCAmelCase_	(    __lowerCamelCase ,							__lowerCamelCase ,							__lowerCamelCase ,							unittest.TestCase):
      lowerCamelCase__		:    str   =  (
          (BioGptModel, BioGptForCausalLM, BioGptForSequenceClassification, BioGptForTokenClassification)
          if is_torch_available()
          else ()
      )
      lowerCamelCase__		:    Optional[int]   =  (BioGptForCausalLM,) if is_torch_available() else ()
      lowerCamelCase__		:    Dict   =  (
          {
              """feature-extraction""": BioGptModel,
              """text-classification""": BioGptForSequenceClassification,
              """text-generation""": BioGptForCausalLM,
              """token-classification""": BioGptForTokenClassification,
              """zero-shot""": BioGptForSequenceClassification,
          }
          if is_torch_available()
          else {}
      )
      lowerCamelCase__		:    int   =  False


      def 		_UpperCAmelCase       (   self							)       ->					Optional[Any]:
             lowercase__			:		int       =	BioGptModelTester(self							)
             lowercase__			:		Tuple       =	ConfigTester(self		,			config_class=a		,			hidden_size=3_7							)


      def 		_UpperCAmelCase       (   self							)       ->					Optional[int]:
             self.config_tester.run_common_tests()


      def 		_UpperCAmelCase       (   self							)       ->					int:
             lowercase__			:		Any       =	self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_model(*a							)


      def 		_UpperCAmelCase       (   self							)       ->					str:
             lowercase__			:		Optional[int]       =	self.model_tester.prepare_config_and_inputs()
             for type in ["absolute", "relative_key", "relative_key_query"]:
                    lowercase__			:		Union[str, Any]       =	type
                    self.model_tester.create_and_check_model(*a							)


      def 		_UpperCAmelCase       (   self							)       ->					Union[str, Any]:
             lowercase__			:		List[Any]       =	self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_biogpt_model_attention_mask_past(*a							)


      def 		_UpperCAmelCase       (   self							)       ->					Dict:
             lowercase__			:		Any       =	self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_forward_and_backwards(*a		,			gradient_checkpointing=a							)


      def 		_UpperCAmelCase       (   self							)       ->					str:
             lowercase__			:		Dict       =	self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_biogpt_model_past_large_inputs(*a							)


      def 		_UpperCAmelCase       (   self							)       ->					Optional[Any]:
             lowercase__			:		List[Any]       =	self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_biogpt_weight_initialization(*a							)


      def 		_UpperCAmelCase       (   self							)       ->					str:
             lowercase__			:		List[str]       =	self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_biogpt_for_token_classification(*a							)


      @slow
      def 		_UpperCAmelCase       (   self							)       ->					Any:
             lowercase__			:		Tuple       =	BioGptForCausalLM.from_pretrained('microsoft/biogpt'							)
             model.to(a							)
             lowercase__			:		Tuple       =	BioGptTokenizer.from_pretrained('microsoft/biogpt'							)

             lowercase__			:		str       =	'left'

             # Define PAD Token = EOS Token = 50256
             lowercase__			:		int       =	tokenizer.eos_token
             lowercase__			:		int       =	model.config.eos_token_id

             # use different length sentences to test batching
             lowercase__			:		Optional[Any]       =	[
                 'Hello, my dog is a little',
                 'Today, I',
             ]

             lowercase__			:		Optional[Any]       =	tokenizer(a		,			return_tensors='pt'		,			padding=a							)
             lowercase__			:		Optional[Any]       =	inputs['input_ids'].to(a							)

             lowercase__			:		str       =	model.generate(
                 input_ids=a		,			attention_mask=inputs['attention_mask'].to(a							)		,			)

             lowercase__			:		int       =	tokenizer(sentences[0]		,			return_tensors='pt'							).input_ids.to(a							)
             lowercase__			:		str       =	model.generate(input_ids=a							)

             lowercase__			:		int       =	inputs_non_padded.shape[-1] - inputs['attention_mask'][-1].long().sum().cpu().item()
             lowercase__			:		Dict       =	tokenizer(sentences[1]		,			return_tensors='pt'							).input_ids.to(a							)
             lowercase__			:		Tuple       =	model.generate(input_ids=a		,			max_length=model.config.max_length - num_paddings							)

             lowercase__			:		str       =	tokenizer.batch_decode(a		,			skip_special_tokens=a							)
             lowercase__			:		Optional[Any]       =	tokenizer.decode(output_non_padded[0]		,			skip_special_tokens=a							)
             lowercase__			:		Dict       =	tokenizer.decode(output_padded[0]		,			skip_special_tokens=a							)

             lowercase__			:		Union[str, Any]       =	[
                 'Hello, my dog is a little bit bigger than a little bit.',
                 'Today, I have a good idea of how to use the information',
             ]
             self.assertListEqual(a		,			a							)
             self.assertListEqual(a		,			[non_padded_sentence, padded_sentence]							)


      @slow
      def 		_UpperCAmelCase       (   self							)       ->					Any:
             for model_name in BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                    lowercase__			:		Tuple       =	BioGptModel.from_pretrained(a							)
                    self.assertIsNotNone(a							)


      def 		_UpperCAmelCase       (   self							)       ->					str:
             lowercase__    ,      lowercase__			:		Tuple       =	self.model_tester.prepare_config_and_inputs_for_common()
             lowercase__			:		Any       =	3
             lowercase__			:		Union[str, Any]       =	input_dict['input_ids']
             lowercase__			:		int       =	input_ids.ne(1							).to(a							)
             lowercase__			:		Optional[int]       =	ids_tensor([self.model_tester.batch_size]		,			self.model_tester.type_sequence_label_size							)
             lowercase__			:		List[Any]       =	BioGptForSequenceClassification(a							)
             model.to(a							)
             model.eval()
             lowercase__			:		Tuple       =	model(a		,			attention_mask=a		,			labels=a							)
             self.assertEqual(result.logits.shape		,			(self.model_tester.batch_size, self.model_tester.num_labels)							)


      def 		_UpperCAmelCase       (   self							)       ->					Union[str, Any]:
             lowercase__    ,      lowercase__			:		Any       =	self.model_tester.prepare_config_and_inputs_for_common()
             lowercase__			:		Any       =	3
             lowercase__			:		int       =	'multi_label_classification'
             lowercase__			:		Optional[int]       =	input_dict['input_ids']
             lowercase__			:		Any       =	input_ids.ne(1							).to(a							)
             lowercase__			:		Any       =	ids_tensor(
                 [self.model_tester.batch_size, config.num_labels]		,			self.model_tester.type_sequence_label_size							).to(torch.float							)
             lowercase__			:		Optional[int]       =	BioGptForSequenceClassification(a							)
             model.to(a							)
             model.eval()
             lowercase__			:		Tuple       =	model(a		,			attention_mask=a		,			labels=a							)
             self.assertEqual(result.logits.shape		,			(self.model_tester.batch_size, self.model_tester.num_labels)							)





@require_torch
class      UpperCAmelCase_	(    unittest.TestCase):


      @slow
      def 		_UpperCAmelCase       (   self							)       ->					List[str]:
             lowercase__			:		Optional[Any]       =	BioGptForCausalLM.from_pretrained('microsoft/biogpt'							)
             lowercase__			:		Any       =	torch.tensor([[2, 4_8_0_5, 9, 6_5_6, 2_1]]							)
             lowercase__			:		Optional[int]       =	model(a							)[0]

             lowercase__			:		int       =	4_2_3_8_4

             lowercase__			:		List[Any]       =	torch.Size((1, 5, vocab_size)							)
             self.assertEqual(output.shape		,			a							)

             lowercase__			:		int       =	torch.tensor(
                 [[[-9.5_236, -9.8_918, 10.4_557], [-11.0_469, -9.6_423, 8.1_022], [-8.8_664, -7.8_826, 5.5_325]]]							)

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


      @slow
      def 		_UpperCAmelCase       (   self							)       ->					Dict:
             lowercase__			:		Any       =	BioGptTokenizer.from_pretrained('microsoft/biogpt'							)
             lowercase__			:		Dict       =	BioGptForCausalLM.from_pretrained('microsoft/biogpt'							)
             model.to(a							)

             torch.manual_seed(0							)
             lowercase__			:		Optional[Any]       =	tokenizer('COVID-19 is'		,			return_tensors='pt'							).to(a							)
             lowercase__			:		Optional[int]       =	model.generate(
                 **a		,			min_length=1_0_0		,			max_length=1_0_2_4		,			num_beams=5		,			early_stopping=a		,			)
             lowercase__			:		List[Any]       =	tokenizer.decode(output_ids[0]		,			skip_special_tokens=a							)

             lowercase__			:		Any       =	(
                 'COVID-19 is a global pandemic caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), the'
                 ' causative agent of coronavirus disease 2019 (COVID-19), which has spread to more than 200 countries and'
                 ' territories, including the United States (US), Canada, Australia, New Zealand, the United Kingdom (UK),'
                 ' and the United States of America (USA), as of March 11, 2020, with more than 800,000 confirmed cases and'
                 ' more than 800,000 deaths.'
             )
             self.assertEqual(a		,			a							)



import warnings

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


UpperCAmelCase	      = logging.get_logger(__name__)

UpperCAmelCase	      = {
    '''xlnet-base-cased''': '''https://huggingface.co/xlnet-base-cased/resolve/main/config.json''',
    '''xlnet-large-cased''': '''https://huggingface.co/xlnet-large-cased/resolve/main/config.json''',
}







class        A_   (			__lowerCamelCase   ):




	'''simple docstring'''


	_UpperCamelCase     :     Tuple							 =       """xlnet"""
	_UpperCamelCase     :     Optional[Any]							 =       ["""mems"""]
	_UpperCamelCase     :     Tuple							 =       {
	    """n_token""": """vocab_size""",  # Backward compatibility
	    """hidden_size""": """d_model""",
	    """num_attention_heads""": """n_head""",
	    """num_hidden_layers""": """n_layer""",
	}





	def __init__(       self		,    snake_case=3_2000		,    snake_case=1024		,    snake_case=24		,    snake_case=16		,    snake_case=4096		,    snake_case="gelu"		,    snake_case=True		,    snake_case="bi"		,    snake_case=0.02		,    snake_case=1E-12		,    snake_case=0.1		,    snake_case=512		,    snake_case=None		,    snake_case=True		,    snake_case=False		,    snake_case=False		,    snake_case=-1		,    snake_case=False		,    snake_case="last"		,    snake_case=True		,    snake_case="tanh"		,    snake_case=0.1		,    snake_case=5		,    snake_case=5		,    snake_case=5		,    snake_case=1		,    snake_case=2		,    **snake_case		,    ):
		lowercase       =    vocab_size
		lowercase       =    d_model
		lowercase       =    n_layer
		lowercase       =    n_head
		if d_model % n_head != 0:
			raise ValueError(F'''\'d_model % n_head\' ({d_model % n_head}) should be equal to 0'''       )
		if "d_head" in kwargs:
			if kwargs["d_head"] != d_model // n_head:
				raise ValueError(
				    F'''`d_head` ({kwargs['d_head']}) should be equal to `d_model // n_head` ({d_model // n_head})'''       )
		lowercase       =    d_model // n_head
		lowercase       =    ff_activation
		lowercase       =    d_inner
		lowercase       =    untie_r
		lowercase       =    attn_type

		lowercase       =    initializer_range
		lowercase       =    layer_norm_eps

		lowercase       =    dropout
		lowercase       =    mem_len
		lowercase       =    reuse_len
		lowercase       =    bi_data
		lowercase       =    clamp_len
		lowercase       =    same_length

		lowercase       =    summary_type
		lowercase       =    summary_use_proj
		lowercase       =    summary_activation
		lowercase       =    summary_last_dropout
		lowercase       =    start_n_top
		lowercase       =    end_n_top

		lowercase       =    bos_token_id
		lowercase       =    pad_token_id
		lowercase       =    eos_token_id

		if "use_cache" in kwargs:
			warnings.warn(
			    'The `use_cache` argument is deprecated and will be removed in a future version, use `use_mems_eval`'
			    ' instead.'		,    snake_case		,    )
			lowercase       =    kwargs['use_cache']

		lowercase       =    use_mems_eval
		lowercase       =    use_mems_train
		super().__init__(pad_token_id=snake_case		,    bos_token_id=snake_case		,    eos_token_id=snake_case		,    **snake_case       )





	@property
	def 	SCREAMING_SNAKE_CASE__						(       self       ):
		logger.info(F'''The model {self.model_type} is one of the few models that has no sequence length limit.'''       )
		return -1





	@max_position_embeddings.setter
	def 	SCREAMING_SNAKE_CASE__						(       self		,    snake_case       ):
		# Message copied from Transformer-XL documentation
		raise NotImplementedError(
		    F'''The model {self.model_type} is one of the few models that has no sequence length limit.'''       )

