


'''simple docstring'''





import unittest

from parameterized import parameterized

from transformers import OpenLlamaConfig, is_torch_available, set_seed
from transformers.testing_utils import require_torch, torch_device

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
 import torch

 from transformers import OpenLlamaForCausalLM, OpenLlamaForSequenceClassification, OpenLlamaModel






class 	lowerCAmelCase_:
  '''simple docstring'''




  def __init__(   self  ,__UpperCAmelCase  ,__UpperCAmelCase=13  ,__UpperCAmelCase=7  ,__UpperCAmelCase=True  ,__UpperCAmelCase=True  ,__UpperCAmelCase=False  ,__UpperCAmelCase=True  ,__UpperCAmelCase=99  ,__UpperCAmelCase=32  ,__UpperCAmelCase=5  ,__UpperCAmelCase=4  ,__UpperCAmelCase=37  ,__UpperCAmelCase="gelu"  ,__UpperCAmelCase=0.1  ,__UpperCAmelCase=0.1  ,__UpperCAmelCase=512  ,__UpperCAmelCase=16  ,__UpperCAmelCase=2  ,__UpperCAmelCase=0.0_2  ,__UpperCAmelCase=3  ,__UpperCAmelCase=4  ,__UpperCAmelCase=None  ,)   ->		Tuple:
      lowerCAmelCase__			:  List[Any]											= parent
      lowerCAmelCase__			:  Optional[Any]											= batch_size
      lowerCAmelCase__			:  Optional[Any]											= seq_length
      lowerCAmelCase__			:  Any											= is_training
      lowerCAmelCase__			:  Tuple											= use_input_mask
      lowerCAmelCase__			:  List[str]											= use_token_type_ids
      lowerCAmelCase__			:  Any											= use_labels
      lowerCAmelCase__			:  Dict											= vocab_size
      lowerCAmelCase__			:  str											= hidden_size
      lowerCAmelCase__			:  Dict											= num_hidden_layers
      lowerCAmelCase__			:  int											= num_attention_heads
      lowerCAmelCase__			:  Tuple											= intermediate_size
      lowerCAmelCase__			:  Any											= hidden_act
      lowerCAmelCase__			:  Any											= hidden_dropout_prob
      lowerCAmelCase__			:  Any											= attention_probs_dropout_prob
      lowerCAmelCase__			:  Union[str, Any]											= max_position_embeddings
      lowerCAmelCase__			:  Dict											= type_vocab_size
      lowerCAmelCase__			:  Tuple											= type_sequence_label_size
      lowerCAmelCase__			:  Any											= initializer_range
      lowerCAmelCase__			:  Any											= num_labels
      lowerCAmelCase__			:  Optional[int]											= num_choices
      lowerCAmelCase__			:  List[Any]											= scope




  def 							UpperCAmelCase_     (   self				)   ->		Union[str, Any]:
      lowerCAmelCase__			:  Tuple											= ids_tensor([self.batch_size, self.seq_length]  ,self.vocab_size				)

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

      lowerCAmelCase__			:  List[str]											= None
      if self.use_token_type_ids:
          lowerCAmelCase__			:  List[str]											= ids_tensor([self.batch_size, self.seq_length]  ,self.type_vocab_size				)

      lowerCAmelCase__			:  Optional[Any]											= None
      lowerCAmelCase__			:  Tuple											= None
      lowerCAmelCase__			:  Tuple											= None
      if self.use_labels:
          lowerCAmelCase__			:  str											= ids_tensor([self.batch_size]  ,self.type_sequence_label_size				)
          lowerCAmelCase__			:  Union[str, Any]											= ids_tensor([self.batch_size, self.seq_length]  ,self.num_labels				)
          lowerCAmelCase__			:  str											= ids_tensor([self.batch_size]  ,self.num_choices				)

      lowerCAmelCase__			:  Any											= self.get_config()

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




  def 							UpperCAmelCase_     (   self				)   ->		Tuple:
      return OpenLlamaConfig(
          vocab_size=self.vocab_size  ,hidden_size=self.hidden_size  ,num_hidden_layers=self.num_hidden_layers  ,num_attention_heads=self.num_attention_heads  ,intermediate_size=self.intermediate_size  ,hidden_act=self.hidden_act  ,hidden_dropout_prob=self.hidden_dropout_prob  ,attention_probs_dropout_prob=self.attention_probs_dropout_prob  ,max_position_embeddings=self.max_position_embeddings  ,type_vocab_size=self.type_vocab_size  ,is_decoder=lowerCamelCase__  ,initializer_range=self.initializer_range  ,use_stable_embedding=lowerCamelCase__  ,)




  def 							UpperCAmelCase_     (   self  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase				)   ->		Union[str, Any]:
      lowerCAmelCase__			:  Tuple											= OpenLlamaModel(config=lowerCamelCase__				)
      model.to(lowerCamelCase__				)
      model.eval()
      lowerCAmelCase__			:  int											= model(lowerCamelCase__  ,attention_mask=lowerCamelCase__				)
      lowerCAmelCase__			:  int											= model(lowerCamelCase__				)
      self.parent.assertEqual(result.last_hidden_state.shape  ,(self.batch_size, self.seq_length, self.hidden_size)				)




  def 							UpperCAmelCase_     (   self  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,)   ->		List[Any]:
      lowerCAmelCase__			:  Optional[Any]											= True
      lowerCAmelCase__			:  Optional[int]											= OpenLlamaModel(lowerCamelCase__				)
      model.to(lowerCamelCase__				)
      model.eval()
      lowerCAmelCase__			:  Tuple											= model(
          lowerCamelCase__  ,attention_mask=lowerCamelCase__  ,encoder_hidden_states=lowerCamelCase__  ,encoder_attention_mask=lowerCamelCase__  ,)
      lowerCAmelCase__			:  Optional[int]											= model(
          lowerCamelCase__  ,attention_mask=lowerCamelCase__  ,encoder_hidden_states=lowerCamelCase__  ,)
      lowerCAmelCase__			:  int											= model(lowerCamelCase__  ,attention_mask=lowerCamelCase__				)
      self.parent.assertEqual(result.last_hidden_state.shape  ,(self.batch_size, self.seq_length, self.hidden_size)				)




  def 							UpperCAmelCase_     (   self  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,)   ->		Tuple:
      lowerCAmelCase__			:  Tuple											= OpenLlamaForCausalLM(config=lowerCamelCase__				)
      model.to(lowerCamelCase__				)
      model.eval()
      lowerCAmelCase__			:  Optional[Any]											= model(lowerCamelCase__  ,attention_mask=lowerCamelCase__  ,labels=lowerCamelCase__				)
      self.parent.assertEqual(result.logits.shape  ,(self.batch_size, self.seq_length, self.vocab_size)				)




  def 							UpperCAmelCase_     (   self  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase  ,)   ->		List[str]:
      lowerCAmelCase__			:  List[str]											= True
      lowerCAmelCase__			:  List[Any]											= True
      lowerCAmelCase__			:  List[str]											= OpenLlamaForCausalLM(config=lowerCamelCase__				)
      model.to(lowerCamelCase__				)
      model.eval()

      # first forward pass
      lowerCAmelCase__			:  int											= model(
          lowerCamelCase__  ,attention_mask=lowerCamelCase__  ,encoder_hidden_states=lowerCamelCase__  ,encoder_attention_mask=lowerCamelCase__  ,use_cache=lowerCamelCase__  ,)
      lowerCAmelCase__			:  Union[str, Any]											= outputs.past_key_values

      # create hypothetical multiple next token and extent to next_input_ids
      lowerCAmelCase__			:  int											= ids_tensor((self.batch_size, 3)  ,config.vocab_size				)
      lowerCAmelCase__			:  Optional[int]											= ids_tensor((self.batch_size, 3)  ,vocab_size=2				)

      # append to next input_ids and
      lowerCAmelCase__			:  Optional[int]											= torch.cat([input_ids, next_tokens]  ,dim=-1				)
      lowerCAmelCase__			:  int											= torch.cat([input_mask, next_mask]  ,dim=-1				)

      lowerCAmelCase__			:  Optional[Any]											= model(
          lowerCamelCase__  ,attention_mask=lowerCamelCase__  ,encoder_hidden_states=lowerCamelCase__  ,encoder_attention_mask=lowerCamelCase__  ,output_hidden_states=lowerCamelCase__  ,)['''hidden_states'''][0]
      lowerCAmelCase__			:  Union[str, Any]											= model(
          lowerCamelCase__  ,attention_mask=lowerCamelCase__  ,encoder_hidden_states=lowerCamelCase__  ,encoder_attention_mask=lowerCamelCase__  ,past_key_values=lowerCamelCase__  ,output_hidden_states=lowerCamelCase__  ,)['''hidden_states'''][0]

      # select random slice
      lowerCAmelCase__			:  Dict											= ids_tensor((1,)  ,output_from_past.shape[-1]				).item()
      lowerCAmelCase__			:  List[Any]											= output_from_no_past[:, -3:, random_slice_idx].detach()
      lowerCAmelCase__			:  Dict											= output_from_past[:, :, random_slice_idx].detach()

      self.parent.assertTrue(output_from_past_slice.shape[1] == next_tokens.shape[1]				)

      # test that outputs are equal for slice
      self.parent.assertTrue(torch.allclose(lowerCamelCase__  ,lowerCamelCase__  ,atol=1E-3				)				)






  def 							UpperCAmelCase_     (   self				)   ->		Any:
      lowerCAmelCase__			:  Optional[Any]											= self.prepare_config_and_inputs()
      (
          lowerCAmelCase__			
      )			:  Dict											= config_and_inputs
      lowerCAmelCase__			:  int											= {'''input_ids''': input_ids, '''attention_mask''': input_mask}
      return config, inputs_dict







