





import unittest

from transformers import LiltConfig, 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
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
			import torch

			from transformers import (
			    LiltForQuestionAnswering,
			    LiltForSequenceClassification,
			    LiltForTokenClassification,
			    LiltModel,
			)
			from transformers.models.lilt.modeling_lilt import LILT_PRETRAINED_MODEL_ARCHIVE_LIST
class   a_ :

			def __init__(   self   :  Union[str, Any]     , UpperCAmelCase__   :  Optional[Any]     , UpperCAmelCase__   :  Any=13     , UpperCAmelCase__   :  Optional[Any]=7     , UpperCAmelCase__   :  List[str]=True     , UpperCAmelCase__   :  int=True     , UpperCAmelCase__   :  Dict=True     , UpperCAmelCase__   :  Optional[int]=True     , UpperCAmelCase__   :  Optional[int]=99     , UpperCAmelCase__   :  Optional[int]=24     , UpperCAmelCase__   :  List[str]=2     , UpperCAmelCase__   :  Dict=6     , UpperCAmelCase__   :  List[str]=37     , UpperCAmelCase__   :  Optional[int]="gelu"     , UpperCAmelCase__   :  List[str]=0.1     , UpperCAmelCase__   :  Dict=0.1     , UpperCAmelCase__   :  Optional[Any]=512     , UpperCAmelCase__   :  str=16     , UpperCAmelCase__   :  Union[str, Any]=2     , UpperCAmelCase__   :  str=0.02     , UpperCAmelCase__   :  Any=3     , UpperCAmelCase__   :  Optional[Any]=None     , UpperCAmelCase__   :  Dict=1_000     , ):






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

			def      lowerCAmelCase(   self   :  int						):






							"""simple docstring"""
							snake_case   :					Any    						=				ids_tensor([self.batch_size, self.seq_length]     , self.vocab_size						)

							snake_case   :					Dict    						=				ids_tensor([self.batch_size, self.seq_length, 4]     , self.range_bbox						)
							# Ensure that bbox is legal
							for i in range(bbox.shape[0]						):
											for j in range(bbox.shape[1]						):
															if bbox[i, j, 3] < bbox[i, j, 1]:
																			snake_case   :					Optional[int]    						=				bbox[i, j, 3]
																			snake_case   :					List[Any]    						=				bbox[i, j, 1]
																			snake_case   :					List[str]    						=				t
															if bbox[i, j, 2] < bbox[i, j, 0]:
																			snake_case   :					List[Any]    						=				bbox[i, j, 2]
																			snake_case   :					Optional[int]    						=				bbox[i, j, 0]
																			snake_case   :					str    						=				t

							snake_case   :					Union[str, Any]    						=				None
							if self.use_input_mask:
											snake_case   :					Tuple    						=				ids_tensor([self.batch_size, self.seq_length]     , vocab_size=2						)

							snake_case   :					Optional[Any]    						=				None
							if self.use_token_type_ids:
											snake_case   :					Union[str, Any]    						=				ids_tensor([self.batch_size, self.seq_length]     , self.type_vocab_size						)

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

							snake_case   :					Union[str, Any]    						=				self.get_config()

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

			def      lowerCAmelCase(   self   :  Dict						):






							"""simple docstring"""
							return LiltConfig(
							    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     , initializer_range=self.initializer_range     , )

			def      lowerCAmelCase(   self   :  List[Any]     , UpperCAmelCase__   :  Optional[int]     , UpperCAmelCase__   :  Optional[int]     , UpperCAmelCase__   :  Union[str, Any]     , UpperCAmelCase__   :  int     , UpperCAmelCase__   :  Optional[Any]     , UpperCAmelCase__   :  Union[str, Any]     , UpperCAmelCase__   :  Tuple     , ):






							"""simple docstring"""
							snake_case   :					Dict    						=				LiltModel(config=UpperCAmelCase_						)
							model.to(UpperCAmelCase_						)
							model.eval()
							snake_case   :					Optional[int]    						=				model(UpperCAmelCase_     , bbox=UpperCAmelCase_     , attention_mask=UpperCAmelCase_     , token_type_ids=UpperCAmelCase_						)
							snake_case   :					Union[str, Any]    						=				model(UpperCAmelCase_     , bbox=UpperCAmelCase_     , token_type_ids=UpperCAmelCase_						)
							snake_case   :					List[str]    						=				model(UpperCAmelCase_     , bbox=UpperCAmelCase_						)

							self.parent.assertEqual(result.last_hidden_state.shape     , (self.batch_size, self.seq_length, self.hidden_size)						)
							self.parent.assertEqual(result.pooler_output.shape     , (self.batch_size, self.hidden_size)						)

			def      lowerCAmelCase(   self   :  Tuple     , UpperCAmelCase__   :  int     , UpperCAmelCase__   :  int     , UpperCAmelCase__   :  Any     , UpperCAmelCase__   :  int     , UpperCAmelCase__   :  List[str]     , UpperCAmelCase__   :  List[Any]     , UpperCAmelCase__   :  Optional[Any]     , ):






							"""simple docstring"""
							snake_case   :					Optional[Any]    						=				self.num_labels
							snake_case   :					List[Any]    						=				LiltForTokenClassification(config=UpperCAmelCase_						)
							model.to(UpperCAmelCase_						)
							model.eval()
							snake_case   :					Optional[Any]    						=				model(
							    UpperCAmelCase_     , bbox=UpperCAmelCase_     , attention_mask=UpperCAmelCase_     , token_type_ids=UpperCAmelCase_     , labels=UpperCAmelCase_						)
							self.parent.assertEqual(result.logits.shape     , (self.batch_size, self.seq_length, self.num_labels)						)

			def      lowerCAmelCase(   self   :  Union[str, Any]     , UpperCAmelCase__   :  int     , UpperCAmelCase__   :  Optional[Any]     , UpperCAmelCase__   :  Optional[Any]     , UpperCAmelCase__   :  Union[str, Any]     , UpperCAmelCase__   :  Union[str, Any]     , UpperCAmelCase__   :  Optional[Any]     , UpperCAmelCase__   :  Union[str, Any]     , ):






							"""simple docstring"""
							snake_case   :					Tuple    						=				LiltForQuestionAnswering(config=UpperCAmelCase_						)
							model.to(UpperCAmelCase_						)
							model.eval()
							snake_case   :					Tuple    						=				model(
							    UpperCAmelCase_     , bbox=UpperCAmelCase_     , attention_mask=UpperCAmelCase_     , token_type_ids=UpperCAmelCase_     , start_positions=UpperCAmelCase_     , end_positions=UpperCAmelCase_     , )
							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   :  Tuple						):






							"""simple docstring"""
							snake_case   :					Dict    						=				self.prepare_config_and_inputs()
							(
							    (
							    snake_case							
							)						,						(
							    snake_case							
							)						,						(
							    snake_case							
							)						,						(
							    snake_case							
							)						,						(
							    snake_case							
							)						,						(
							    snake_case							
							)						,						(
							    snake_case							
							)						,													
							)   :					Optional[int]    						=				config_and_inputs
							snake_case   :					Optional[int]    						=				{
							    '''input_ids''': input_ids,
							    '''bbox''': bbox,
							    '''token_type_ids''': token_type_ids,
							    '''attention_mask''': input_mask,
							}
							return config, inputs_dict
