import random
import unittest

import numpy as np

import transformers
from transformers import is_flax_available, is_torch_available
from transformers.testing_utils import is_pt_flax_cross_test, require_flax


if is_flax_available():
       import os

       import jax.numpy as jnp
       from jax import jit

       from transformers import AutoTokenizer, FlaxAutoModelForCausalLM
       from transformers.modeling_flax_pytorch_utils import load_flax_weights_in_pytorch_model

       a_							=      """0.12"""  # assumed parallelism: 8


if is_torch_available():
       import torch




def       __lowerCAmelCase      (						A_   : List[Any]						,	A_   : List[str]						,	A_   : int=None					)    ->  Union[str, Any]:
  if rng is None:
    __UpperCAmelCase						    =       random.Random()

  __UpperCAmelCase						    =       1
  for dim in shape:
    total_dims *= dim

  __UpperCAmelCase						    =       []
  for _ in range(A_					):
    values.append(rng.randint(0						,	vocab_size - 1					)					)

  __UpperCAmelCase						    =       np.array(A_						,	dtype=jnp.intaa					).reshape(A_					)

  return output




def       __lowerCAmelCase      (						A_   : Optional[Any]						,	A_   : int=None					)    ->  Optional[Any]:
  __UpperCAmelCase						    =       ids_tensor(A_						,	vocab_size=2						,	rng=A_					)
  # make sure that at least one token is attended to for each batch
  __UpperCAmelCase						    =       1
  return attn_mask


