



"""simple docstring"""







import os
import unicodedata
from shutil import copyfile
from typing import Any, Dict, List, Optional, Tuple

import sentencepiece as spm

from ...tokenization_utils import AddedToken, PreTrainedTokenizer
from ...utils import SPIECE_UNDERLINE, logging


lowerCAmelCase_   						=   logging.get_logger(__name__)

lowerCAmelCase_   						=   {"""vocab_file""": """spiece.model"""}

lowerCAmelCase_   						=   {
    """vocab_file""": {
        """xlnet-base-cased""": """https://huggingface.co/xlnet-base-cased/resolve/main/spiece.model""",
        """xlnet-large-cased""": """https://huggingface.co/xlnet-large-cased/resolve/main/spiece.model""",
    }
}

lowerCAmelCase_   						=   {
    """xlnet-base-cased""": None,
    """xlnet-large-cased""": None,
}

# Segments (not really needed)
lowerCAmelCase_   						=   0
lowerCAmelCase_   						=   1
lowerCAmelCase_   						=   2
lowerCAmelCase_   						=   3
lowerCAmelCase_   						=   4
class        __A       (	UpperCAmelCase__    ):







		'''simple docstring'''





		lowerCAmelCase			:					Optional[Any]   	=				VOCAB_FILES_NAMES
		lowerCAmelCase			:					Dict   	=				PRETRAINED_VOCAB_FILES_MAP
		lowerCAmelCase			:					Optional[Any]   	=				PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
		lowerCAmelCase			:					Dict   	=				"""left"""







		def __init__(	self						:  Any			,_snake_case						:  Optional[Any]			,_snake_case						:  Any=False			,_snake_case						:  Optional[int]=True			,_snake_case						:  int=False			,_snake_case						:  str="<s>"			,_snake_case						:  int="</s>"			,_snake_case						:  List[str]="<unk>"			,_snake_case						:  Dict="<sep>"			,_snake_case						:  int="<pad>"			,_snake_case						:  Optional[int]="<cls>"			,_snake_case						:  Optional[int]="<mask>"			,_snake_case						:  List[Any]=["<eop>", "<eod>"]			,_snake_case						:  str = None			,**_snake_case						:  int			,)					->		None:






				"""simple docstring"""



				lowercase__   :    str				=			AddedToken(__lowercase			,lstrip=__lowercase			,rstrip=__lowercase						) if isinstance(__lowercase			,__lowercase						) else mask_token

				lowercase__   :    Union[str, Any]				=			{} if sp_model_kwargs is None else sp_model_kwargs

				super().__init__(
				    do_lower_case=__lowercase			,remove_space=__lowercase			,keep_accents=__lowercase			,bos_token=__lowercase			,eos_token=__lowercase			,unk_token=__lowercase			,sep_token=__lowercase			,pad_token=__lowercase			,cls_token=__lowercase			,mask_token=__lowercase			,additional_special_tokens=__lowercase			,sp_model_kwargs=self.sp_model_kwargs			,**__lowercase			,)

				lowercase__   :    Optional[Any]				=			3

				lowercase__   :    List[str]				=			do_lower_case
				lowercase__   :    Optional[int]				=			remove_space
				lowercase__   :    Any				=			keep_accents
				lowercase__   :    Optional[Any]				=			vocab_file

				lowercase__   :    List[Any]				=			spm.SentencePieceProcessor(**self.sp_model_kwargs						)
				self.sp_model.Load(__lowercase						)







		@property
		def 					UpperCAmelCase    (	self						:  str						)					->		Any:






				"""simple docstring"""



				return len(self.sp_model						)







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






				"""simple docstring"""



				lowercase__   :    Dict				=			{self.convert_ids_to_tokens(__lowercase						): i for i in range(self.vocab_size						)}
				vocab.update(self.added_tokens_encoder						)
				return vocab







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






				"""simple docstring"""



				lowercase__   :    Dict				=			self.__dict__.copy()
				lowercase__   :    Union[str, Any]				=			None
				return state







		def __setstate__(	self						:  Any			,_snake_case						:  Any						)					->		Tuple:






				"""simple docstring"""



				lowercase__   :    Any				=			d

				# for backward compatibility
				if not hasattr(self			,'''sp_model_kwargs'''						):
						lowercase__   :    int				=			{}

				lowercase__   :    List[str]				=			spm.SentencePieceProcessor(**self.sp_model_kwargs						)
				self.sp_model.Load(self.vocab_file						)







		def 					UpperCAmelCase    (	self						:  Optional[int]			,_snake_case						:  int						)					->		Optional[Any]:






				"""simple docstring"""



				if self.remove_space:
						lowercase__   :    Tuple				=			''' '''.join(inputs.strip().split()						)
				else:
						lowercase__   :    Tuple				=			inputs
				lowercase__   :    str				=			outputs.replace('''``'''			,'''"'''						).replace('''\'\''''			,'''"'''						)

				if not self.keep_accents:
						lowercase__   :    List[Any]				=			unicodedata.normalize('''NFKD'''			,__lowercase						)
						lowercase__   :    Any				=			''''''.join([c for c in outputs if not unicodedata.combining(__lowercase						)]						)
				if self.do_lower_case:
						lowercase__   :    Dict				=			outputs.lower()

				return outputs







		def 					UpperCAmelCase    (	self						:  Optional[Any]			,_snake_case						:  Optional[Any]						)					->		List[str]:






				"""simple docstring"""



				lowercase__   :    Dict				=			self.preprocess_text(__lowercase						)
				lowercase__   :    Optional[Any]				=			self.sp_model.encode(__lowercase			,out_type=__lowercase						)
				lowercase__   :    int				=			[]
				for piece in pieces:
						if len(__lowercase						) > 1 and piece[-1] == str(''','''						) and piece[-2].isdigit():
								lowercase__   :    List[Any]				=			self.sp_model.EncodeAsPieces(piece[:-1].replace(__lowercase			,''''''						)						)
								if piece[0] != SPIECE_UNDERLINE and cur_pieces[0][0] == SPIECE_UNDERLINE:
										if len(cur_pieces[0]						) == 1:
												lowercase__   :    Optional[Any]				=			cur_pieces[1:]
										else:
												lowercase__   :    str				=			cur_pieces[0][1:]
								cur_pieces.append(piece[-1]						)
								new_pieces.extend(__lowercase						)
						else:
								new_pieces.append(__lowercase						)

				return new_pieces







		def 					UpperCAmelCase    (	self						:  str			,_snake_case						:  Any						)					->		Optional[Any]:






				"""simple docstring"""



				return self.sp_model.PieceToId(__lowercase						)







		def 					UpperCAmelCase    (	self						:  int			,_snake_case						:  Tuple						)					->		Optional[int]:






				"""simple docstring"""



				return self.sp_model.IdToPiece(__lowercase						)







		def 					UpperCAmelCase    (	self						:  int			,_snake_case						:  Optional[int]						)					->		Optional[Any]:






				"""simple docstring"""



				lowercase__   :    Dict				=			''''''.join(__lowercase						).replace(__lowercase			,''' '''						).strip()
				return out_string







		def 					UpperCAmelCase    (	self						:  int			,_snake_case						:  Tuple			,_snake_case						:  int = False			,_snake_case						:  Dict = None			,_snake_case						:  Optional[Any] = True			,**_snake_case						:  Union[str, Any]			,)					->		str:






				"""simple docstring"""



				lowercase__   :    List[Any]				=			kwargs.pop('''use_source_tokenizer'''			,__lowercase						)

				lowercase__   :    Any				=			self.convert_ids_to_tokens(__lowercase			,skip_special_tokens=__lowercase						)

				# To avoid mixing byte-level and unicode for byte-level BPT
				# we need to build string separately for added tokens and byte-level tokens
				# cf. https://github.com/huggingface/transformers/issues/1133
				lowercase__   :    List[str]				=			[]
				lowercase__   :    Tuple				=			[]
				for token in filtered_tokens:
						if skip_special_tokens and token in self.all_special_ids:
								continue
						if token in self.added_tokens_encoder:
								if current_sub_text:
										sub_texts.append(self.convert_tokens_to_string(__lowercase						)						)
										lowercase__   :    int				=			[]
								sub_texts.append(__lowercase						)
						else:
								current_sub_text.append(__lowercase						)
				if current_sub_text:
						sub_texts.append(self.convert_tokens_to_string(__lowercase						)						)

				# Mimic the behavior of the Rust tokenizer:
				# By default, there are no spaces between special tokens
				lowercase__   :    Any				=			''''''.join(__lowercase						)

				lowercase__   :    Tuple				=			(
				    clean_up_tokenization_spaces
				    if clean_up_tokenization_spaces is not None
				    else self.clean_up_tokenization_spaces
				)
				if clean_up_tokenization_spaces:
						lowercase__   :    Dict				=			self.clean_up_tokenization(__lowercase						)
						return clean_text
				else:
						return text







		def 					UpperCAmelCase    (	self						:  Tuple			,_snake_case						:  int			,_snake_case						:  List[Any] = None						)					->		List[int]:






				"""simple docstring"""



				lowercase__   :    Any				=			[self.sep_token_id]
				lowercase__   :    Union[str, Any]				=			[self.cls_token_id]
				if token_ids_a is None:
						return token_ids_a + sep + cls
				return token_ids_a + sep + token_ids_a + sep + cls







		def 					UpperCAmelCase    (	self						:  Optional[int]			,_snake_case						:  List[Any]			,_snake_case						:  int = None			,_snake_case						:  List[Any] = False						)					->		List[int]:






				"""simple docstring"""



				if already_has_special_tokens:
						return super().get_special_tokens_mask(
						    token_ids_a=__lowercase			,token_ids_a=__lowercase			,already_has_special_tokens=__lowercase						)

				if token_ids_a is not None:
						return ([0] * len(__lowercase						)) + [1] + ([0] * len(__lowercase						)) + [1, 1]
				return ([0] * len(__lowercase						)) + [1, 1]







		def 					UpperCAmelCase    (	self						:  Any			,_snake_case						:  Tuple			,_snake_case						:  str = None						)					->		List[int]:






				"""simple docstring"""



				lowercase__   :    Union[str, Any]				=			[self.sep_token_id]
				lowercase__   :    Union[str, Any]				=			[2]

				if token_ids_a is None:
						return len(token_ids_a + sep						) * [0] + cls_segment_id
				return len(token_ids_a + sep						) * [0] + len(token_ids_a + sep						) * [1] + cls_segment_id







		def 					UpperCAmelCase    (	self						:  Any			,_snake_case						:  Optional[int]			,_snake_case						:  str = None						)					->		Tuple[str]:






				"""simple docstring"""



				if not os.path.isdir(__lowercase						):
						logger.error(f"""Vocabulary path ({save_directory}) should be a directory"""						)
						return
				lowercase__   :    List[Any]				=			os.path.join(
				    __lowercase			,(filename_prefix + '''-''' if filename_prefix else '''''') + VOCAB_FILES_NAMES['''vocab_file''']						)

				if os.path.abspath(self.vocab_file						) != os.path.abspath(__lowercase						) and os.path.isfile(self.vocab_file						):
						copyfile(self.vocab_file			,__lowercase						)
				elif not os.path.isfile(self.vocab_file						):
						with open(__lowercase			,'''wb'''						) as fi:
								lowercase__   :    Dict				=			self.sp_model.serialized_model_proto()
								fi.write(__lowercase						)

				return (out_vocab_file,)