@require_torch
class   a_ (			a		,							a		,							a		,							unittest.TestCase      ):
			A__      :			Optional[Any]       	=  (
			    (
			        LiltModel,
			        LiltForSequenceClassification,
			        LiltForTokenClassification,
			        LiltForQuestionAnswering,
			    )
			    if is_torch_available()
			    else ()
			)
			A__      :			int       	=  (
			    {
			        "feature-extraction": LiltModel,
			        "question-answering": LiltForQuestionAnswering,
			        "text-classification": LiltForSequenceClassification,
			        "token-classification": LiltForTokenClassification,
			        "zero-shot": LiltForSequenceClassification,
			    }
			    if is_torch_available()
			    else {}
			)
			A__      :			Any       	=  False
			A__      :			Tuple       	=  False

			def      lowerCAmelCase(   self   :  List[str]     , UpperCAmelCase__   :  Optional[Any]     , UpperCAmelCase__   :  Any     , UpperCAmelCase__   :  Tuple     , UpperCAmelCase__   :  Union[str, Any]     , UpperCAmelCase__   :  int						):






							"""simple docstring"""
							return True

			def      lowerCAmelCase(   self   :  Union[str, Any]						):






							"""simple docstring"""
							snake_case   :					Optional[Any]    						=				LiltModelTester(self						)
							snake_case   :					Tuple    						=				ConfigTester(self     , config_class=UpperCAmelCase_     , hidden_size=37						)

			def      lowerCAmelCase(   self   :  Optional[int]						):






							"""simple docstring"""
							self.config_tester.run_common_tests()

			def      lowerCAmelCase(   self   :  Optional[int]						):






							"""simple docstring"""
							snake_case   :					Union[str, Any]    						=				self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_model(*UpperCAmelCase_						)

			def      lowerCAmelCase(   self   :  List[str]						):






							"""simple docstring"""
							snake_case   :					Union[str, Any]    						=				self.model_tester.prepare_config_and_inputs()
							for type in ["absolute", "relative_key", "relative_key_query"]:
											snake_case   :					str    						=				type
											self.model_tester.create_and_check_model(*UpperCAmelCase_						)

			def      lowerCAmelCase(   self   :  Dict						):






							"""simple docstring"""
							snake_case   :					int    						=				self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_token_classification(*UpperCAmelCase_						)

			def      lowerCAmelCase(   self   :  List[str]						):






							"""simple docstring"""
							snake_case   :					Optional[Any]    						=				self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_question_answering(*UpperCAmelCase_						)



			@slow
			def      lowerCAmelCase(   self   :  Optional[Any]						):






							"""simple docstring"""
							for model_name in LILT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
											snake_case   :					Union[str, Any]    						=				LiltModel.from_pretrained(UpperCAmelCase_						)
											self.assertIsNotNone(UpperCAmelCase_						)