@require_flax
class 			UpperCAmelCase__    :



  """simple docstring"""






  lowerCAmelCase__		:	List[Any]    		= None
  lowerCAmelCase__		:	int    		= ()






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




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase						    =       self.model_tester.prepare_config_and_inputs_for_common()

    # cut to half length & take max batch_size 3
    __UpperCAmelCase						    =       2
    __UpperCAmelCase						    =       inputs["input_ids"].shape[-1] // 2
    __UpperCAmelCase						    =       inputs["input_ids"][:max_batch_size, :sequence_length]

    __UpperCAmelCase						    =       jnp.ones_like(__lowerCAmelCase   )
    __UpperCAmelCase						    =       attention_mask[:max_batch_size, :sequence_length]

    # generate max 5 tokens
    __UpperCAmelCase						    =       input_ids.shape[-1] + 5
    if config.eos_token_id is not None and config.pad_token_id is None:
      # hack to allow generate for models such as GPT2 as is done in `generate()`
      __UpperCAmelCase						    =       config.eos_token_id
    return config, input_ids, attention_mask, max_length






  @is_pt_flax_cross_test
  def 	_UpperCAmelCase				(				self:			str   ) -> int:




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()
    __UpperCAmelCase						    =       False
    __UpperCAmelCase						    =       max_length
    __UpperCAmelCase						    =       0

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model_class.__name__[4:]  # Skip the "Flax" at the beginning
      __UpperCAmelCase						    =       getattr(__lowerCAmelCase				,				__lowerCAmelCase   )
      __UpperCAmelCase						    =       pt_model_class(__lowerCAmelCase   ).eval()
      __UpperCAmelCase						    =       load_flax_weights_in_pytorch_model(__lowerCAmelCase				,				flax_model.params   )

      __UpperCAmelCase						    =       flax_model.generate(__lowerCAmelCase   ).sequences
      __UpperCAmelCase						    =       pt_model.generate(torch.tensor(__lowerCAmelCase				,				dtype=torch.long   )   )

      if flax_generation_outputs.shape[-1] > pt_generation_outputs.shape[-1]:
        __UpperCAmelCase						    =       flax_generation_outputs[:, : pt_generation_outputs.shape[-1]]

      self.assertListEqual(pt_generation_outputs.numpy().tolist()				,				flax_generation_outputs.tolist()   )






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




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()
    __UpperCAmelCase						    =       False
    __UpperCAmelCase						    =       max_length

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[-1]				,				__lowerCAmelCase   )

      __UpperCAmelCase						    =       jit(model.generate   )
      __UpperCAmelCase						    =       jit_generate(__lowerCAmelCase   ).sequences

      self.assertListEqual(generation_outputs.tolist()				,				jit_generation_outputs.tolist()   )






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




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()
    __UpperCAmelCase						    =       True
    __UpperCAmelCase						    =       max_length

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[-1]				,				__lowerCAmelCase   )

      __UpperCAmelCase						    =       jit(model.generate   )
      __UpperCAmelCase						    =       jit_generate(__lowerCAmelCase   ).sequences

      self.assertListEqual(generation_outputs.tolist()				,				jit_generation_outputs.tolist()   )






  def 	_UpperCAmelCase				(				self:			int   ) -> List[Any]:




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()
    __UpperCAmelCase						    =       False
    __UpperCAmelCase						    =       max_length
    __UpperCAmelCase						    =       2

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[-1]				,				__lowerCAmelCase   )

      __UpperCAmelCase						    =       jit(model.generate   )
      __UpperCAmelCase						    =       jit_generate(__lowerCAmelCase   ).sequences

      self.assertListEqual(generation_outputs.tolist()				,				jit_generation_outputs.tolist()   )






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




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()
    __UpperCAmelCase						    =       False
    __UpperCAmelCase						    =       max_length
    __UpperCAmelCase						    =       2
    __UpperCAmelCase						    =       2

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[0]				,				input_ids.shape[0] * config.num_return_sequences   )






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




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()
    __UpperCAmelCase						    =       True
    __UpperCAmelCase						    =       max_length
    __UpperCAmelCase						    =       0.8
    __UpperCAmelCase						    =       10
    __UpperCAmelCase						    =       0.3
    __UpperCAmelCase						    =       1
    __UpperCAmelCase						    =       8
    __UpperCAmelCase						    =       9

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[-1]				,				__lowerCAmelCase   )

      __UpperCAmelCase						    =       jit(model.generate   )
      __UpperCAmelCase						    =       jit_generate(__lowerCAmelCase   ).sequences

      self.assertListEqual(generation_outputs.tolist()				,				jit_generation_outputs.tolist()   )






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




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()
    __UpperCAmelCase						    =       max_length
    __UpperCAmelCase						    =       1
    __UpperCAmelCase						    =       8
    __UpperCAmelCase						    =       9

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[-1]				,				__lowerCAmelCase   )

      __UpperCAmelCase						    =       jit(model.generate   )
      __UpperCAmelCase						    =       jit_generate(__lowerCAmelCase   ).sequences

      self.assertListEqual(generation_outputs.tolist()				,				jit_generation_outputs.tolist()   )






  def 	_UpperCAmelCase				(				self:			Tuple   ) -> str:




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()
    __UpperCAmelCase						    =       max_length
    __UpperCAmelCase						    =       2
    __UpperCAmelCase						    =       1
    __UpperCAmelCase						    =       8
    __UpperCAmelCase						    =       9

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[-1]				,				__lowerCAmelCase   )

      __UpperCAmelCase						    =       jit(model.generate   )
      __UpperCAmelCase						    =       jit_generate(__lowerCAmelCase   ).sequences

      self.assertListEqual(generation_outputs.tolist()				,				jit_generation_outputs.tolist()   )






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




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()

    # pad attention mask on the left
    __UpperCAmelCase						    =       attention_mask.at[(0, 0)].set(0   )

    __UpperCAmelCase						    =       False
    __UpperCAmelCase						    =       max_length

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase				,				attention_mask=__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[-1]				,				__lowerCAmelCase   )

      __UpperCAmelCase						    =       jit(model.generate   )
      __UpperCAmelCase						    =       jit_generate(__lowerCAmelCase				,				attention_mask=__lowerCAmelCase   ).sequences

      self.assertListEqual(generation_outputs.tolist()				,				jit_generation_outputs.tolist()   )






  def 	_UpperCAmelCase				(				self:			str   ) -> Any:




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()

    # pad attention mask on the left
    __UpperCAmelCase						    =       attention_mask.at[(0, 0)].set(0   )

    __UpperCAmelCase						    =       True
    __UpperCAmelCase						    =       max_length

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase				,				attention_mask=__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[-1]				,				__lowerCAmelCase   )

      __UpperCAmelCase						    =       jit(model.generate   )
      __UpperCAmelCase						    =       jit_generate(__lowerCAmelCase				,				attention_mask=__lowerCAmelCase   ).sequences

      self.assertListEqual(generation_outputs.tolist()				,				jit_generation_outputs.tolist()   )






  def 	_UpperCAmelCase				(				self:			Optional[int]   ) -> Tuple:




    '''simple docstring'''




    __UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase    ,		__UpperCAmelCase						    =       self._get_input_ids_and_config()

    # pad attention mask on the left
    __UpperCAmelCase						    =       attention_mask.at[(0, 0)].set(0   )

    __UpperCAmelCase						    =       2
    __UpperCAmelCase						    =       max_length

    for model_class in self.all_generative_model_classes:
      __UpperCAmelCase						    =       model_class(__lowerCAmelCase   )

      __UpperCAmelCase						    =       model.generate(__lowerCAmelCase				,				attention_mask=__lowerCAmelCase   ).sequences
      self.assertEqual(generation_outputs.shape[-1]				,				__lowerCAmelCase   )

      __UpperCAmelCase						    =       jit(model.generate   )
      __UpperCAmelCase						    =       jit_generate(__lowerCAmelCase				,				attention_mask=__lowerCAmelCase   ).sequences

      self.assertListEqual(generation_outputs.tolist()				,				jit_generation_outputs.tolist()   )