import unittest

from transformers import JukeboxTokenizer
from transformers.testing_utils import require_torch







class  snake_case__(							unittest.TestCase							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__					:     Tuple    =							JukeboxTokenizer
						SCREAMING_SNAKE_CASE__					:     int    =							{
						    """artist""": """Zac Brown Band""",
						    """genres""": """Country""",
						    """lyrics""": """I met a traveller from an antique land,
        Who said \"Two vast and trunkless legs of stone
        Stand in the desert. . . . Near them, on the sand,
        Half sunk a shattered visage lies, whose frown,
        And wrinkled lip, and sneer of cold command,
        Tell that its sculptor well those passions read
        Which yet survive, stamped on these lifeless things,
        The hand that mocked them, and the heart that fed;
        And on the pedestal, these words appear:
        My name is Ozymandias, King of Kings;
        Look on my Works, ye Mighty, and despair!
        Nothing beside remains. Round the decay
        Of that colossal Wreck, boundless and bare
        The lone and level sands stretch far away
        """,
						}




						@require_torch
						def   lowercase_       ( self							)    ->			Union[str, Any]:
										import torch

										lowerCAmelCase_       :					Union[str, Any]			 = JukeboxTokenizer.from_pretrained('''openai/jukebox-1b-lyrics'''							)
										lowerCAmelCase_       :					Any			 = tokenizer(**self.metas							)['''input_ids''']
										# fmt: off
										lowerCAmelCase_       :					List[str]			 = [
										    torch.tensor([[
										        0, 0, 0, 7_1_6_9, 5_0_7, 9, 7_6, 3_9, 3_1, 4_6, 7_6, 2_7,
										        7_6, 4_6, 4_4, 2_7, 4_8, 3_1, 3_8, 3_8, 3_1, 4_4, 7_6, 3_2,
										        4_4, 4_1, 3_9, 7_6, 2_7, 4_0, 7_6, 2_7, 4_0, 4_6, 3_5, 4_3,
										        4_7, 3_1, 7_6, 3_8, 2_7, 4_0, 3_0, 6_4, 7_8, 7_6, 7_6, 7_6,
										        7_6, 7_6, 7_6, 7_6, 7_6, 2_3, 3_4, 4_1, 7_6, 4_5, 2_7, 3_5,
										        3_0, 7_6, 7_1, 2_0, 4_9, 4_1, 7_6, 4_8, 2_7, 4_5, 4_6, 7_6,
										        2_7, 4_0, 3_0, 7_6, 4_6, 4_4, 4_7, 4_0, 3_7, 3_8, 3_1, 4_5,
										        4_5, 7_6, 3_8, 3_1, 3_3, 4_5, 7_6, 4_1, 3_2, 7_6, 4_5, 4_6,
										        4_1, 4_0, 3_1, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6,
										        1_9, 4_6, 2_7, 4_0, 3_0, 7_6, 3_5, 4_0, 7_6, 4_6, 3_4, 3_1,
										        7_6, 3_0, 3_1, 4_5, 3_1, 4_4, 4_6, 6_3, 7_6, 6_3, 7_6, 6_3,
										        7_6, 6_3, 7_6, 1_4, 3_1, 2_7, 4_4, 7_6, 4_6, 3_4, 3_1, 3_9,
										        6_4, 7_6, 4_1, 4_0, 7_6, 4_6, 3_4, 3_1, 7_6, 4_5, 2_7, 4_0,
										        3_0, 6_4, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 8,
										        2_7, 3_8, 3_2, 7_6, 4_5, 4_7, 4_0, 3_7, 7_6, 2_7, 7_6, 4_5,
										        3_4, 2_7, 4_6, 4_6, 3_1, 4_4, 3_1, 3_0, 7_6, 4_8, 3_5, 4_5,
										        2_7, 3_3, 3_1, 7_6, 3_8, 3_5, 3_1, 4_5, 6_4, 7_6, 4_9, 3_4,
										        4_1, 4_5, 3_1, 7_6, 3_2, 4_4, 4_1, 4_9, 4_0, 6_4, 7_8, 7_6,
										        7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1, 4_0, 3_0, 7_6, 4_9,
										        4_4, 3_5, 4_0, 3_7, 3_8, 3_1, 3_0, 7_6, 3_8, 3_5, 4_2, 6_4,
										        7_6, 2_7, 4_0, 3_0, 7_6, 4_5, 4_0, 3_1, 3_1, 4_4, 7_6, 4_1,
										        3_2, 7_6, 2_9, 4_1, 3_8, 3_0, 7_6, 2_9, 4_1, 3_9, 3_9, 2_7,
										        4_0, 3_0, 6_4, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6,
										        2_0, 3_1, 3_8, 3_8, 7_6, 4_6, 3_4, 2_7, 4_6, 7_6, 3_5, 4_6,
										        4_5, 7_6, 4_5, 2_9, 4_7, 3_8, 4_2, 4_6, 4_1, 4_4, 7_6, 4_9,
										        3_1, 3_8, 3_8, 7_6, 4_6, 3_4, 4_1, 4_5, 3_1, 7_6, 4_2, 2_7,
										        4_5, 4_5, 3_5, 4_1, 4_0, 4_5, 7_6, 4_4, 3_1, 2_7, 3_0, 7_8,
										        7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 2_3, 3_4, 3_5, 2_9,
										        3_4, 7_6, 5_1, 3_1, 4_6, 7_6, 4_5, 4_7, 4_4, 4_8, 3_5, 4_8,
										        3_1, 6_4, 7_6, 4_5, 4_6, 2_7, 3_9, 4_2, 3_1, 3_0, 7_6, 4_1,
										        4_0, 7_6, 4_6, 3_4, 3_1, 4_5, 3_1, 7_6, 3_8, 3_5, 3_2, 3_1,
										        3_8, 3_1, 4_5, 4_5, 7_6, 4_6, 3_4, 3_5, 4_0, 3_3, 4_5, 6_4,
										        7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 2_0, 3_4, 3_1,
										        7_6, 3_4, 2_7, 4_0, 3_0, 7_6, 4_6, 3_4, 2_7, 4_6, 7_6, 3_9,
										        4_1, 2_9, 3_7, 3_1, 3_0, 7_6, 4_6, 3_4, 3_1, 3_9, 6_4, 7_6,
										        2_7, 4_0, 3_0, 7_6, 4_6, 3_4, 3_1, 7_6, 3_4, 3_1, 2_7, 4_4,
										        4_6, 7_6, 4_6, 3_4, 2_7, 4_6, 7_6, 3_2, 3_1, 3_0, 6_6, 7_8,
										        7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1, 4_0, 3_0, 7_6,
										        4_1, 4_0, 7_6, 4_6, 3_4, 3_1, 7_6, 4_2, 3_1, 3_0, 3_1, 4_5,
										        4_6, 2_7, 3_8, 6_4, 7_6, 4_6, 3_4, 3_1, 4_5, 3_1, 7_6, 4_9,
										        4_1, 4_4, 3_0, 4_5, 7_6, 2_7, 4_2, 4_2, 3_1, 2_7, 4_4, 6_5,
										        7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1_3, 5_1, 7_6,
										        4_0, 2_7, 3_9, 3_1, 7_6, 3_5, 4_5, 7_6, 1_5, 5_2, 5_1, 3_9,
										        2_7, 4_0, 3_0, 3_5, 2_7, 4_5, 6_4, 7_6, 1_1, 3_5, 4_0, 3_3,
										        7_6, 4_1, 3_2, 7_6, 1_1, 3_5, 4_0, 3_3, 4_5, 6_6, 7_8, 7_6,
										        7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1_2, 4_1, 4_1, 3_7, 7_6,
										        4_1, 4_0, 7_6, 3_9, 5_1, 7_6, 2_3, 4_1, 4_4, 3_7, 4_5, 6_4,
										        7_6, 5_1, 3_1, 7_6, 1_3, 3_5, 3_3, 3_4, 4_6, 5_1, 6_4, 7_6,
										        2_7, 4_0, 3_0, 7_6, 3_0, 3_1, 4_5, 4_2, 2_7, 3_5, 4_4, 6_7,
										        7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1_4, 4_1, 4_6,
										        3_4, 3_5, 4_0, 3_3, 7_6, 2_8, 3_1, 4_5, 3_5, 3_0, 3_1, 7_6,
										        4_4, 3_1, 3_9, 2_7, 3_5, 4_0, 4_5, 6_3, 7_6, 1_8, 4_1, 4_7,
										        4_0, 3_0, 7_6, 4_6, 3_4, 3_1, 7_6, 3_0, 3_1, 2_9, 2_7, 5_1,
										        7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1_5, 3_2, 7_6,
										        4_6, 3_4, 2_7, 4_6, 7_6, 2_9, 4_1, 3_8, 4_1, 4_5, 4_5, 2_7,
										        3_8, 7_6, 2_3, 4_4, 3_1, 2_9, 3_7, 6_4, 7_6, 2_8, 4_1, 4_7,
										        4_0, 3_0, 3_8, 3_1, 4_5, 4_5, 7_6, 2_7, 4_0, 3_0, 7_6, 2_8,
										        2_7, 4_4, 3_1, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6,
										        2_0, 3_4, 3_1, 7_6, 3_8, 4_1, 4_0, 3_1, 7_6, 2_7, 4_0, 3_0,
										        7_6, 3_8, 3_1, 4_8, 3_1, 3_8, 7_6, 4_5, 2_7, 4_0, 3_0, 4_5,
										        7_6, 4_5, 4_6, 4_4, 3_1, 4_6, 2_9, 3_4, 7_6, 3_2, 2_7, 4_4,
										        7_6, 2_7, 4_9, 2_7, 5_1, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6,
										        7_6, 7_6]]							),
										    torch.tensor([[0, 0, 0, 1_0_6_9, 1_1]]							),
										    torch.tensor([[0, 0, 0, 1_0_6_9, 1_1]]							),
										]
										# fmt: on
										self.assertTrue(torch.allclose(tokens[0]      ,  EXPECTED_OUTPUT[0]							)							)
										self.assertTrue(torch.allclose(tokens[1]      ,  EXPECTED_OUTPUT[1]							)							)
										self.assertTrue(torch.allclose(tokens[2]      ,  EXPECTED_OUTPUT[2]							)							)




						@require_torch
						def   lowercase_       ( self							)    ->			List[Any]:
										import torch

										lowerCAmelCase_       :					Any			 = JukeboxTokenizer.from_pretrained('''openai/jukebox-5b-lyrics'''							)
										lowerCAmelCase_       :					str			 = tokenizer(**self.metas							)['''input_ids''']
										# fmt: off
										lowerCAmelCase_       :					Tuple			 = [
										    torch.tensor([[
										        0, 0, 0, 1_0_6_9, 1_1, -1, -1, -1, -1, 9, 7_7, 3_9,
										        3_1, 4_6, 7_7, 2_7, 7_7, 4_6, 4_4, 2_7, 4_8, 3_1, 3_8, 3_8,
										        3_1, 4_4, 7_7, 3_2, 4_4, 4_1, 3_9, 7_7, 2_7, 4_0, 7_7, 2_7,
										        4_0, 4_6, 3_5, 4_3, 4_7, 3_1, 7_7, 3_8, 2_7, 4_0, 3_0, 6_4,
										        7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 2_3, 3_4, 4_1,
										        7_7, 4_5, 2_7, 3_5, 3_0, 7_7, 7_2, 2_0, 4_9, 4_1, 7_7, 4_8,
										        2_7, 4_5, 4_6, 7_7, 2_7, 4_0, 3_0, 7_7, 4_6, 4_4, 4_7, 4_0,
										        3_7, 3_8, 3_1, 4_5, 4_5, 7_7, 3_8, 3_1, 3_3, 4_5, 7_7, 4_1,
										        3_2, 7_7, 4_5, 4_6, 4_1, 4_0, 3_1, 7_9, 7_7, 7_7, 7_7, 7_7,
										        7_7, 7_7, 7_7, 7_7, 1_9, 4_6, 2_7, 4_0, 3_0, 7_7, 3_5, 4_0,
										        7_7, 4_6, 3_4, 3_1, 7_7, 3_0, 3_1, 4_5, 3_1, 4_4, 4_6, 6_3,
										        7_7, 6_3, 7_7, 6_3, 7_7, 6_3, 7_7, 1_4, 3_1, 2_7, 4_4, 7_7,
										        4_6, 3_4, 3_1, 3_9, 6_4, 7_7, 4_1, 4_0, 7_7, 4_6, 3_4, 3_1,
										        7_7, 4_5, 2_7, 4_0, 3_0, 6_4, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7,
										        7_7, 7_7, 7_7, 8, 2_7, 3_8, 3_2, 7_7, 4_5, 4_7, 4_0, 3_7,
										        7_7, 2_7, 7_7, 4_5, 3_4, 2_7, 4_6, 4_6, 3_1, 4_4, 3_1, 3_0,
										        7_7, 4_8, 3_5, 4_5, 2_7, 3_3, 3_1, 7_7, 3_8, 3_5, 3_1, 4_5,
										        6_4, 7_7, 4_9, 3_4, 4_1, 4_5, 3_1, 7_7, 3_2, 4_4, 4_1, 4_9,
										        4_0, 6_4, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 1,
										        4_0, 3_0, 7_7, 4_9, 4_4, 3_5, 4_0, 3_7, 3_8, 3_1, 3_0, 7_7,
										        3_8, 3_5, 4_2, 6_4, 7_7, 2_7, 4_0, 3_0, 7_7, 4_5, 4_0, 3_1,
										        3_1, 4_4, 7_7, 4_1, 3_2, 7_7, 2_9, 4_1, 3_8, 3_0, 7_7, 2_9,
										        4_1, 3_9, 3_9, 2_7, 4_0, 3_0, 6_4, 7_9, 7_7, 7_7, 7_7, 7_7,
										        7_7, 7_7, 7_7, 7_7, 2_0, 3_1, 3_8, 3_8, 7_7, 4_6, 3_4, 2_7,
										        4_6, 7_7, 3_5, 4_6, 4_5, 7_7, 4_5, 2_9, 4_7, 3_8, 4_2, 4_6,
										        4_1, 4_4, 7_7, 4_9, 3_1, 3_8, 3_8, 7_7, 4_6, 3_4, 4_1, 4_5,
										        3_1, 7_7, 4_2, 2_7, 4_5, 4_5, 3_5, 4_1, 4_0, 4_5, 7_7, 4_4,
										        3_1, 2_7, 3_0, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
										        2_3, 3_4, 3_5, 2_9, 3_4, 7_7, 5_1, 3_1, 4_6, 7_7, 4_5, 4_7,
										        4_4, 4_8, 3_5, 4_8, 3_1, 6_4, 7_7, 4_5, 4_6, 2_7, 3_9, 4_2,
										        3_1, 3_0, 7_7, 4_1, 4_0, 7_7, 4_6, 3_4, 3_1, 4_5, 3_1, 7_7,
										        3_8, 3_5, 3_2, 3_1, 3_8, 3_1, 4_5, 4_5, 7_7, 4_6, 3_4, 3_5,
										        4_0, 3_3, 4_5, 6_4, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
										        7_7, 2_0, 3_4, 3_1, 7_7, 3_4, 2_7, 4_0, 3_0, 7_7, 4_6, 3_4,
										        2_7, 4_6, 7_7, 3_9, 4_1, 2_9, 3_7, 3_1, 3_0, 7_7, 4_6, 3_4,
										        3_1, 3_9, 6_4, 7_7, 2_7, 4_0, 3_0, 7_7, 4_6, 3_4, 3_1, 7_7,
										        3_4, 3_1, 2_7, 4_4, 4_6, 7_7, 4_6, 3_4, 2_7, 4_6, 7_7, 3_2,
										        3_1, 3_0, 6_6, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
										        1, 4_0, 3_0, 7_7, 4_1, 4_0, 7_7, 4_6, 3_4, 3_1, 7_7, 4_2,
										        3_1, 3_0, 3_1, 4_5, 4_6, 2_7, 3_8, 6_4, 7_7, 4_6, 3_4, 3_1,
										        4_5, 3_1, 7_7, 4_9, 4_1, 4_4, 3_0, 4_5, 7_7, 2_7, 4_2, 4_2,
										        3_1, 2_7, 4_4, 6_5, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
										        7_7, 1_3, 5_1, 7_7, 4_0, 2_7, 3_9, 3_1, 7_7, 3_5, 4_5, 7_7,
										        1_5, 5_2, 5_1, 3_9, 2_7, 4_0, 3_0, 3_5, 2_7, 4_5, 6_4, 7_7,
										        1_1, 3_5, 4_0, 3_3, 7_7, 4_1, 3_2, 7_7, 1_1, 3_5, 4_0, 3_3,
										        4_5, 6_6, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 1_2,
										        4_1, 4_1, 3_7, 7_7, 4_1, 4_0, 7_7, 3_9, 5_1, 7_7, 2_3, 4_1,
										        4_4, 3_7, 4_5, 6_4, 7_7, 5_1, 3_1, 7_7, 1_3, 3_5, 3_3, 3_4,
										        4_6, 5_1, 6_4, 7_7, 2_7, 4_0, 3_0, 7_7, 3_0, 3_1, 4_5, 4_2,
										        2_7, 3_5, 4_4, 6_7, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
										        7_7, 1_4, 4_1, 4_6, 3_4, 3_5, 4_0, 3_3, 7_7, 2_8, 3_1, 4_5,
										        3_5, 3_0, 3_1, 7_7, 4_4, 3_1, 3_9, 2_7, 3_5, 4_0, 4_5, 6_3,
										        7_7, 1_8, 4_1, 4_7, 4_0, 3_0, 7_7, 4_6, 3_4, 3_1, 7_7, 3_0,
										        3_1, 2_9, 2_7, 5_1, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
										        7_7, 1_5, 3_2, 7_7, 4_6, 3_4, 2_7, 4_6, 7_7, 2_9, 4_1, 3_8,
										        4_1, 4_5, 4_5, 2_7, 3_8, 7_7, 2_3, 4_4, 3_1, 2_9, 3_7, 6_4,
										        7_7, 2_8, 4_1, 4_7, 4_0, 3_0, 3_8, 3_1, 4_5, 4_5, 7_7, 2_7,
										        4_0, 3_0, 7_7, 2_8, 2_7, 4_4, 3_1, 7_9, 7_7, 7_7, 7_7, 7_7,
										        7_7, 7_7, 7_7, 7_7, 2_0, 3_4, 3_1, 7_7, 3_8, 4_1, 4_0, 3_1,
										        7_7, 2_7, 4_0, 3_0, 7_7, 3_8, 3_1, 4_8, 3_1, 3_8, 7_7, 4_5,
										        2_7, 4_0, 3_0, 4_5, 7_7, 4_5, 4_6, 4_4, 3_1, 4_6, 2_9, 3_4,
										        7_7, 3_2, 2_7, 4_4, 7_7, 2_7, 4_9, 2_7, 5_1, 7_9, 7_7, 7_7,
										        7_7, 7_7, 7_7, 7_7, 7_7, 7_7]]							),
										    torch.tensor([[0, 0, 0, 1_0_6_9, 1_1, -1, -1, -1, -1]]							),
										    torch.tensor([[0, 0, 0, 1_0_6_9, 1_1, -1, -1, -1, -1]]							),
										]
										# fmt: on
										self.assertTrue(torch.allclose(tokens[0]      ,  EXPECTED_OUTPUT[0]							)							)
										self.assertTrue(torch.allclose(tokens[1]      ,  EXPECTED_OUTPUT[1]							)							)
										self.assertTrue(torch.allclose(tokens[2]      ,  EXPECTED_OUTPUT[2]							)							)