@require_torch
@slow
class   a_ (			unittest.TestCase      ):

			def      lowerCAmelCase(   self   :  Optional[int]						):






							"""simple docstring"""
							snake_case   :					Any    						=				LiltModel.from_pretrained('''SCUT-DLVCLab/lilt-roberta-en-base'''						).to(UpperCAmelCase_						)

							snake_case   :					List[str]    						=				torch.tensor([[1, 2]]     , device=UpperCAmelCase_						)
							snake_case   :					Optional[int]    						=				torch.tensor([[[1, 2, 3, 4], [5, 6, 7, 8]]]     , device=UpperCAmelCase_						)

							# forward pass
							with torch.no_grad():
											snake_case   :					str    						=				model(input_ids=UpperCAmelCase_     , bbox=UpperCAmelCase_						)

							snake_case   :					Union[str, Any]    						=				torch.Size([1, 2, 768]						)
							snake_case   :					Optional[Any]    						=				torch.tensor(
							    [[-0.0653, 0.0950, -0.0061], [-0.0545, 0.0926, -0.0324]]     , device=UpperCAmelCase_     , )

							self.assertTrue(outputs.last_hidden_state.shape     , UpperCAmelCase_						)
							self.assertTrue(torch.allclose(outputs.last_hidden_state[0, :, :3]     , UpperCAmelCase_     , atol=1e-3						)						)





'''simple docstring'''





import gc
import unittest

from transformers import CTRLConfig, 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 (
     CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
     CTRLForSequenceClassification,
     CTRLLMHeadModel,
     CTRLModel,
 )