@require_flax
class 			UpperCAmelCase__    (		unittest.TestCase					):



  """simple docstring"""






  def 	_UpperCAmelCase				(				self:			str   ) -> Any:




    '''simple docstring'''




    __UpperCAmelCase						    =       AutoTokenizer.from_pretrained("hf-internal-testing/tiny-bert"   )
    __UpperCAmelCase						    =       FlaxAutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-bert-flax-only"   )

    __UpperCAmelCase						    =       "Hello world"
    __UpperCAmelCase						    =       tokenizer(__lowerCAmelCase				,				return_tensors="np"   ).input_ids

    # typos are quickly detected (the correct argument is `do_sample`)
    with self.assertRaisesRegex(__lowerCAmelCase				,				"do_samples"   ):
      model.generate(__lowerCAmelCase				,				do_samples=__lowerCAmelCase   )

    # arbitrary arguments that will not be used anywhere are also not accepted
    with self.assertRaisesRegex(__lowerCAmelCase				,				"foo"   ):
      __UpperCAmelCase						    =       {"foo": "bar"}
      model.generate(__lowerCAmelCase				,				**__lowerCAmelCase   )




import unittest

from transformers import AlbertTokenizer, AlbertTokenizerFast
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin


a_							=      get_tests_dir("""fixtures/spiece.model""")


