


'''simple docstring'''
import tempfile
import unittest

import numpy as np

import transformers
from transformers import GPTaTokenizer, GPTJConfig, is_flax_available, is_torch_available
from transformers.testing_utils import is_pt_flax_cross_test, require_flax, tooslow

from ...generation.test_flax_utils import FlaxGenerationTesterMixin
from ...test_modeling_flax_common import FlaxModelTesterMixin, ids_tensor, random_attention_mask


if is_flax_available():
		import jax
		import jax.numpy as jnp

		from transformers.modeling_flax_pytorch_utils import (
		    convert_pytorch_state_dict_to_flax,
		    load_flax_weights_in_pytorch_model,
		)
		from transformers.models.gptj.modeling_flax_gptj import FlaxGPTJForCausalLM, FlaxGPTJModel

if is_torch_available():
		import torch
class   lowercase      :

		"""simple docstring"""

		def __init__(						self       ,  UpperCamelCase_       ,  UpperCamelCase_=14       ,  UpperCamelCase_=7       ,  UpperCamelCase_=True       ,  UpperCamelCase_=True       ,  UpperCamelCase_=False       ,  UpperCamelCase_=True       ,  UpperCamelCase_=99       ,  UpperCamelCase_=32       ,  UpperCamelCase_=4       ,  UpperCamelCase_=4       ,  UpperCamelCase_=4       ,  UpperCamelCase_=37       ,  UpperCamelCase_="gelu"       ,  UpperCamelCase_=0.1       ,  UpperCamelCase_=0.1       ,  UpperCamelCase_=512       ,  UpperCamelCase_=0.02       ,  ):

							'''simple docstring'''


							UpperCamelCase__  :Any				   =					parent
							UpperCamelCase__  :Tuple				   =					batch_size
							UpperCamelCase__  :int				   =					seq_length
							UpperCamelCase__  :Any				   =					is_training
							UpperCamelCase__  :Dict				   =					use_input_mask
							UpperCamelCase__  :int				   =					use_token_type_ids
							UpperCamelCase__  :Union[str, Any]				   =					use_labels
							UpperCamelCase__  :Union[str, Any]				   =					vocab_size
							UpperCamelCase__  :Optional[Any]				   =					hidden_size
							UpperCamelCase__  :Optional[Any]				   =					rotary_dim
							UpperCamelCase__  :Optional[int]				   =					num_hidden_layers
							UpperCamelCase__  :Tuple				   =					num_attention_heads
							UpperCamelCase__  :Any				   =					intermediate_size
							UpperCamelCase__  :Any				   =					hidden_act
							UpperCamelCase__  :List[Any]				   =					hidden_dropout_prob
							UpperCamelCase__  :str				   =					attention_probs_dropout_prob
							UpperCamelCase__  :str				   =					max_position_embeddings
							UpperCamelCase__  :Tuple				   =					initializer_range
							UpperCamelCase__  :List[Any]				   =					None
							UpperCamelCase__  :List[Any]				   =					vocab_size - 1
							UpperCamelCase__  :List[str]				   =					vocab_size - 1
							UpperCamelCase__  :Dict				   =					vocab_size - 1




		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


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

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

							UpperCamelCase__  :Tuple				   =					GPTJConfig(
							    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       ,  use_cache=UpperCamelCase_       ,  bos_token_id=self.bos_token_id       ,  eos_token_id=self.eos_token_id       ,  pad_token_id=self.pad_token_id       ,  rotary_dim=self.rotary_dim       ,  )

							return (config, input_ids, input_mask)




		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							UpperCamelCase__  :List[Any]				   =					self.prepare_config_and_inputs()
							UpperCamelCase__   ,							UpperCamelCase__   ,							UpperCamelCase__  :Optional[Any]				   =					config_and_inputs
							UpperCamelCase__  :Optional[Any]				   =					{'''input_ids''': input_ids, '''attention_mask''': attention_mask}
							return config, inputs_dict




		def        lowerCAmelCase__							(						self       ,  UpperCamelCase_       ,  UpperCamelCase_       ,  UpperCamelCase_       ,  UpperCamelCase_				):

							'''simple docstring'''


							UpperCamelCase__  :Optional[Any]				   =					20
							UpperCamelCase__  :List[Any]				   =					model_class_name(UpperCamelCase_				)

							UpperCamelCase__  :List[str]				   =					model.init_cache(input_ids.shape[0]       ,  UpperCamelCase_				)
							UpperCamelCase__  :int				   =					jnp.ones((input_ids.shape[0], max_decoder_length)       ,  dtype='''i4'''				)

							UpperCamelCase__  :Union[str, Any]				   =					jnp.broadcast_to(
							    jnp.arange(input_ids.shape[-1] - 1				)[None, :]       ,  (input_ids.shape[0], input_ids.shape[-1] - 1)				)
							UpperCamelCase__  :Union[str, Any]				   =					model(
							    input_ids[:, :-1]       ,  attention_mask=UpperCamelCase_       ,  past_key_values=UpperCamelCase_       ,  position_ids=UpperCamelCase_       ,  )

							UpperCamelCase__  :List[str]				   =					jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]       ,  dtype='''i4'''				)
							UpperCamelCase__  :int				   =					model(
							    input_ids[:, -1:]       ,  attention_mask=UpperCamelCase_       ,  past_key_values=outputs_cache.past_key_values       ,  position_ids=UpperCamelCase_       ,  )

							UpperCamelCase__  :Any				   =					model(UpperCamelCase_				)

							UpperCamelCase__  :Dict				   =					np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])				)				)
							self.parent.assertTrue(diff < 1e-3       ,  msg=F'''Max diff is {diff}'''				)




		def        lowerCAmelCase__							(						self       ,  UpperCamelCase_       ,  UpperCamelCase_       ,  UpperCamelCase_       ,  UpperCamelCase_				):

							'''simple docstring'''


							UpperCamelCase__  :Union[str, Any]				   =					20
							UpperCamelCase__  :int				   =					model_class_name(UpperCamelCase_				)

							UpperCamelCase__  :int				   =					jnp.concatenate(
							    [attention_mask, jnp.zeros((attention_mask.shape[0], max_decoder_length - attention_mask.shape[1])				)]       ,  axis=-1       ,  )

							UpperCamelCase__  :Tuple				   =					model.init_cache(input_ids.shape[0]       ,  UpperCamelCase_				)
							UpperCamelCase__  :Optional[Any]				   =					jnp.broadcast_to(
							    jnp.arange(input_ids.shape[-1] - 1				)[None, :]       ,  (input_ids.shape[0], input_ids.shape[-1] - 1)				)

							UpperCamelCase__  :Optional[Any]				   =					model(
							    input_ids[:, :-1]       ,  attention_mask=UpperCamelCase_       ,  past_key_values=UpperCamelCase_       ,  position_ids=UpperCamelCase_       ,  )
							UpperCamelCase__  :List[Any]				   =					jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]       ,  dtype='''i4'''				)
							UpperCamelCase__  :Union[str, Any]				   =					model(
							    input_ids[:, -1:]       ,  past_key_values=outputs_cache.past_key_values       ,  attention_mask=UpperCamelCase_       ,  position_ids=UpperCamelCase_       ,  )

							UpperCamelCase__  :Dict				   =					model(UpperCamelCase_       ,  attention_mask=UpperCamelCase_				)

							UpperCamelCase__  :Tuple				   =					np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])				)				)
							self.parent.assertTrue(diff < 1e-3       ,  msg=F'''Max diff is {diff}'''				)