class 					snake_case			:



       def __init__(					self  ,UpperCAmelCase_  ,UpperCAmelCase_=14  ,UpperCAmelCase_=7  ,UpperCAmelCase_=True  ,UpperCAmelCase_=True  ,UpperCAmelCase_=True  ,UpperCAmelCase_=True  ,UpperCAmelCase_=True  ,UpperCAmelCase_=99  ,UpperCAmelCase_=32  ,UpperCAmelCase_=5  ,UpperCAmelCase_=4  ,UpperCAmelCase_=37  ,UpperCAmelCase_="gelu"  ,UpperCAmelCase_=0.1  ,UpperCAmelCase_=0.1  ,UpperCAmelCase_=512  ,UpperCAmelCase_=16  ,UpperCAmelCase_=2  ,UpperCAmelCase_=0.02  ,UpperCAmelCase_=3  ,UpperCAmelCase_=4  ,UpperCAmelCase_=None  ,)	->				Dict:
           lowercase__									=    parent
           lowercase__									=    batch_size
           lowercase__									=    seq_length
           lowercase__									=    is_training
           lowercase__									=    use_token_type_ids
           lowercase__									=    use_input_mask
           lowercase__									=    use_labels
           lowercase__									=    use_mc_token_ids
           lowercase__									=    vocab_size
           lowercase__									=    hidden_size
           lowercase__									=    num_hidden_layers
           lowercase__									=    num_attention_heads
           lowercase__									=    intermediate_size
           lowercase__									=    hidden_act
           lowercase__									=    hidden_dropout_prob
           lowercase__									=    attention_probs_dropout_prob
           lowercase__									=    max_position_embeddings
           lowercase__									=    type_vocab_size
           lowercase__									=    type_sequence_label_size
           lowercase__									=    initializer_range
           lowercase__									=    num_labels
           lowercase__									=    num_choices
           lowercase__									=    scope
           lowercase__									=    self.vocab_size - 1



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

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

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

           lowercase__									=    None
           if self.use_mc_token_ids:
               lowercase__									=    ids_tensor([self.batch_size, self.num_choices]  ,self.seq_length   )

           lowercase__									=    None
           lowercase__									=    None
           lowercase__									=    None
           if self.use_labels:
               lowercase__									=    ids_tensor([self.batch_size]  ,self.type_sequence_label_size   )
               lowercase__									=    ids_tensor([self.batch_size, self.seq_length]  ,self.num_labels   )
               lowercase__									=    ids_tensor([self.batch_size]  ,self.num_choices   )

           lowercase__									=    self.get_config()

           lowercase__									=    ids_tensor([self.num_hidden_layers, self.num_attention_heads]  ,2   )

           return (
               config,
               input_ids,
               input_mask,
               head_mask,
               token_type_ids,
               mc_token_ids,
               sequence_labels,
               token_labels,
               choice_labels,
           )



       def 				_a   (					self   )	->				Optional[int]:
           return CTRLConfig(
               vocab_size=self.vocab_size  ,n_embd=self.hidden_size  ,n_layer=self.num_hidden_layers  ,n_head=self.num_attention_heads  ,n_positions=self.max_position_embeddings  ,pad_token_id=self.pad_token_id  ,)



       def 				_a   (					self  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,*UpperCAmelCase_   )	->				List[Any]:
           lowercase__									=    CTRLModel(config=UpperCAmelCase_   )
           model.to(UpperCAmelCase_   )
           model.eval()

           model(UpperCAmelCase_  ,token_type_ids=UpperCAmelCase_  ,head_mask=UpperCAmelCase_   )
           model(UpperCAmelCase_  ,token_type_ids=UpperCAmelCase_   )
           lowercase__									=    model(UpperCAmelCase_   )
           self.parent.assertEqual(result.last_hidden_state.shape  ,(self.batch_size, self.seq_length, self.hidden_size)   )
           self.parent.assertEqual(len(result.past_key_values   )  ,config.n_layer   )



       def 				_a   (					self  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,*UpperCAmelCase_   )	->				Optional[int]:
           lowercase__									=    CTRLLMHeadModel(UpperCAmelCase_   )
           model.to(UpperCAmelCase_   )
           model.eval()

           lowercase__									=    model(UpperCAmelCase_  ,token_type_ids=UpperCAmelCase_  ,labels=UpperCAmelCase_   )
           self.parent.assertEqual(result.loss.shape  ,()   )
           self.parent.assertEqual(result.logits.shape  ,(self.batch_size, self.seq_length, self.vocab_size)   )



       def 				_a   (					self   )	->				Union[str, Any]:
           lowercase__									=    self.prepare_config_and_inputs()

           (
               (
               lowercase__
           )							,							(
               lowercase__
           )							,							(
               lowercase__
           )							,							(
               lowercase__
           )							,							(
               lowercase__
           )							,							(
               lowercase__
           )							,							(
               lowercase__
           )							,							(
               lowercase__
           )							,							(
               lowercase__
           )							,							
           )									=    config_and_inputs

           lowercase__									=    {"input_ids": input_ids, "token_type_ids": token_type_ids, "head_mask": head_mask}

           return config, inputs_dict







       def 				_a   (					self  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,*UpperCAmelCase_   )	->				Optional[int]:
           lowercase__									=    self.num_labels
           lowercase__									=    CTRLForSequenceClassification(UpperCAmelCase_   )
           model.to(UpperCAmelCase_   )
           model.eval()
           lowercase__									=    ids_tensor([self.batch_size]  ,self.type_sequence_label_size   )
           lowercase__									=    model(UpperCAmelCase_  ,token_type_ids=UpperCAmelCase_  ,labels=UpperCAmelCase_   )
           self.parent.assertEqual(result.logits.shape  ,(self.batch_size, self.num_labels)   )





