'''simple docstring'''







from __future__ import annotations

import unittest

from transformers import EsmConfig, is_tf_available
from transformers.testing_utils import require_tf, slow

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
		import numpy
		import tensorflow as tf

		from transformers.models.esm.modeling_tf_esm import (
		    TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TFEsmForMaskedLM,
		    TFEsmForSequenceClassification,
		    TFEsmForTokenClassification,
		    TFEsmModel,
		)




class _SCREAMING_SNAKE_CASE:




						def __init__(    self :       str							,							UpperCamelCase_ :       Tuple							,							)     ->				Dict:
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = parent
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = 13
													SCREAMING_SNAKE_CASE__     :int						    = 7
													SCREAMING_SNAKE_CASE__     :List[Any]						    = True
													SCREAMING_SNAKE_CASE__     :str						    = True
													SCREAMING_SNAKE_CASE__     :List[str]						    = True
													SCREAMING_SNAKE_CASE__     :Tuple						    = 99
													SCREAMING_SNAKE_CASE__     :Any						    = 32
													SCREAMING_SNAKE_CASE__     :Dict						    = 2
													SCREAMING_SNAKE_CASE__     :Tuple						    = 4
													SCREAMING_SNAKE_CASE__     :int						    = 37
													SCREAMING_SNAKE_CASE__     :Tuple						    = 'gelu'
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = 0.1
													SCREAMING_SNAKE_CASE__     :Tuple						    = 0.1
													SCREAMING_SNAKE_CASE__     :Any						    = 5_12
													SCREAMING_SNAKE_CASE__     :Any						    = 16
													SCREAMING_SNAKE_CASE__     :List[str]						    = 2
													SCREAMING_SNAKE_CASE__     :Optional[Any]						    = 0.02
													SCREAMING_SNAKE_CASE__     :List[Any]						    = 3
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = 4
													SCREAMING_SNAKE_CASE__     :Any						    = None




						def      __lowerCamelCase       (    self :       Optional[int]      )     ->				int:
													SCREAMING_SNAKE_CASE__     :List[str]						    = ids_tensor([self.batch_size, self.seq_length]							,							self.vocab_size      )

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

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

													SCREAMING_SNAKE_CASE__     :Dict						    = EsmConfig(
													    vocab_size=self.vocab_size							,							hidden_size=self.hidden_size							,							num_hidden_layers=self.num_hidden_layers							,							pad_token_id=1							,							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							,							)

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




						def      __lowerCamelCase       (    self :       Union[str, Any]      )     ->				List[str]:
													(
													    (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      
													)     :Optional[int]						    = self.prepare_config_and_inputs()

													SCREAMING_SNAKE_CASE__     :Optional[int]						    = True
													SCREAMING_SNAKE_CASE__     :int						    = floats_tensor([self.batch_size, self.seq_length, self.hidden_size]      )
													SCREAMING_SNAKE_CASE__     :Dict						    = ids_tensor([self.batch_size, self.seq_length]							,							vocab_size=2      )

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




						def      __lowerCamelCase       (    self :       int							,							UpperCamelCase_ :       str							,							UpperCamelCase_ :       List[str]							,							UpperCamelCase_ :       Tuple							,							UpperCamelCase_ :       Any							,							UpperCamelCase_ :       Union[str, Any]							,							UpperCamelCase_ :       Optional[int]      )     ->				Optional[Any]:
													SCREAMING_SNAKE_CASE__     :Dict						    = TFEsmModel(config=UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :List[str]						    = {'input_ids': input_ids, 'attention_mask': input_mask}
													SCREAMING_SNAKE_CASE__     :List[Any]						    = model(UpperCamelCase_      )

													SCREAMING_SNAKE_CASE__     :str						    = [input_ids, input_mask]
													SCREAMING_SNAKE_CASE__     :Optional[int]						    = model(UpperCamelCase_      )

													SCREAMING_SNAKE_CASE__     :Optional[Any]						    = model(UpperCamelCase_      )

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




						def      __lowerCamelCase       (    self :       Tuple							,							UpperCamelCase_ :       Any							,							UpperCamelCase_ :       Optional[Any]							,							UpperCamelCase_ :       Optional[Any]							,							UpperCamelCase_ :       Optional[int]							,							UpperCamelCase_ :       List[Any]							,							UpperCamelCase_ :       Union[str, Any]							,							UpperCamelCase_ :       str							,							UpperCamelCase_ :       List[str]							,							)     ->				List[str]:
													SCREAMING_SNAKE_CASE__     :int						    = True

													SCREAMING_SNAKE_CASE__     :Any						    = TFEsmModel(config=UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :Optional[int]						    = {
													    'input_ids': input_ids,
													    'attention_mask': input_mask,
													    'encoder_hidden_states': encoder_hidden_states,
													    'encoder_attention_mask': encoder_attention_mask,
													}
													SCREAMING_SNAKE_CASE__     :int						    = model(UpperCamelCase_      )

													SCREAMING_SNAKE_CASE__     :Optional[int]						    = [input_ids, input_mask]
													SCREAMING_SNAKE_CASE__     :str						    = model(UpperCamelCase_							,							encoder_hidden_states=UpperCamelCase_      )

													# Also check the case where encoder outputs are not passed
													SCREAMING_SNAKE_CASE__     :Tuple						    = model(UpperCamelCase_							,							attention_mask=UpperCamelCase_      )

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




						def      __lowerCamelCase       (    self :       Optional[int]							,							UpperCamelCase_ :       int							,							UpperCamelCase_ :       str							,							UpperCamelCase_ :       Dict							,							UpperCamelCase_ :       int							,							UpperCamelCase_ :       Union[str, Any]							,							UpperCamelCase_ :       Tuple      )     ->				Dict:
													SCREAMING_SNAKE_CASE__     :Optional[int]						    = TFEsmForMaskedLM(config=UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :Tuple						    = model([input_ids, input_mask]      )
													self.parent.assertEqual(result.logits.shape							,							(self.batch_size, self.seq_length, self.vocab_size)      )




						def      __lowerCamelCase       (    self :       Optional[int]							,							UpperCamelCase_ :       List[Any]							,							UpperCamelCase_ :       Any							,							UpperCamelCase_ :       Optional[int]							,							UpperCamelCase_ :       Any							,							UpperCamelCase_ :       int							,							UpperCamelCase_ :       int      )     ->				Optional[int]:
													SCREAMING_SNAKE_CASE__     :Any						    = self.num_labels
													SCREAMING_SNAKE_CASE__     :List[str]						    = TFEsmForTokenClassification(config=UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :Optional[int]						    = {'input_ids': input_ids, 'attention_mask': input_mask}
													SCREAMING_SNAKE_CASE__     :List[str]						    = model(UpperCamelCase_      )
													self.parent.assertEqual(result.logits.shape							,							(self.batch_size, self.seq_length, self.num_labels)      )




						def      __lowerCamelCase       (    self :       Tuple      )     ->				Tuple:
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = self.prepare_config_and_inputs()
													(
													    (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      (
													    SCREAMING_SNAKE_CASE__
													)    ,      
													)     :Optional[Any]						    = config_and_inputs
													SCREAMING_SNAKE_CASE__     :str						    = {'input_ids': input_ids, 'attention_mask': input_mask}
													return config, inputs_dict




@require_tf
class _SCREAMING_SNAKE_CASE(							_SCREAMING_SNAKE_CASE						,						_SCREAMING_SNAKE_CASE						,						unittest.TestCase					):
						A_			:							List[str]     		= (
						    (
						        TFEsmModel,
						        TFEsmForMaskedLM,
						        TFEsmForSequenceClassification,
						        TFEsmForTokenClassification,
						    )
						    if is_tf_available()
						    else ()
						)
						A_			:							List[str]     		= (
						    {
						        'feature-extraction': TFEsmModel,
						        'fill-mask': TFEsmForMaskedLM,
						        'text-classification': TFEsmForSequenceClassification,
						        'token-classification': TFEsmForTokenClassification,
						        'zero-shot': TFEsmForSequenceClassification,
						    }
						    if is_tf_available()
						    else {}
						)
						A_			:							Optional[int]     		= False
						A_			:							str     		= False




						def      __lowerCamelCase       (    self :       List[str]      )     ->				Optional[int]:
													SCREAMING_SNAKE_CASE__     :str						    = TFEsmModelTester(self      )
													SCREAMING_SNAKE_CASE__     :Dict						    = ConfigTester(self							,							config_class=UpperCamelCase_							,							hidden_size=37      )




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




						def      __lowerCamelCase       (    self :       Tuple      )     ->				List[str]:
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_model(*UpperCamelCase_      )




						def      __lowerCamelCase       (    self :       Optional[int]      )     ->				Dict:
													SCREAMING_SNAKE_CASE__     :Optional[Any]						    = self.model_tester.prepare_config_and_inputs_for_decoder()
													self.model_tester.create_and_check_model_as_decoder(*UpperCamelCase_      )




						def      __lowerCamelCase       (    self :       Tuple      )     ->				Any:
													SCREAMING_SNAKE_CASE__     :List[str]						    = self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_for_masked_lm(*UpperCamelCase_      )




						def      __lowerCamelCase       (    self :       Dict      )     ->				List[str]:
													SCREAMING_SNAKE_CASE__     :int						    = self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_for_token_classification(*UpperCamelCase_      )




						@slow
						def      __lowerCamelCase       (    self :       Tuple      )     ->				Optional[Any]:
													for model_name in TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																				SCREAMING_SNAKE_CASE__     :Dict						    = TFEsmModel.from_pretrained(UpperCamelCase_      )
																				self.assertIsNotNone(UpperCamelCase_      )




						@unittest.skip('Protein models do not support embedding resizing.'      )
						def      __lowerCamelCase       (    self :       Dict      )     ->				Tuple:
													pass




						@unittest.skip('Protein models do not support embedding resizing.'      )
						def      __lowerCamelCase       (    self :       List[Any]      )     ->				Union[str, Any]:
													pass




						def      __lowerCamelCase       (    self :       Dict      )     ->				int:
													SCREAMING_SNAKE_CASE__    ,      SCREAMING_SNAKE_CASE__     :List[str]						    = self.model_tester.prepare_config_and_inputs_for_common()

													for model_class in self.all_model_classes:
																				SCREAMING_SNAKE_CASE__     :Any						    = model_class(UpperCamelCase_      )
																				assert isinstance(model.get_input_embeddings()							,							tf.keras.layers.Layer      )
																				if model_class is TFEsmForMaskedLM:
																											# Output embedding test differs from the main test because they're a matrix, not a layer
																											SCREAMING_SNAKE_CASE__     :List[str]						    = model.get_bias()
																											assert isinstance(UpperCamelCase_							,							UpperCamelCase_      )
																											for k, v in name.items():
																																		assert isinstance(UpperCamelCase_							,							tf.Variable      )
																				else:
																											SCREAMING_SNAKE_CASE__     :Optional[Any]						    = model.get_output_embeddings()
																											assert x is None
																											SCREAMING_SNAKE_CASE__     :Optional[int]						    = model.get_bias()
																											assert name is None




@require_tf
class _SCREAMING_SNAKE_CASE(							unittest.TestCase					):




						@slow
						def      __lowerCamelCase       (    self :       Tuple      )     ->				Union[str, Any]:
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = TFEsmForMaskedLM.from_pretrained('facebook/esm2_t6_8M_UR50D'      )

													SCREAMING_SNAKE_CASE__     :Dict						    = tf.constant([[0, 1, 2, 3, 4, 5]]      )
													SCREAMING_SNAKE_CASE__     :List[str]						    = model(UpperCamelCase_      )[0]
													SCREAMING_SNAKE_CASE__     :Tuple						    = [1, 6, 33]
													self.assertEqual(list(output.numpy().shape      )							,							UpperCamelCase_      )
													# compare the actual values for a slice.
													SCREAMING_SNAKE_CASE__     :List[str]						    = tf.constant(
													    [
													        [
													            [8.92_1518, -10.58_9814, -6.467_1307],
													            [-6.396_7156, -13.91_1377, -1.121_1915],
													            [-7.78_1247, -13.95_1557, -3.74_0592],
													        ]
													    ]      )
													self.assertTrue(numpy.allclose(output[:, :3, :3].numpy()							,							expected_slice.numpy()							,							atol=1e-2      )      )




						@slow
						def      __lowerCamelCase       (    self :       Any      )     ->				str:
													SCREAMING_SNAKE_CASE__     :Dict						    = TFEsmModel.from_pretrained('facebook/esm2_t6_8M_UR50D'      )

													SCREAMING_SNAKE_CASE__     :str						    = tf.constant([[0, 6, 4, 13, 5, 4, 16, 12, 11, 7, 2]]      )
													SCREAMING_SNAKE_CASE__     :Any						    = model(UpperCamelCase_      )[0]
													# compare the actual values for a slice.
													SCREAMING_SNAKE_CASE__     :Dict						    = tf.constant(
													    [
													        [
													            [0.1444_3092, 0.5412_5327, 0.324_7739],
													            [0.3034_0484, 0.0052_6676, 0.3107_7722],
													            [0.3227_8043, -0.2498_7096, 0.341_4628],
													        ]
													    ]      )
													self.assertTrue(numpy.allclose(output[:, :3, :3].numpy()							,							expected_slice.numpy()							,							atol=1e-4      )      )







'''simple docstring'''







import unittest

from transformers import CamembertTokenizer, CamembertTokenizerFast
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, slow
from transformers.utils import is_torch_available

from ...test_tokenization_common import TokenizerTesterMixin


UpperCamelCase_      	=	get_tests_dir('''fixtures/test_sentencepiece.model''')
UpperCamelCase_      	=	get_tests_dir('''fixtures/test_sentencepiece_bpe.model''')

UpperCamelCase_      	=	'''pt''' if is_torch_available() else '''tf'''




@require_sentencepiece
@require_tokenizers
class _SCREAMING_SNAKE_CASE(							_SCREAMING_SNAKE_CASE						,						unittest.TestCase					):
						A_			:							Tuple     		= CamembertTokenizer
						A_			:							Dict     		= CamembertTokenizerFast
						A_			:							Any     		= True
						A_			:							List[Any]     		= True




						def      __lowerCamelCase       (    self :       int      )     ->				Tuple:
													super().setUp()

													# We have a SentencePiece fixture for testing
													SCREAMING_SNAKE_CASE__     :Optional[int]						    = CamembertTokenizer(UpperCamelCase_      )
													tokenizer.save_pretrained(self.tmpdirname      )




						def      __lowerCamelCase       (    self :       int      )     ->				int:
													SCREAMING_SNAKE_CASE__     :List[Any]						    = '<pad>'
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = 1

													self.assertEqual(self.get_tokenizer()._convert_token_to_id(UpperCamelCase_      )							,							UpperCamelCase_      )
													self.assertEqual(self.get_tokenizer()._convert_id_to_token(UpperCamelCase_      )							,							UpperCamelCase_      )




						def      __lowerCamelCase       (    self :       int      )     ->				int:
													SCREAMING_SNAKE_CASE__     :Any						    = list(self.get_tokenizer().get_vocab().keys()      )

													self.assertEqual(vocab_keys[0]							,							'<s>NOTUSED'      )
													self.assertEqual(vocab_keys[1]							,							'<pad>'      )
													self.assertEqual(vocab_keys[-1]							,							'<mask>'      )
													self.assertEqual(len(UpperCamelCase_      )							,							10_04      )




						def      __lowerCamelCase       (    self :       List[str]      )     ->				List[str]:
													self.assertEqual(self.get_tokenizer().vocab_size							,							10_05      )




						def      __lowerCamelCase       (    self :       Union[str, Any]      )     ->				List[Any]:
													SCREAMING_SNAKE_CASE__     :Any						    = CamembertTokenizer(UpperCamelCase_      )
													tokenizer.save_pretrained(self.tmpdirname      )
													SCREAMING_SNAKE_CASE__     :Dict						    = CamembertTokenizerFast.from_pretrained(self.tmpdirname      )

													SCREAMING_SNAKE_CASE__     :Optional[int]						    = 'I was born in 92000, and this is falsé.'

													SCREAMING_SNAKE_CASE__     :List[str]						    = tokenizer.encode(UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :str						    = rust_tokenizer.encode(UpperCamelCase_      )
													self.assertListEqual(UpperCamelCase_							,							UpperCamelCase_      )

													SCREAMING_SNAKE_CASE__     :int						    = tokenizer.encode(UpperCamelCase_							,							add_special_tokens=UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :Dict						    = rust_tokenizer.encode(UpperCamelCase_							,							add_special_tokens=UpperCamelCase_      )
													self.assertListEqual(UpperCamelCase_							,							UpperCamelCase_      )

													# <unk> tokens are not the same for `rust` than for `slow`.
													# Because spm gives back raw token instead of `unk` in EncodeAsPieces
													# tokens = tokenizer.tokenize(sequence)
													SCREAMING_SNAKE_CASE__     :int						    = tokenizer.convert_ids_to_tokens(UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :Tuple						    = rust_tokenizer.tokenize(UpperCamelCase_      )
													self.assertListEqual(UpperCamelCase_							,							UpperCamelCase_      )




						def      __lowerCamelCase       (    self :       Optional[Any]      )     ->				List[str]:
													if not self.test_rust_tokenizer:
																				return

													SCREAMING_SNAKE_CASE__     :List[str]						    = self.get_tokenizer()
													SCREAMING_SNAKE_CASE__     :Dict						    = self.get_rust_tokenizer()

													SCREAMING_SNAKE_CASE__     :Optional[Any]						    = 'I was born in 92000, and this is falsé.'

													SCREAMING_SNAKE_CASE__     :Optional[int]						    = tokenizer.tokenize(UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :str						    = rust_tokenizer.tokenize(UpperCamelCase_      )
													self.assertListEqual(UpperCamelCase_							,							UpperCamelCase_      )

													SCREAMING_SNAKE_CASE__     :Optional[Any]						    = tokenizer.encode(UpperCamelCase_							,							add_special_tokens=UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :Optional[int]						    = rust_tokenizer.encode(UpperCamelCase_							,							add_special_tokens=UpperCamelCase_      )
													self.assertListEqual(UpperCamelCase_							,							UpperCamelCase_      )

													SCREAMING_SNAKE_CASE__     :str						    = self.get_rust_tokenizer()
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = tokenizer.encode(UpperCamelCase_      )
													SCREAMING_SNAKE_CASE__     :Optional[Any]						    = rust_tokenizer.encode(UpperCamelCase_      )
													self.assertListEqual(UpperCamelCase_							,							UpperCamelCase_      )




						@slow
						def      __lowerCamelCase       (    self :       Union[str, Any]      )     ->				Any:
													# fmt: off
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = {'input_ids': [[5, 54, 71_96, 2_97, 30, 23, 7_76, 18, 11, 32_15, 37_05, 82_52, 22, 31_64, 11_81, 21_16, 29, 16, 8_13, 25, 7_91, 33_14, 20, 34_46, 38, 2_75_75, 1_20, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [5, 4_68, 17, 11, 90_88, 20, 15_17, 8, 2_28_04, 1_88_18, 10, 38, 6_29, 6_07, 6_07, 1_42, 19, 71_96, 8_67, 56, 1_03_26, 24, 22_67, 20, 4_16, 50_72, 1_56_12, 2_33, 7_34, 7, 23_99, 27, 16, 30_15, 16_49, 7, 24, 20, 43_38, 23_99, 27, 13, 34_00, 14, 13, 61_89, 8, 9_30, 9, 6]], 'attention_mask': [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]}  # noqa: E501
													# fmt: on

													# camembert is a french model. So we also use french texts.
													SCREAMING_SNAKE_CASE__     :Union[str, Any]						    = [
													    'Le transformeur est un modèle d\'apprentissage profond introduit en 2017, '
													    'utilisé principalement dans le domaine du traitement automatique des langues (TAL).',
													    'À l\'instar des réseaux de neurones récurrents (RNN), les transformeurs sont conçus '
													    'pour gérer des données séquentielles, telles que le langage naturel, pour des tâches '
													    'telles que la traduction et la synthèse de texte.',
													]

													self.tokenizer_integration_test_util(
													    expected_encoding=UpperCamelCase_							,							model_name='camembert-base'							,							revision='3a0641d9a1aeb7e848a74299e7e4c4bca216b4cf'							,							sequences=UpperCamelCase_							,							)