@require_flax
class   lowercase      (				A__      ,						A__      ,						unittest.TestCase   ):

		"""simple docstring"""

		_a       					=							(FlaxGPTJModel, FlaxGPTJForCausalLM) if is_flax_available() else ()
		_a       					=							(FlaxGPTJForCausalLM,) if is_flax_available() else ()




		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							UpperCamelCase__  :Optional[int]				   =					FlaxGPTJModelTester(self				)




		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							for model_class_name in self.all_model_classes:
												UpperCamelCase__   ,							UpperCamelCase__   ,							UpperCamelCase__  :List[Any]				   =					self.model_tester.prepare_config_and_inputs()
												self.model_tester.check_use_cache_forward(UpperCamelCase_       ,  UpperCamelCase_       ,  UpperCamelCase_       ,  UpperCamelCase_				)




		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							for model_class_name in self.all_model_classes:
												UpperCamelCase__   ,							UpperCamelCase__   ,							UpperCamelCase__  :Dict				   =					self.model_tester.prepare_config_and_inputs()
												self.model_tester.check_use_cache_forward_with_attn_mask(
												    UpperCamelCase_       ,  UpperCamelCase_       ,  UpperCamelCase_       ,  UpperCamelCase_				)




		@tooslow
		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							UpperCamelCase__  :List[str]				   =					GPTaTokenizer.from_pretrained('''gpt2'''       ,  pad_token='''<|endoftext|>'''       ,  padding_side='''left'''				)
							UpperCamelCase__  :str				   =					tokenizer(['''Hello this is a long string''', '''Hey''']       ,  return_tensors='''np'''       ,  padding=UpperCamelCase_       ,  truncation=UpperCamelCase_				)

							UpperCamelCase__  :Tuple				   =					FlaxGPTJForCausalLM.from_pretrained('''EleutherAI/gpt-j-6B'''				)
							UpperCamelCase__  :Dict				   =					False
							UpperCamelCase__  :List[Any]				   =					model.config.eos_token_id

							UpperCamelCase__  :str				   =					jax.jit(model.generate				)

							UpperCamelCase__  :List[Any]				   =					jit_generate(
							    inputs['''input_ids''']       ,  attention_mask=inputs['''attention_mask''']       ,  pad_token_id=tokenizer.pad_token_id				).sequences

							UpperCamelCase__  :Any				   =					tokenizer.batch_decode(UpperCamelCase_       ,  skip_special_tokens=UpperCamelCase_				)

							UpperCamelCase__  :Optional[Any]				   =					[
							    '''Hello this is a long string of text.\n\nI\'m trying to get the text of the''',
							    '''Hey, I\'m a little late to the party. I\'m going to''',
							]

							self.assertListEqual(UpperCamelCase_       ,  UpperCamelCase_				)




		@is_pt_flax_cross_test
		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							UpperCamelCase__   ,							UpperCamelCase__  :List[Any]				   =					self.model_tester.prepare_config_and_inputs_for_common()

							for model_class in self.all_model_classes:
												with self.subTest(model_class.__name__				):
																	# prepare inputs
																	UpperCamelCase__  :Union[str, Any]				   =					self._prepare_for_class(UpperCamelCase_       ,  UpperCamelCase_				)
																	UpperCamelCase__  :Optional[Any]				   =					{k: torch.tensor(v.tolist()				) for k, v in prepared_inputs_dict.items()}

																	# load corresponding PyTorch class
																	UpperCamelCase__  :Optional[int]				   =					model_class.__name__[4:]  # Skip the "Flax" at the beginning
																	UpperCamelCase__  :Optional[int]				   =					getattr(UpperCamelCase_       ,  UpperCamelCase_				)

																	UpperCamelCase__   ,							UpperCamelCase__  :Union[str, Any]				   =					pt_inputs['''input_ids'''].shape
																	UpperCamelCase__  :Dict				   =					np.random.randint(0       ,  seq_length - 1       ,  size=(batch_size,)				)
																	for batch_idx, start_index in enumerate(UpperCamelCase_				):
																						UpperCamelCase__  :int				   =					0
																						UpperCamelCase__  :Union[str, Any]				   =					1
																						UpperCamelCase__  :Tuple				   =					0
																						UpperCamelCase__  :List[str]				   =					1
																	UpperCamelCase__  :Optional[int]				   =					pt_model_class(UpperCamelCase_				).eval()
																	UpperCamelCase__  :Optional[int]				   =					model_class(UpperCamelCase_       ,  dtype=jnp.floataa				)

																	UpperCamelCase__  :List[Any]				   =					convert_pytorch_state_dict_to_flax(pt_model.state_dict()       ,  UpperCamelCase_				)
																	UpperCamelCase__  :List[str]				   =					fx_state

																	with torch.no_grad():
																						UpperCamelCase__  :Dict				   =					pt_model(**UpperCamelCase_				).to_tuple()

																	UpperCamelCase__  :Optional[int]				   =					fx_model(**UpperCamelCase_				).to_tuple()
																	self.assertEqual(len(UpperCamelCase_				)       ,  len(UpperCamelCase_				)       ,  '''Output lengths differ between Flax and PyTorch'''				)
																	for fx_output, pt_output in zip(UpperCamelCase_       ,  UpperCamelCase_				):
																						self.assert_almost_equals(fx_output[:, -1]       ,  pt_output[:, -1].numpy()       ,  4e-2				)

																	with tempfile.TemporaryDirectory() as tmpdirname:
																						pt_model.save_pretrained(UpperCamelCase_				)
																						UpperCamelCase__  :List[str]				   =					model_class.from_pretrained(UpperCamelCase_       ,  from_pt=UpperCamelCase_				)

																	UpperCamelCase__  :str				   =					fx_model_loaded(**UpperCamelCase_				).to_tuple()
																	self.assertEqual(
																	    len(UpperCamelCase_				)       ,  len(UpperCamelCase_				)       ,  '''Output lengths differ between Flax and PyTorch'''				)
																	for fx_output_loaded, pt_output in zip(UpperCamelCase_       ,  UpperCamelCase_				):
																						self.assert_almost_equals(fx_output_loaded[:, -1]       ,  pt_output[:, -1].numpy()       ,  4e-2				)




		@is_pt_flax_cross_test
		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							UpperCamelCase__   ,							UpperCamelCase__  :List[Any]				   =					self.model_tester.prepare_config_and_inputs_for_common()
							for model_class in self.all_model_classes:
												with self.subTest(model_class.__name__				):
																	# prepare inputs
																	UpperCamelCase__  :Any				   =					self._prepare_for_class(UpperCamelCase_       ,  UpperCamelCase_				)
																	UpperCamelCase__  :Any				   =					{k: torch.tensor(v.tolist()				) for k, v in prepared_inputs_dict.items()}

																	# load corresponding PyTorch class
																	UpperCamelCase__  :int				   =					model_class.__name__[4:]  # Skip the "Flax" at the beginning
																	UpperCamelCase__  :Optional[int]				   =					getattr(UpperCamelCase_       ,  UpperCamelCase_				)

																	UpperCamelCase__  :Tuple				   =					pt_model_class(UpperCamelCase_				).eval()
																	UpperCamelCase__  :Tuple				   =					model_class(UpperCamelCase_       ,  dtype=jnp.floataa				)

																	UpperCamelCase__  :Optional[int]				   =					load_flax_weights_in_pytorch_model(UpperCamelCase_       ,  fx_model.params				)
																	UpperCamelCase__   ,							UpperCamelCase__  :Union[str, Any]				   =					pt_inputs['''input_ids'''].shape
																	UpperCamelCase__  :int				   =					np.random.randint(0       ,  seq_length - 1       ,  size=(batch_size,)				)
																	for batch_idx, start_index in enumerate(UpperCamelCase_				):
																						UpperCamelCase__  :List[Any]				   =					0
																						UpperCamelCase__  :Optional[Any]				   =					1
																						UpperCamelCase__  :Optional[int]				   =					0
																						UpperCamelCase__  :Any				   =					1

																	# make sure weights are tied in PyTorch
																	pt_model.tie_weights()

																	with torch.no_grad():
																						UpperCamelCase__  :Dict				   =					pt_model(**UpperCamelCase_				).to_tuple()

																	UpperCamelCase__  :Optional[Any]				   =					fx_model(**UpperCamelCase_				).to_tuple()
																	self.assertEqual(len(UpperCamelCase_				)       ,  len(UpperCamelCase_				)       ,  '''Output lengths differ between Flax and PyTorch'''				)
																	for fx_output, pt_output in zip(UpperCamelCase_       ,  UpperCamelCase_				):
																						self.assert_almost_equals(fx_output[:, -1]       ,  pt_output[:, -1].numpy()       ,  4e-2				)

																	with tempfile.TemporaryDirectory() as tmpdirname:
																						fx_model.save_pretrained(UpperCamelCase_				)
																						UpperCamelCase__  :Any				   =					pt_model_class.from_pretrained(UpperCamelCase_       ,  from_flax=UpperCamelCase_				)

																	with torch.no_grad():
																						UpperCamelCase__  :Dict				   =					pt_model_loaded(**UpperCamelCase_				).to_tuple()

																	self.assertEqual(
																	    len(UpperCamelCase_				)       ,  len(UpperCamelCase_				)       ,  '''Output lengths differ between Flax and PyTorch'''				)
																	for fx_output, pt_output in zip(UpperCamelCase_       ,  UpperCamelCase_				):
																						self.assert_almost_equals(fx_output[:, -1]       ,  pt_output[:, -1].numpy()       ,  4e-2				)




		@tooslow
		def        lowerCAmelCase__							(						self				):

							'''simple docstring'''


							for model_class_name in self.all_model_classes:
												UpperCamelCase__  :Dict				   =					model_class_name.from_pretrained('''EleutherAI/gpt-j-6B'''				)
												UpperCamelCase__  :Optional[Any]				   =					model(np.ones((1, 1)				)				)
												self.assertIsNotNone(UpperCamelCase_				)