@require_torch
class 					snake_case			(UpperCamelCase		,   UpperCamelCase		,   UpperCamelCase		,   unittest.TestCase ):
       lowerCAmelCase__	:Union[str, Any]     =       (CTRLModel, CTRLLMHeadModel, CTRLForSequenceClassification) if is_torch_available() else ()
       lowerCAmelCase__	:Dict     =       (CTRLLMHeadModel,) if is_torch_available() else ()
       lowerCAmelCase__	:int     =       (
           {
               "feature-extraction": CTRLModel,
               "text-classification": CTRLForSequenceClassification,
               "text-generation": CTRLLMHeadModel,
               "zero-shot": CTRLForSequenceClassification,
           }
           if is_torch_available()
           else {}
       )
       lowerCAmelCase__	:str     =       True
       lowerCAmelCase__	:Tuple     =       False
       lowerCAmelCase__	:List[Any]     =       False



       def 				_a   (					self  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_  ,UpperCAmelCase_   )	->				Tuple:
           if pipeline_test_casse_name == "ZeroShotClassificationPipelineTests":
               # Get `tokenizer does not have a padding token` error for both fast/slow tokenizers.
               # `CTRLConfig` was never used in pipeline tests, either because of a missing checkpoint or because a tiny
               # config could not be created.
               return True

           return False



       def 				_a   (					self   )	->				str:
           lowercase__									=    CTRLModelTester(self   )
           lowercase__									=    ConfigTester(self  ,config_class=UpperCAmelCase_  ,n_embd=37   )



       def 				_a   (					self   )	->				List[Any]:
           super().tearDown()
           # clean-up as much as possible GPU memory occupied by PyTorch
           gc.collect()
           torch.cuda.empty_cache()



       def 				_a   (					self   )	->				Tuple:
           self.config_tester.run_common_tests()



       def 				_a   (					self   )	->				Any:
           lowercase__									=    self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_ctrl_model(*UpperCAmelCase_   )



       def 				_a   (					self   )	->				Optional[Any]:
           lowercase__									=    self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_lm_head_model(*UpperCAmelCase_   )



       @unittest.skip("Will be fixed soon by reducing the size of the model used for common tests."   )
       def 				_a   (					self   )	->				Tuple:
           pass



       @slow
       def 				_a   (					self   )	->				List[str]:
           for model_name in CTRL_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
               lowercase__									=    CTRLModel.from_pretrained(UpperCAmelCase_   )
               self.assertIsNotNone(UpperCAmelCase_   )







       @unittest.skip("The model doesn't support left padding"   )  # and it's not used enough to be worth fixing :)
       def 				_a   (					self   )	->				Tuple:
           pass





@require_torch
class 					snake_case			(unittest.TestCase ):



       def 				_a   (					self   )	->				int:
           super().tearDown()
           # clean-up as much as possible GPU memory occupied by PyTorch
           gc.collect()
           torch.cuda.empty_cache()







       @slow
       def 				_a   (					self   )	->				int:
           lowercase__									=    CTRLLMHeadModel.from_pretrained("ctrl"   )
           model.to(UpperCAmelCase_   )
           lowercase__									=    torch.tensor(
               [[11_859, 0, 1_611, 8]]  ,dtype=torch.long  ,device=UpperCAmelCase_   )  # Legal the president is
           lowercase__									=    [
               11_859,
               0,
               1_611,
               8,
               5,
               150,
               26_449,
               2,
               19,
               348,
               469,
               3,
               2_595,
               48,
               20_740,
               246_533,
               246_533,
               19,
               30,
               5,
           ]  # Legal the president is a good guy and I don't want to lose my job. \n \n I have a

           lowercase__									=    model.generate(UpperCAmelCase_  ,do_sample=UpperCAmelCase_   )
           self.assertListEqual(output_ids[0].tolist()  ,UpperCAmelCase_   )