@require_sentencepiece
@require_tokenizers
class 			UpperCAmelCase__    (		snake_case		,	unittest.TestCase					):



  """simple docstring"""






  lowerCAmelCase__		:	List[Any]    		= AlbertTokenizer
  lowerCAmelCase__		:	int    		= AlbertTokenizerFast
  lowerCAmelCase__		:	str    		= True
  lowerCAmelCase__		:	Union[str, Any]    		= True
  lowerCAmelCase__		:	int    		= True






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




    '''simple docstring'''




    super().setUp()

    # We have a SentencePiece fixture for testing
    __UpperCAmelCase						    =       AlbertTokenizer(__lowerCAmelCase   )
    tokenizer.save_pretrained(self.tmpdirname   )






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




    '''simple docstring'''




    __UpperCAmelCase						    =       "this is a test"
    __UpperCAmelCase						    =       "this is a test"
    return input_text, output_text






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




    '''simple docstring'''




    __UpperCAmelCase						    =       "<pad>"
    __UpperCAmelCase						    =       0

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






  def 	_UpperCAmelCase				(				self:			str   ) -> Optional[Any]:




    '''simple docstring'''




    __UpperCAmelCase						    =       list(self.get_tokenizer().get_vocab().keys()   )

    self.assertEqual(vocab_keys[0]				,				"<pad>"   )
    self.assertEqual(vocab_keys[1]				,				"<unk>"   )
    self.assertEqual(vocab_keys[-1]				,				"▁eloquent"   )
    self.assertEqual(len(__lowerCAmelCase   )				,				30_000   )






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




    '''simple docstring'''




    self.assertEqual(self.get_tokenizer().vocab_size				,				30_000   )






  def 	_UpperCAmelCase				(				self:			str   ) -> int:




    '''simple docstring'''




    if not self.test_rust_tokenizer:
      return

    __UpperCAmelCase						    =       self.get_tokenizer()
    __UpperCAmelCase						    =       self.get_rust_tokenizer()

    __UpperCAmelCase						    =       "I was born in 92000, and this is falsé."

    __UpperCAmelCase						    =       tokenizer.tokenize(__lowerCAmelCase   )
    __UpperCAmelCase						    =       rust_tokenizer.tokenize(__lowerCAmelCase   )
    self.assertListEqual(__lowerCAmelCase				,				__lowerCAmelCase   )

    __UpperCAmelCase						    =       tokenizer.encode(__lowerCAmelCase				,				add_special_tokens=__lowerCAmelCase   )
    __UpperCAmelCase						    =       rust_tokenizer.encode(__lowerCAmelCase				,				add_special_tokens=__lowerCAmelCase   )
    self.assertListEqual(__lowerCAmelCase				,				__lowerCAmelCase   )

    __UpperCAmelCase						    =       self.get_rust_tokenizer()
    __UpperCAmelCase						    =       tokenizer.encode(__lowerCAmelCase   )
    __UpperCAmelCase						    =       rust_tokenizer.encode(__lowerCAmelCase   )
    self.assertListEqual(__lowerCAmelCase				,				__lowerCAmelCase   )






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




    '''simple docstring'''




    __UpperCAmelCase						    =       AlbertTokenizer(__lowerCAmelCase				,				keep_accents=__lowerCAmelCase   )

    __UpperCAmelCase						    =       tokenizer.tokenize("This is a test"   )
    self.assertListEqual(__lowerCAmelCase				,				["▁this", "▁is", "▁a", "▁test"]   )

    self.assertListEqual(tokenizer.convert_tokens_to_ids(__lowerCAmelCase   )				,				[48, 25, 21, 1_289]   )

    __UpperCAmelCase						    =       tokenizer.tokenize("I was born in 92000, and this is falsé."   )
    self.assertListEqual(
        __lowerCAmelCase				,				["▁i", "▁was", "▁born", "▁in", "▁9", "2000", ",", "▁and", "▁this", "▁is", "▁fal", "s", "é", "."]   )
    __UpperCAmelCase						    =       tokenizer.convert_tokens_to_ids(__lowerCAmelCase   )
    self.assertListEqual(__lowerCAmelCase				,				[31, 23, 386, 19, 561, 3_050, 15, 17, 48, 25, 8_256, 18, 1, 9]   )

    __UpperCAmelCase						    =       tokenizer.convert_ids_to_tokens(__lowerCAmelCase   )
    self.assertListEqual(
        __lowerCAmelCase				,				["▁i", "▁was", "▁born", "▁in", "▁9", "2000", ",", "▁and", "▁this", "▁is", "▁fal", "s", "<unk>", "."]				,				)






  def 	_UpperCAmelCase				(				self:			str   ) -> Dict:




    '''simple docstring'''




    __UpperCAmelCase						    =       AlbertTokenizer(__lowerCAmelCase   )

    __UpperCAmelCase						    =       tokenizer.encode("sequence builders"   )
    __UpperCAmelCase						    =       tokenizer.encode("multi-sequence build"   )

    __UpperCAmelCase						    =       tokenizer.build_inputs_with_special_tokens(__lowerCAmelCase   )
    __UpperCAmelCase						    =       tokenizer.build_inputs_with_special_tokens(__lowerCAmelCase				,				__lowerCAmelCase   )

    assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]
    assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [
        tokenizer.sep_token_id
    ]






  @slow
  def 	_UpperCAmelCase				(				self:			Optional[int]   ) -> str:




    '''simple docstring'''




    __UpperCAmelCase						    =       {"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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "input_ids": [[2, 21_970, 13, 5, 6_092, 167, 28, 7_103, 2_153, 673, 8, 7_028, 12_051, 18, 17, 7_103, 2_153, 673, 8, 3_515, 18_684, 8, 4_461, 6, 1_927, 297, 8, 12_060, 2_607, 18, 13, 5, 4_461, 15, 10_538, 38, 8, 135, 15, 822, 58, 15, 993, 10_363, 15, 1_460, 8_005, 4_461, 15, 993, 255, 2_328, 9, 9, 9, 6, 26, 1_112, 816, 3_260, 13, 5, 103, 2_377, 6, 17, 1_112, 816, 2_782, 13, 5, 103, 10_641, 6, 29, 84, 2_512, 2_430, 782, 18_684, 2_761, 19, 808, 2_430, 2_556, 17, 855, 1_480, 9_477, 4_091, 128, 11_712, 15, 7_103, 2_153, 673, 17, 24_883, 9_990, 9, 3], [2, 11_502, 25, 1_006, 20, 782, 8, 11_809, 855, 1_732, 19_393, 18_667, 37, 367, 21_018, 69, 1_854, 34, 11_860, 19_124, 27, 156, 225, 17, 193, 4_141, 19, 65, 9_124, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 14, 2_231, 886, 2_385, 17_659, 84, 14, 16_792, 1_952, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], "token_type_ids": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]}  # noqa: E501
    # fmt: on

    self.tokenizer_integration_test_util(
        expected_encoding=__lowerCAmelCase				,				model_name="albert-base-v2"				,				revision="6b6560eaf5ff2e250b00c50f380c5389a9c2d82e"				,				)