'''simple docstring'''
import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from .tokenization_electra import ElectraTokenizer


__snake_case				 =	{'''vocab_file''': '''vocab.txt''', '''tokenizer_file''': '''tokenizer.json'''}

__snake_case				 =	{
    '''vocab_file''': {
        '''google/electra-small-generator''': (
            '''https://huggingface.co/google/electra-small-generator/resolve/main/vocab.txt'''
        ),
        '''google/electra-base-generator''': '''https://huggingface.co/google/electra-base-generator/resolve/main/vocab.txt''',
        '''google/electra-large-generator''': (
            '''https://huggingface.co/google/electra-large-generator/resolve/main/vocab.txt'''
        ),
        '''google/electra-small-discriminator''': (
            '''https://huggingface.co/google/electra-small-discriminator/resolve/main/vocab.txt'''
        ),
        '''google/electra-base-discriminator''': (
            '''https://huggingface.co/google/electra-base-discriminator/resolve/main/vocab.txt'''
        ),
        '''google/electra-large-discriminator''': (
            '''https://huggingface.co/google/electra-large-discriminator/resolve/main/vocab.txt'''
        ),
    },
    '''tokenizer_file''': {
        '''google/electra-small-generator''': (
            '''https://huggingface.co/google/electra-small-generator/resolve/main/tokenizer.json'''
        ),
        '''google/electra-base-generator''': (
            '''https://huggingface.co/google/electra-base-generator/resolve/main/tokenizer.json'''
        ),
        '''google/electra-large-generator''': (
            '''https://huggingface.co/google/electra-large-generator/resolve/main/tokenizer.json'''
        ),
        '''google/electra-small-discriminator''': (
            '''https://huggingface.co/google/electra-small-discriminator/resolve/main/tokenizer.json'''
        ),
        '''google/electra-base-discriminator''': (
            '''https://huggingface.co/google/electra-base-discriminator/resolve/main/tokenizer.json'''
        ),
        '''google/electra-large-discriminator''': (
            '''https://huggingface.co/google/electra-large-discriminator/resolve/main/tokenizer.json'''
        ),
    },
}

