
from __future__ import annotations

import unittest

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

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


if is_tf_available():
  import tensorflow as tf

  from transformers import (
      TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFXLMForMultipleChoice,
      TFXLMForQuestionAnsweringSimple,
      TFXLMForSequenceClassification,
      TFXLMForTokenClassification,
      TFXLMModel,
      TFXLMWithLMHeadModel,
      XLMConfig,
  )


class 		__magic_name__   :





  def __init__(							self    :	Optional[int]						,  lowerCamelCase__    :	str						,  ):
       lowerCAmelCase		:					Union[str, Any]  	=     parent
       lowerCAmelCase		:					Tuple  	=     1_3
       lowerCAmelCase		:					List[Any]  	=     7
       lowerCAmelCase		:					Union[str, Any]  	=     True
       lowerCAmelCase		:					List[Any]  	=     True
       lowerCAmelCase		:					Any  	=     True
       lowerCAmelCase		:					List[str]  	=     True
       lowerCAmelCase		:					Dict  	=     True
       lowerCAmelCase		:					List[Any]  	=     False
       lowerCAmelCase		:					Union[str, Any]  	=     False
       lowerCAmelCase		:					Optional[int]  	=     False
       lowerCAmelCase		:					Optional[int]  	=     2
       lowerCAmelCase		:					Any  	=     9_9
       lowerCAmelCase		:					Optional[int]  	=     0
       lowerCAmelCase		:					str  	=     3_2
       lowerCAmelCase		:					Dict  	=     2
       lowerCAmelCase		:					Optional[int]  	=     4
       lowerCAmelCase		:					Any  	=     0.1
       lowerCAmelCase		:					List[str]  	=     0.1
       lowerCAmelCase		:					Tuple  	=     5_1_2
       lowerCAmelCase		:					Optional[Any]  	=     1_6
       lowerCAmelCase		:					Union[str, Any]  	=     2
       lowerCAmelCase		:					Dict  	=     0.0_2
       lowerCAmelCase		:					Any  	=     3
       lowerCAmelCase		:					List[Any]  	=     4
       lowerCAmelCase		:					str  	=     '''last'''
       lowerCAmelCase		:					Optional[Any]  	=     True
       lowerCAmelCase		:					List[str]  	=     None
       lowerCAmelCase		:					int  	=     0





  def       _A							(							self    :	Tuple				):
       lowerCAmelCase		:					Optional[Any]  	=     ids_tensor([self.batch_size, self.seq_length]						,  self.vocab_size				)
       lowerCAmelCase		:					Optional[int]  	=     random_attention_mask([self.batch_size, self.seq_length]						,  dtype=tf.floataa				)

       lowerCAmelCase		:					Tuple  	=     None
       if self.use_input_lengths:
            lowerCAmelCase		:					Tuple  	=     (
                ids_tensor([self.batch_size]						,  vocab_size=2				) + self.seq_length - 2
            )  # small variation of seq_length

       lowerCAmelCase		:					List[str]  	=     None
       if self.use_token_type_ids:
            lowerCAmelCase		:					Any  	=     ids_tensor([self.batch_size, self.seq_length]						,  self.n_langs				)

       lowerCAmelCase		:					Tuple  	=     None
       lowerCAmelCase		:					Union[str, Any]  	=     None
       lowerCAmelCase		:					str  	=     None
       if self.use_labels:
            lowerCAmelCase		:					List[Any]  	=     ids_tensor([self.batch_size]						,  self.type_sequence_label_size				)
            lowerCAmelCase		:					Optional[Any]  	=     ids_tensor([self.batch_size, self.seq_length]						,  self.num_labels				)
            lowerCAmelCase		:					List[Any]  	=     ids_tensor([self.batch_size]						,  2						,  dtype=tf.floataa				)
            lowerCAmelCase		:					int  	=     ids_tensor([self.batch_size]						,  self.num_choices				)

       lowerCAmelCase		:					int  	=     XLMConfig(
           vocab_size=self.vocab_size						,  n_special=self.n_special						,  emb_dim=self.hidden_size						,  n_layers=self.num_hidden_layers						,  n_heads=self.num_attention_heads						,  dropout=self.hidden_dropout_prob						,  attention_dropout=self.attention_probs_dropout_prob						,  gelu_activation=self.gelu_activation						,  sinusoidal_embeddings=self.sinusoidal_embeddings						,  asm=self.asm						,  causal=self.causal						,  n_langs=self.n_langs						,  max_position_embeddings=self.max_position_embeddings						,  initializer_range=self.initializer_range						,  summary_type=self.summary_type						,  use_proj=self.use_proj						,  bos_token_id=self.bos_token_id						,  )

       return (
           config,
           input_ids,
           token_type_ids,
           input_lengths,
           sequence_labels,
           token_labels,
           is_impossible_labels,
           choice_labels,
           input_mask,
       )





  def       _A							(							self    :	Dict						,  lowerCamelCase__    :	Union[str, Any]						,  lowerCamelCase__    :	Tuple						,  lowerCamelCase__    :	Dict						,  lowerCamelCase__    :	Optional[Any]						,  lowerCamelCase__    :	Any						,  lowerCamelCase__    :	Optional[int]						,  lowerCamelCase__    :	List[Any]						,  lowerCamelCase__    :	Optional[Any]						,  lowerCamelCase__    :	Optional[Any]						,  ):
       lowerCAmelCase		:					Any  	=     TFXLMModel(config=lowerCamelCase__				)
       lowerCAmelCase		:					List[Any]  	=     {'''input_ids''': input_ids, '''lengths''': input_lengths, '''langs''': token_type_ids}
       lowerCAmelCase		:					List[str]  	=     model(lowerCamelCase__				)

       lowerCAmelCase		:					Union[str, Any]  	=     [input_ids, input_mask]
       lowerCAmelCase		:					str  	=     model(lowerCamelCase__				)
       self.parent.assertEqual(result.last_hidden_state.shape						,  (self.batch_size, self.seq_length, self.hidden_size)				)





  def       _A							(							self    :	Any						,  lowerCamelCase__    :	Optional[Any]						,  lowerCamelCase__    :	str						,  lowerCamelCase__    :	Optional[int]						,  lowerCamelCase__    :	Dict						,  lowerCamelCase__    :	List[str]						,  lowerCamelCase__    :	Tuple						,  lowerCamelCase__    :	Tuple						,  lowerCamelCase__    :	List[Any]						,  lowerCamelCase__    :	Union[str, Any]						,  ):
       lowerCAmelCase		:					int  	=     TFXLMWithLMHeadModel(lowerCamelCase__				)

       lowerCAmelCase		:					Any  	=     {'''input_ids''': input_ids, '''lengths''': input_lengths, '''langs''': token_type_ids}
       lowerCAmelCase		:					Tuple  	=     model(lowerCamelCase__				)

       lowerCAmelCase		:					Optional[int]  	=     outputs

       self.parent.assertEqual(result.logits.shape						,  (self.batch_size, self.seq_length, self.vocab_size)				)





  def       _A							(							self    :	Tuple						,  lowerCamelCase__    :	Tuple						,  lowerCamelCase__    :	Optional[int]						,  lowerCamelCase__    :	Union[str, Any]						,  lowerCamelCase__    :	int						,  lowerCamelCase__    :	Union[str, Any]						,  lowerCamelCase__    :	Optional[Any]						,  lowerCamelCase__    :	Any						,  lowerCamelCase__    :	Any						,  lowerCamelCase__    :	Any						,  ):
       lowerCAmelCase		:					Optional[Any]  	=     TFXLMForQuestionAnsweringSimple(lowerCamelCase__				)

       lowerCAmelCase		:					Optional[Any]  	=     {'''input_ids''': input_ids, '''lengths''': input_lengths}

       lowerCAmelCase		:					Optional[int]  	=     model(lowerCamelCase__				)

       self.parent.assertEqual(result.start_logits.shape						,  (self.batch_size, self.seq_length)				)
       self.parent.assertEqual(result.end_logits.shape						,  (self.batch_size, self.seq_length)				)





  def       _A							(							self    :	Optional[Any]						,  lowerCamelCase__    :	Optional[int]						,  lowerCamelCase__    :	Optional[Any]						,  lowerCamelCase__    :	Dict						,  lowerCamelCase__    :	str						,  lowerCamelCase__    :	Any						,  lowerCamelCase__    :	Tuple						,  lowerCamelCase__    :	Optional[int]						,  lowerCamelCase__    :	Any						,  lowerCamelCase__    :	Optional[int]						,  ):
       lowerCAmelCase		:					Dict  	=     TFXLMForSequenceClassification(lowerCamelCase__				)

       lowerCAmelCase		:					Tuple  	=     {'''input_ids''': input_ids, '''lengths''': input_lengths}

       lowerCAmelCase		:					str  	=     model(lowerCamelCase__				)

       self.parent.assertEqual(result.logits.shape						,  (self.batch_size, self.type_sequence_label_size)				)





  def       _A							(							self    :	List[str]						,  lowerCamelCase__    :	List[str]						,  lowerCamelCase__    :	Optional[int]						,  lowerCamelCase__    :	int						,  lowerCamelCase__    :	str						,  lowerCamelCase__    :	Union[str, Any]						,  lowerCamelCase__    :	Union[str, Any]						,  lowerCamelCase__    :	Any						,  lowerCamelCase__    :	List[str]						,  lowerCamelCase__    :	List[str]						,  ):
       lowerCAmelCase		:					Tuple  	=     self.num_labels
       lowerCAmelCase		:					Optional[Any]  	=     TFXLMForTokenClassification(config=lowerCamelCase__				)
       lowerCAmelCase		:					Optional[Any]  	=     {'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
       lowerCAmelCase		:					Any  	=     model(lowerCamelCase__				)
       self.parent.assertEqual(result.logits.shape						,  (self.batch_size, self.seq_length, self.num_labels)				)





  def       _A							(							self    :	Optional[int]						,  lowerCamelCase__    :	List[Any]						,  lowerCamelCase__    :	List[Any]						,  lowerCamelCase__    :	Optional[Any]						,  lowerCamelCase__    :	str						,  lowerCamelCase__    :	Optional[int]						,  lowerCamelCase__    :	int						,  lowerCamelCase__    :	Tuple						,  lowerCamelCase__    :	Optional[Any]						,  lowerCamelCase__    :	List[str]						,  ):
       lowerCAmelCase		:					List[Any]  	=     self.num_choices
       lowerCAmelCase		:					Union[str, Any]  	=     TFXLMForMultipleChoice(config=lowerCamelCase__				)
       lowerCAmelCase		:					Union[str, Any]  	=     tf.tile(tf.expand_dims(lowerCamelCase__						,  1				)						,  (1, self.num_choices, 1)				)
       lowerCAmelCase		:					Tuple  	=     tf.tile(tf.expand_dims(lowerCamelCase__						,  1				)						,  (1, self.num_choices, 1)				)
       lowerCAmelCase		:					List[Any]  	=     tf.tile(tf.expand_dims(lowerCamelCase__						,  1				)						,  (1, self.num_choices, 1)				)
       lowerCAmelCase		:					Tuple  	=     {
           '''input_ids''': multiple_choice_inputs_ids,
           '''attention_mask''': multiple_choice_input_mask,
           '''token_type_ids''': multiple_choice_token_type_ids,
       }
       lowerCAmelCase		:					Dict  	=     model(lowerCamelCase__				)
       self.parent.assertEqual(result.logits.shape						,  (self.batch_size, self.num_choices)				)





  def       _A							(							self    :	Optional[int]				):
       lowerCAmelCase		:					Union[str, Any]  	=     self.prepare_config_and_inputs()
       (
           lowerCAmelCase	
       )		:					Dict  	=     config_and_inputs
       lowerCAmelCase		:					int  	=     {
           '''input_ids''': input_ids,
           '''token_type_ids''': token_type_ids,
           '''langs''': token_type_ids,
           '''lengths''': input_lengths,
       }
       return config, inputs_dict



@require_tf
class 		__magic_name__   (						A_,				A_,				unittest.TestCase    ):
  _lowerCAmelCase		=	(
      (
          TFXLMModel,
          TFXLMWithLMHeadModel,
          TFXLMForSequenceClassification,
          TFXLMForQuestionAnsweringSimple,
          TFXLMForTokenClassification,
          TFXLMForMultipleChoice,
      )
      if is_tf_available()
      else ()
  )
  _lowerCAmelCase		=	(
      (TFXLMWithLMHeadModel,) if is_tf_available() else ()
  )  # TODO (PVP): Check other models whether language generation is also applicable
  _lowerCAmelCase		=	(
      {
          "feature-extraction": TFXLMModel,
          "fill-mask": TFXLMWithLMHeadModel,
          "question-answering": TFXLMForQuestionAnsweringSimple,
          "text-classification": TFXLMForSequenceClassification,
          "text-generation": TFXLMWithLMHeadModel,
          "token-classification": TFXLMForTokenClassification,
          "zero-shot": TFXLMForSequenceClassification,
      }
      if is_tf_available()
      else {}
  )
  _lowerCAmelCase		=	False
  _lowerCAmelCase		=	False





  def       _A							(							self    :	Optional[Any]						,  lowerCamelCase__    :	List[Any]						,  lowerCamelCase__    :	Tuple						,  lowerCamelCase__    :	Optional[Any]						,  lowerCamelCase__    :	List[Any]						,  lowerCamelCase__    :	Optional[int]				):



       if (
           pipeline_test_casse_name == "QAPipelineTests"
           and tokenizer_name is not None
           and not tokenizer_name.endswith('''Fast'''				)
       ):
            # `QAPipelineTests` fails for a few models when the slower tokenizer are used.
            # (The slower tokenizers were never used for pipeline tests before the pipeline testing rework)
            # TODO: check (and possibly fix) the `QAPipelineTests` with slower tokenizer
            return True

       return False





  def       _A							(							self    :	List[str]				):
       lowerCAmelCase		:					List[Any]  	=     TFXLMModelTester(self				)
       lowerCAmelCase		:					Dict  	=     ConfigTester(self						,  config_class=lowerCamelCase__						,  emb_dim=3_7				)





  def       _A							(							self    :	int				):
       self.config_tester.run_common_tests()





  def       _A							(							self    :	Dict				):
       lowerCAmelCase		:					str  	=     self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_xlm_model(*lowerCamelCase__				)





  def       _A							(							self    :	Dict				):
       lowerCAmelCase		:					Tuple  	=     self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_xlm_lm_head(*lowerCamelCase__				)





  def       _A							(							self    :	Optional[int]				):
       lowerCAmelCase		:					Tuple  	=     self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_xlm_qa(*lowerCamelCase__				)





  def       _A							(							self    :	int				):
       lowerCAmelCase		:					Any  	=     self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_xlm_sequence_classif(*lowerCamelCase__				)





  def       _A							(							self    :	List[str]				):
       lowerCAmelCase		:					List[str]  	=     self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_xlm_for_token_classification(*lowerCamelCase__				)





  def       _A							(							self    :	Tuple				):
       lowerCAmelCase		:					str  	=     self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_xlm_for_multiple_choice(*lowerCamelCase__				)





  @slow
  def       _A							(							self    :	str				):



       for model_name in TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
            lowerCAmelCase		:					Optional[Any]  	=     TFXLMModel.from_pretrained(lowerCamelCase__				)
            self.assertIsNotNone(lowerCamelCase__				)



@require_tf
class 		__magic_name__   (						unittest.TestCase    ):





  @slow
  def       _A							(							self    :	List[Any]				):
       lowerCAmelCase		:					Dict  	=     TFXLMWithLMHeadModel.from_pretrained('''xlm-mlm-en-2048'''				)
       lowerCAmelCase		:					List[str]  	=     tf.convert_to_tensor([[1_4, 4_4_7]]						,  dtype=tf.intaa				)  # the president
       lowerCAmelCase		:					Optional[int]  	=     [
           1_4,
           4_4_7,
           1_4,
           4_4_7,
           1_4,
           4_4_7,
           1_4,
           4_4_7,
           1_4,
           4_4_7,
           1_4,
           4_4_7,
           1_4,
           4_4_7,
           1_4,
           4_4_7,
           1_4,
           4_4_7,
           1_4,
           4_4_7,
       ]  # the president the president the president the president the president the president the president the president the president the president
       # TODO(PVP): this and other input_ids I tried for generation give pretty bad results. Not sure why. Model might just not be made for auto-regressive inference
       lowerCAmelCase		:					Union[str, Any]  	=     model.generate(lowerCamelCase__						,  do_sample=lowerCamelCase__				)
       self.assertListEqual(output_ids[0].numpy().tolist()						,  lowerCamelCase__				)


import os
from shutil import copyfile
from typing import TYPE_CHECKING, Optional, Tuple

from tokenizers import processors

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import is_sentencepiece_available, logging
from ...utils.versions import require_version


if TYPE_CHECKING:
		from transformers.pipelines.conversational import Conversation

require_version('tokenizers>=0.13.3')

if is_sentencepiece_available():
		from .tokenization_llama import LlamaTokenizer
else:
		__SCREAMING_SNAKE_CASE			:   int         =     None

__SCREAMING_SNAKE_CASE			:   List[Any]         =     logging.get_logger(__name__)
__SCREAMING_SNAKE_CASE			:   Optional[int]         =     {'vocab_file': 'tokenizer.model', 'tokenizer_file': 'tokenizer.json'}

__SCREAMING_SNAKE_CASE     ,				__SCREAMING_SNAKE_CASE			:   Dict         =     '[INST]', '[/INST]'
__SCREAMING_SNAKE_CASE     ,				__SCREAMING_SNAKE_CASE			:   List[Any]         =     '<<SYS>>\n', '\n<</SYS>>\n\n'

# fmt: off
__SCREAMING_SNAKE_CASE			:   List[Any]         =     'You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your\\nanswers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure\\nthat your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not\\ncorrect. If you don\'t know the answer to a question, please don\'t share false information.'


class 		__magic_name__   (						snake_case    ):
		_lowerCAmelCase		=	VOCAB_FILES_NAMES
		_lowerCAmelCase		=	LlamaTokenizer
		_lowerCAmelCase		=	"left"
		_lowerCAmelCase		=	["input_ids", "attention_mask"]





		def __init__(							self    :	List[Any]						,  lowerCamelCase__    :	int=None						,  lowerCamelCase__    :	Union[str, Any]=None						,  lowerCamelCase__    :	List[str]=False						,  lowerCamelCase__    :	int="<unk>"						,  lowerCamelCase__    :	int="<s>"						,  lowerCamelCase__    :	str="</s>"						,  lowerCamelCase__    :	Optional[Any]=True						,  lowerCamelCase__    :	int=False						,  **lowerCamelCase__    :	List[str]						,  ):
							super().__init__(
							    vocab_file=lowerCamelCase__						,  tokenizer_file=lowerCamelCase__						,  clean_up_tokenization_spaces=lowerCamelCase__						,  unk_token=lowerCamelCase__						,  bos_token=lowerCamelCase__						,  eos_token=lowerCamelCase__						,  **lowerCamelCase__						,  )
							lowerCAmelCase		:					Optional[int]  	=     add_bos_token
							lowerCAmelCase		:					int  	=     add_eos_token
							self.update_post_processor()

							lowerCAmelCase		:					List[Any]  	=     vocab_file
							lowerCAmelCase		:					List[str]  	=     False if not self.vocab_file else True





		def       _A							(							self    :	Tuple				):
							lowerCAmelCase		:					List[str]  	=     self.bos_token
							lowerCAmelCase		:					Optional[Any]  	=     self.bos_token_id

							lowerCAmelCase		:					Optional[Any]  	=     self.eos_token
							lowerCAmelCase		:					List[str]  	=     self.eos_token_id

							lowerCAmelCase		:					Dict  	=     f'''{(bos+":0 ") * self.add_bos_token}$A:0{(" "+eos+":0") * self.add_eos_token}'''
							lowerCAmelCase		:					Optional[int]  	=     f'''{single}{(" "+bos+":1") * self.add_bos_token} $B:1{(" "+eos+":1") * self.add_eos_token}'''

							lowerCAmelCase		:					Any  	=     []
							if self.add_bos_token:
												special_tokens.append((bos, bos_token_id)				)
							if self.add_eos_token:
												special_tokens.append((eos, eos_token_id)				)
							lowerCAmelCase		:					Union[str, Any]  	=     processors.TemplateProcessing(
							    single=lowerCamelCase__						,  pair=lowerCamelCase__						,  special_tokens=lowerCamelCase__				)





		@property
		def       _A							(							self    :	str				):
							return self._add_eos_token





		@property
		def       _A							(							self    :	Dict				):
							return self._add_bos_token





		@add_eos_token.setter
		def       _A							(							self    :	Union[str, Any]						,  lowerCamelCase__    :	str				):
							lowerCAmelCase		:					Any  	=     value
							self.update_post_processor()





		@add_bos_token.setter
		def       _A							(							self    :	Dict						,  lowerCamelCase__    :	Optional[Any]				):
							lowerCAmelCase		:					List[Any]  	=     value
							self.update_post_processor()





		def       _A							(							self    :	int						,  lowerCamelCase__    :	str						,  lowerCamelCase__    :	Optional[str] = None				):
							if not self.can_save_slow_tokenizer:
												raise ValueError(
												    '''Your fast tokenizer does not have the necessary information to save the vocabulary for a slow '''
												    '''tokenizer.'''				)

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

							if os.path.abspath(self.vocab_file				) != os.path.abspath(lowerCamelCase__				):
												copyfile(self.vocab_file						,  lowerCamelCase__				)

							return (out_vocab_file,)





		def       _A							(							self    :	Any						,  lowerCamelCase__    :	"Conversation"				):
							lowerCAmelCase		:					int  	=     list(conversation.iter_texts()				)
							if not all([is_user for is_user, msg in dialogue[::2]]				) or not all(
							    [not is_user for is_user, msg in dialogue[1::2]]				):
												raise ValueError(
												    '''The model only supports \'user\' and \'assistant\' roles, starting with user and alternating (u/a/u/a/u...)'''				)

							lowerCAmelCase		:					List[str]  	=     []
							if len(conversation.past_user_inputs				) > 0:
												if not conversation.past_user_inputs[0].startswith(lowerCamelCase__				) or E_SYS not in conversation.past_user_inputs[0]:
																	lowerCAmelCase		:					Tuple  	=     (
																	    B_SYS + DEFAULT_SYSTEM_PROMPT + E_SYS + conversation.past_user_inputs[0]
																	)
							elif not dialogue[0][1].startswith(lowerCamelCase__				) or E_SYS not in dialogue[0][1]:
												lowerCAmelCase		:					Optional[Any]  	=     (dialogue[0][0], B_SYS + DEFAULT_SYSTEM_PROMPT + E_SYS + dialogue[0][1])

							dialog_tokens += sum(
							    [
							        [self.bos_token_id]
							        + self.encode(
							            f'''{B_INST} {(prompt[1]).strip()} {E_INST} {(answer[1]).strip()} '''						,  add_special_tokens=lowerCamelCase__				)
							        + [self.eos_token_id]
							        for prompt, answer in zip(dialogue[::2]						,  dialogue[1::2]				)
							    ]						,  []						,  )
							if not (dialogue[-1][0]):
												raise ValueError(f'''Last message must be from user, got {dialogue[-1]["role"]}'''				)
							dialog_tokens += [self.bos_token_id] + self.encode(
							    f'''{B_INST} {(dialogue[-1][1]).strip()} {E_INST}'''						,  add_special_tokens=lowerCamelCase__				)
							return dialog_tokens