@require_torch
class 	lowerCAmelCase_(    __lowerCAmelCase						,			__lowerCAmelCase						,			__lowerCAmelCase						,			unittest.TestCase					):
  '''simple docstring'''




  __lowercase							:				int           =				(
      (OpenLlamaModel, OpenLlamaForCausalLM, OpenLlamaForSequenceClassification) if is_torch_available() else ()
  )
  __lowercase							:				Dict           =				(OpenLlamaForCausalLM,) if is_torch_available() else ()
  __lowercase							:				Any           =				(
      {
          "feature-extraction": OpenLlamaModel,
          "text-classification": OpenLlamaForSequenceClassification,
          "text-generation": OpenLlamaForCausalLM,
          "zero-shot": OpenLlamaForSequenceClassification,
      }
      if is_torch_available()
      else {}
  )
  __lowercase							:				str           =				False
  __lowercase							:				Any           =				False




  def 							UpperCAmelCase_     (   self				)   ->		Optional[int]:
      lowerCAmelCase__			:  Dict											= OpenLlamaModelTester(self				)
      lowerCAmelCase__			:  int											= ConfigTester(self  ,config_class=lowerCamelCase__  ,hidden_size=37				)




  def 							UpperCAmelCase_     (   self				)   ->		Tuple:
      self.config_tester.run_common_tests()




  def 							UpperCAmelCase_     (   self				)   ->		str:
      lowerCAmelCase__			:  List[Any]											= self.model_tester.prepare_config_and_inputs()
      self.model_tester.create_and_check_model(*lowerCamelCase__				)




  def 							UpperCAmelCase_     (   self				)   ->		Optional[Any]:
      lowerCAmelCase__			:  Union[str, Any]											= self.model_tester.prepare_config_and_inputs()
      for type in ["absolute", "relative_key", "relative_key_query"]:
          lowerCAmelCase__			:  List[Any]											= type
          self.model_tester.create_and_check_model(*lowerCamelCase__				)




  def 							UpperCAmelCase_     (   self				)   ->		str:
      lowerCAmelCase__			:  Dict											= self.model_tester.prepare_config_and_inputs_for_common()
      lowerCAmelCase__			:  str											= 3
      lowerCAmelCase__			:  Optional[Any]											= input_dict['''input_ids''']
      lowerCAmelCase__			:  str											= input_ids.ne(1				).to(lowerCamelCase__				)
      lowerCAmelCase__			:  int											= ids_tensor([self.model_tester.batch_size]  ,self.model_tester.type_sequence_label_size				)
      lowerCAmelCase__			:  str											= OpenLlamaForSequenceClassification(lowerCamelCase__				)
      model.to(lowerCamelCase__				)
      model.eval()
      lowerCAmelCase__			:  Dict											= model(lowerCamelCase__  ,attention_mask=lowerCamelCase__  ,labels=lowerCamelCase__				)
      self.assertEqual(result.logits.shape  ,(self.model_tester.batch_size, self.model_tester.num_labels)				)




  def 							UpperCAmelCase_     (   self				)   ->		str:
      lowerCAmelCase__			:  Dict											= self.model_tester.prepare_config_and_inputs_for_common()
      lowerCAmelCase__			:  str											= 3
      lowerCAmelCase__			:  Union[str, Any]											= '''single_label_classification'''
      lowerCAmelCase__			:  Any											= input_dict['''input_ids''']
      lowerCAmelCase__			:  str											= input_ids.ne(1				).to(lowerCamelCase__				)
      lowerCAmelCase__			:  Dict											= ids_tensor([self.model_tester.batch_size]  ,self.model_tester.type_sequence_label_size				)
      lowerCAmelCase__			:  Dict											= OpenLlamaForSequenceClassification(lowerCamelCase__				)
      model.to(lowerCamelCase__				)
      model.eval()
      lowerCAmelCase__			:  Dict											= model(lowerCamelCase__  ,attention_mask=lowerCamelCase__  ,labels=lowerCamelCase__				)
      self.assertEqual(result.logits.shape  ,(self.model_tester.batch_size, self.model_tester.num_labels)				)




  def 							UpperCAmelCase_     (   self				)   ->		List[Any]:
      lowerCAmelCase__			:  Optional[int]											= self.model_tester.prepare_config_and_inputs_for_common()
      lowerCAmelCase__			:  Optional[Any]											= 3
      lowerCAmelCase__			:  Any											= '''multi_label_classification'''
      lowerCAmelCase__			:  Union[str, Any]											= input_dict['''input_ids''']
      lowerCAmelCase__			:  List[Any]											= input_ids.ne(1				).to(lowerCamelCase__				)
      lowerCAmelCase__			:  str											= ids_tensor(
          [self.model_tester.batch_size, config.num_labels]  ,self.model_tester.type_sequence_label_size				).to(torch.float				)
      lowerCAmelCase__			:  Union[str, Any]											= OpenLlamaForSequenceClassification(lowerCamelCase__				)
      model.to(lowerCamelCase__				)
      model.eval()
      lowerCAmelCase__			:  str											= model(lowerCamelCase__  ,attention_mask=lowerCamelCase__  ,labels=lowerCamelCase__				)
      self.assertEqual(result.logits.shape  ,(self.model_tester.batch_size, self.model_tester.num_labels)				)




  @unittest.skip("""Open-Llama buffers include complex numbers, which breaks this test"""				)
  def 							UpperCAmelCase_     (   self				)   ->		int:
      pass






  @parameterized.expand([("""linear""",), ("""dynamic""",)]				)
  def 							UpperCAmelCase_     (   self  ,__UpperCAmelCase				)   ->		Union[str, Any]:
      lowerCAmelCase__			:  str											= self.model_tester.prepare_config_and_inputs_for_common()
      lowerCAmelCase__			:  Union[str, Any]											= ids_tensor([1, 10]  ,config.vocab_size				)
      lowerCAmelCase__			:  str											= ids_tensor([1, int(config.max_position_embeddings * 1.5				)]  ,config.vocab_size				)

      set_seed(42				)  # Fixed seed at init time so the two models get the same random weights
      lowerCAmelCase__			:  Optional[Any]											= OpenLlamaModel(lowerCamelCase__				)
      original_model.to(lowerCamelCase__				)
      original_model.eval()
      lowerCAmelCase__			:  List[str]											= original_model(lowerCamelCase__				).last_hidden_state
      lowerCAmelCase__			:  Optional[Any]											= original_model(lowerCamelCase__				).last_hidden_state

      set_seed(42				)  # Fixed seed at init time so the two models get the same random weights
      lowerCAmelCase__			:  List[Any]											= {'''type''': scaling_type, '''factor''': 1_0.0}
      lowerCAmelCase__			:  List[str]											= OpenLlamaModel(lowerCamelCase__				)
      scaled_model.to(lowerCamelCase__				)
      scaled_model.eval()
      lowerCAmelCase__			:  Any											= scaled_model(lowerCamelCase__				).last_hidden_state
      lowerCAmelCase__			:  Tuple											= scaled_model(lowerCamelCase__				).last_hidden_state

      # Dynamic scaling does not change the RoPE embeddings until it receives an input longer than the original
      # maximum sequence length, so the outputs for the short input should match.
      if scaling_type == "dynamic":
          self.assertTrue(torch.allclose(lowerCamelCase__  ,lowerCamelCase__  ,atol=1E-5				)				)
      else:
          self.assertFalse(torch.allclose(lowerCamelCase__  ,lowerCamelCase__  ,atol=1E-5				)				)

      # The output should be different for long inputs
      self.assertFalse(torch.allclose(lowerCamelCase__  ,lowerCamelCase__  ,atol=1E-5				)				)







'''simple docstring'''





from ..utils import DummyObject, requires_backends






class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				int           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Optional[int]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Optional[Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		str:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				str           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Optional[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Union[str, Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				int           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Tuple:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Dict           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Dict:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Optional[Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[str]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Optional[Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Dict           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Any:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Tuple           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Union[str, Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Optional[int]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[str]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Optional[Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Union[str, Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Optional[int]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[str]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				List[str]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Any:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Tuple           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[str]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Dict           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Union[str, Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Tuple           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		str:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				List[Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Optional[int]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				int           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Optional[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Tuple           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Dict:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				str           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Union[str, Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				List[str]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Any:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Optional[Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Optional[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Optional[int]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		str:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Any           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		int:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				List[Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[str]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Tuple           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		str:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				Optional[Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		Optional[int]:
      requires_backends(self  ,["""sentencepiece"""]				)







class 	lowerCAmelCase_(    metaclass=SCREAMING_SNAKE_CASE_					):
  '''simple docstring'''




  __lowercase							:				List[Any]           =				['''sentencepiece''']




  def __init__(   self  ,*__UpperCAmelCase  ,**__UpperCAmelCase				)   ->		List[Any]:
      requires_backends(self  ,["""sentencepiece"""]				)