__snake_case				 =	{
    '''google/electra-small-generator''': 512,
    '''google/electra-base-generator''': 512,
    '''google/electra-large-generator''': 512,
    '''google/electra-small-discriminator''': 512,
    '''google/electra-base-discriminator''': 512,
    '''google/electra-large-discriminator''': 512,
}

__snake_case				 =	{
    '''google/electra-small-generator''': {'''do_lower_case''': True},
    '''google/electra-base-generator''': {'''do_lower_case''': True},
    '''google/electra-large-generator''': {'''do_lower_case''': True},
    '''google/electra-small-discriminator''': {'''do_lower_case''': True},
    '''google/electra-base-discriminator''': {'''do_lower_case''': True},
    '''google/electra-large-discriminator''': {'''do_lower_case''': True},
}
class   lowercase      (				A__   ):

		"""simple docstring"""

		_a       					=							VOCAB_FILES_NAMES
		_a       					=							PRETRAINED_VOCAB_FILES_MAP
		_a       					=							PRETRAINED_INIT_CONFIGURATION
		_a       					=							PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
		_a       					=							ElectraTokenizer




		def __init__(						self       ,  UpperCamelCase_=None       ,  UpperCamelCase_=None       ,  UpperCamelCase_=True       ,  UpperCamelCase_="[UNK]"       ,  UpperCamelCase_="[SEP]"       ,  UpperCamelCase_="[PAD]"       ,  UpperCamelCase_="[CLS]"       ,  UpperCamelCase_="[MASK]"       ,  UpperCamelCase_=True       ,  UpperCamelCase_=None       ,  **UpperCamelCase_       ,  ):

							'''simple docstring'''


							super().__init__(
							    UpperCamelCase_       ,  tokenizer_file=UpperCamelCase_       ,  do_lower_case=UpperCamelCase_       ,  unk_token=UpperCamelCase_       ,  sep_token=UpperCamelCase_       ,  pad_token=UpperCamelCase_       ,  cls_token=UpperCamelCase_       ,  mask_token=UpperCamelCase_       ,  tokenize_chinese_chars=UpperCamelCase_       ,  strip_accents=UpperCamelCase_       ,  **UpperCamelCase_       ,  )

							UpperCamelCase__  :str				   =					json.loads(self.backend_tokenizer.normalizer.__getstate__()				)
							if (
							    normalizer_state.get('''lowercase'''       ,  UpperCamelCase_				) != do_lower_case
							    or normalizer_state.get('''strip_accents'''       ,  UpperCamelCase_				) != strip_accents
							    or normalizer_state.get('''handle_chinese_chars'''       ,  UpperCamelCase_				) != tokenize_chinese_chars
							):
												UpperCamelCase__  :Any				   =					getattr(UpperCamelCase_       ,  normalizer_state.pop('''type'''				)				)
												UpperCamelCase__  :Any				   =					do_lower_case
												UpperCamelCase__  :Dict				   =					strip_accents
												UpperCamelCase__  :Optional[int]				   =					tokenize_chinese_chars
												UpperCamelCase__  :Dict				   =					normalizer_class(**UpperCamelCase_				)

							UpperCamelCase__  :str				   =					do_lower_case




		def        lowerCAmelCase__							(						self       ,  UpperCamelCase_       ,  UpperCamelCase_=None				):

							'''simple docstring'''


							UpperCamelCase__  :Dict				   =					[self.cls_token_id] + token_ids_a + [self.sep_token_id]

							if token_ids_a:
												output += token_ids_a + [self.sep_token_id]

							return output




		def        lowerCAmelCase__							(						self       ,  UpperCamelCase_       ,  UpperCamelCase_ = None				):

							'''simple docstring'''


							UpperCamelCase__  :Union[str, Any]				   =					[self.sep_token_id]
							UpperCamelCase__  :str				   =					[self.cls_token_id]
							if token_ids_a is None:
												return len(cls + token_ids_a + sep				) * [0]
							return len(cls + token_ids_a + sep				) * [0] + len(token_ids_a + sep				) * [1]




		def        lowerCAmelCase__							(						self       ,  UpperCamelCase_       ,  UpperCamelCase_ = None				):

							'''simple docstring'''


							UpperCamelCase__  :str				   =					self._tokenizer.model.save(UpperCamelCase_       ,  name=UpperCamelCase_				)
							return tuple(UpperCamelCase_				)