

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 	UpperCAmelCase__		:






  """simple docstring"""


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






  def 				lowercase_		(							self						:		Optional[int] )		->							Optional[int]:
       SCREAMING_SNAKE_CASE__   =   ids_tensor([self.batch_size, self.seq_length]     ,       self.vocab_size )

       SCREAMING_SNAKE_CASE__   =   None
       if self.use_input_mask:
            SCREAMING_SNAKE_CASE__   =   random_attention_mask([self.batch_size, self.seq_length] )

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

       SCREAMING_SNAKE_CASE__   =   None
       SCREAMING_SNAKE_CASE__   =   None
       SCREAMING_SNAKE_CASE__   =   None
       if self.use_labels:
            SCREAMING_SNAKE_CASE__   =   ids_tensor([self.batch_size]     ,       self.type_sequence_label_size )
            SCREAMING_SNAKE_CASE__   =   ids_tensor([self.batch_size, self.seq_length]     ,       self.num_labels )
            SCREAMING_SNAKE_CASE__   =   ids_tensor([self.batch_size]     ,       self.num_choices )

       SCREAMING_SNAKE_CASE__   =   self.get_config()

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






  def 				lowercase_		(							self						:		int )		->							Any:
       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 				lowercase_		(							self						:		Union[str, Any]     ,       __lowerCamelCase						:		Optional[Any]     ,       __lowerCamelCase						:		int     ,       __lowerCamelCase						:		Union[str, Any]     ,       __lowerCamelCase						:		Any     ,       __lowerCamelCase						:		Optional[int]     ,       __lowerCamelCase						:		List[Any]     ,       __lowerCamelCase						:		str )		->							Optional[int]:
       SCREAMING_SNAKE_CASE__   =   OpenLlamaModel(config=__lowerCamelCase )
       model.to(__lowerCamelCase )
       model.eval()
       SCREAMING_SNAKE_CASE__   =   model(__lowerCamelCase     ,       attention_mask=__lowerCamelCase )
       SCREAMING_SNAKE_CASE__   =   model(__lowerCamelCase )
       self.parent.assertEqual(result.last_hidden_state.shape     ,       (self.batch_size, self.seq_length, self.hidden_size) )






  def 				lowercase_		(							self						:		Any     ,       __lowerCamelCase						:		Any     ,       __lowerCamelCase						:		int     ,       __lowerCamelCase						:		List[str]     ,       __lowerCamelCase						:		Any     ,       __lowerCamelCase						:		int     ,       __lowerCamelCase						:		List[str]     ,       __lowerCamelCase						:		Optional[Any]     ,       __lowerCamelCase						:		str     ,       __lowerCamelCase						:		Optional[int]     ,       )		->							Union[str, Any]:
       SCREAMING_SNAKE_CASE__   =   True
       SCREAMING_SNAKE_CASE__   =   OpenLlamaModel(__lowerCamelCase )
       model.to(__lowerCamelCase )
       model.eval()
       SCREAMING_SNAKE_CASE__   =   model(
           __lowerCamelCase     ,       attention_mask=__lowerCamelCase     ,       encoder_hidden_states=__lowerCamelCase     ,       encoder_attention_mask=__lowerCamelCase     ,       )
       SCREAMING_SNAKE_CASE__   =   model(
           __lowerCamelCase     ,       attention_mask=__lowerCamelCase     ,       encoder_hidden_states=__lowerCamelCase     ,       )
       SCREAMING_SNAKE_CASE__   =   model(__lowerCamelCase     ,       attention_mask=__lowerCamelCase )
       self.parent.assertEqual(result.last_hidden_state.shape     ,       (self.batch_size, self.seq_length, self.hidden_size) )






  def 				lowercase_		(							self						:		Union[str, Any]     ,       __lowerCamelCase						:		Tuple     ,       __lowerCamelCase						:		int     ,       __lowerCamelCase						:		List[str]     ,       __lowerCamelCase						:		Tuple     ,       __lowerCamelCase						:		Optional[Any]     ,       __lowerCamelCase						:		List[Any]     ,       __lowerCamelCase						:		int     ,       __lowerCamelCase						:		Tuple     ,       __lowerCamelCase						:		Any     ,       )		->							Any:
       SCREAMING_SNAKE_CASE__   =   OpenLlamaForCausalLM(config=__lowerCamelCase )
       model.to(__lowerCamelCase )
       model.eval()
       SCREAMING_SNAKE_CASE__   =   model(__lowerCamelCase     ,       attention_mask=__lowerCamelCase     ,       labels=__lowerCamelCase )
       self.parent.assertEqual(result.logits.shape     ,       (self.batch_size, self.seq_length, self.vocab_size) )






  def 				lowercase_		(							self						:		List[str]     ,       __lowerCamelCase						:		Dict     ,       __lowerCamelCase						:		Optional[Any]     ,       __lowerCamelCase						:		Dict     ,       __lowerCamelCase						:		Any     ,       __lowerCamelCase						:		List[Any]     ,       __lowerCamelCase						:		Any     ,       __lowerCamelCase						:		Any     ,       __lowerCamelCase						:		int     ,       __lowerCamelCase						:		Any     ,       )		->							Optional[Any]:
       SCREAMING_SNAKE_CASE__   =   True
       SCREAMING_SNAKE_CASE__   =   True
       SCREAMING_SNAKE_CASE__   =   OpenLlamaForCausalLM(config=__lowerCamelCase )
       model.to(__lowerCamelCase )
       model.eval()

       # first forward pass
       SCREAMING_SNAKE_CASE__   =   model(
           __lowerCamelCase     ,       attention_mask=__lowerCamelCase     ,       encoder_hidden_states=__lowerCamelCase     ,       encoder_attention_mask=__lowerCamelCase     ,       use_cache=__lowerCamelCase     ,       )
       SCREAMING_SNAKE_CASE__   =   outputs.past_key_values

       # create hypothetical multiple next token and extent to next_input_ids
       SCREAMING_SNAKE_CASE__   =   ids_tensor((self.batch_size, 3)     ,       config.vocab_size )
       SCREAMING_SNAKE_CASE__   =   ids_tensor((self.batch_size, 3)     ,       vocab_size=2 )

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

       SCREAMING_SNAKE_CASE__   =   model(
           __lowerCamelCase     ,       attention_mask=__lowerCamelCase     ,       encoder_hidden_states=__lowerCamelCase     ,       encoder_attention_mask=__lowerCamelCase     ,       output_hidden_states=__lowerCamelCase     ,       )['''hidden_states'''][0]
       SCREAMING_SNAKE_CASE__   =   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
       SCREAMING_SNAKE_CASE__   =   ids_tensor((1,)     ,       output_from_past.shape[-1] ).item()
       SCREAMING_SNAKE_CASE__   =   output_from_no_past[:, -3:, random_slice_idx].detach()
       SCREAMING_SNAKE_CASE__   =   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 				lowercase_		(							self						:		Union[str, Any] )		->							List[Any]:
       SCREAMING_SNAKE_CASE__   =   self.prepare_config_and_inputs()
       (
           (
           SCREAMING_SNAKE_CASE__
       ),(
           SCREAMING_SNAKE_CASE__
       ),(
           SCREAMING_SNAKE_CASE__
       ),(
           SCREAMING_SNAKE_CASE__
       ),(
           SCREAMING_SNAKE_CASE__
       ),(
           SCREAMING_SNAKE_CASE__
       ),(
           SCREAMING_SNAKE_CASE__
       ),
       )   =   config_and_inputs
       SCREAMING_SNAKE_CASE__   =   {'''input_ids''': input_ids, '''attention_mask''': input_mask}
       return config, inputs_dict






@require_torch
class 	UpperCAmelCase__		(	A__						,					A__						,					A__						,					unittest.TestCase	):






  """simple docstring"""


  a									= (
      (OpenLlamaModel, OpenLlamaForCausalLM, OpenLlamaForSequenceClassification) if is_torch_available() else ()
  )
  a									= (OpenLlamaForCausalLM,) if is_torch_available() else ()
  a									= (
      {
          "feature-extraction": OpenLlamaModel,
          "text-classification": OpenLlamaForSequenceClassification,
          "text-generation": OpenLlamaForCausalLM,
          "zero-shot": OpenLlamaForSequenceClassification,
      }
      if is_torch_available()
      else {}
  )
  a									= False
  a									= False






  def 				lowercase_		(							self						:		Optional[Any] )		->							Dict:
       SCREAMING_SNAKE_CASE__   =   OpenLlamaModelTester(self )
       SCREAMING_SNAKE_CASE__   =   ConfigTester(self     ,       config_class=__lowerCamelCase     ,       hidden_size=37 )






  def 				lowercase_		(							self						:		Dict )		->							List[Any]:
       self.config_tester.run_common_tests()






  def 				lowercase_		(							self						:		Tuple )		->							Optional[Any]:
       SCREAMING_SNAKE_CASE__   =   self.model_tester.prepare_config_and_inputs()
       self.model_tester.create_and_check_model(*__lowerCamelCase )






  def 				lowercase_		(							self						:		Tuple )		->							List[Any]:
       SCREAMING_SNAKE_CASE__   =   self.model_tester.prepare_config_and_inputs()
       for type in ["absolute", "relative_key", "relative_key_query"]:
            SCREAMING_SNAKE_CASE__   =   type
            self.model_tester.create_and_check_model(*__lowerCamelCase )






  def 				lowercase_		(							self						:		Tuple )		->							Optional[Any]:
       SCREAMING_SNAKE_CASE__,SCREAMING_SNAKE_CASE__   =   self.model_tester.prepare_config_and_inputs_for_common()
       SCREAMING_SNAKE_CASE__   =   3
       SCREAMING_SNAKE_CASE__   =   input_dict['''input_ids''']
       SCREAMING_SNAKE_CASE__   =   input_ids.ne(1 ).to(__lowerCamelCase )
       SCREAMING_SNAKE_CASE__   =   ids_tensor([self.model_tester.batch_size]     ,       self.model_tester.type_sequence_label_size )
       SCREAMING_SNAKE_CASE__   =   OpenLlamaForSequenceClassification(__lowerCamelCase )
       model.to(__lowerCamelCase )
       model.eval()
       SCREAMING_SNAKE_CASE__   =   model(__lowerCamelCase     ,       attention_mask=__lowerCamelCase     ,       labels=__lowerCamelCase )
       self.assertEqual(result.logits.shape     ,       (self.model_tester.batch_size, self.model_tester.num_labels) )






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






  def 				lowercase_		(							self						:		int )		->							int:
       SCREAMING_SNAKE_CASE__,SCREAMING_SNAKE_CASE__   =   self.model_tester.prepare_config_and_inputs_for_common()
       SCREAMING_SNAKE_CASE__   =   3
       SCREAMING_SNAKE_CASE__   =   '''multi_label_classification'''
       SCREAMING_SNAKE_CASE__   =   input_dict['''input_ids''']
       SCREAMING_SNAKE_CASE__   =   input_ids.ne(1 ).to(__lowerCamelCase )
       SCREAMING_SNAKE_CASE__   =   ids_tensor(
           [self.model_tester.batch_size, config.num_labels]     ,       self.model_tester.type_sequence_label_size ).to(torch.float )
       SCREAMING_SNAKE_CASE__   =   OpenLlamaForSequenceClassification(__lowerCamelCase )
       model.to(__lowerCamelCase )
       model.eval()
       SCREAMING_SNAKE_CASE__   =   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 				lowercase_		(							self						:		List[Any] )		->							Optional[int]:
       pass







  @parameterized.expand([('''linear''',), ('''dynamic''',)] )
  def 				lowercase_		(							self						:		List[Any]     ,       __lowerCamelCase						:		Any )		->							Union[str, Any]:
       SCREAMING_SNAKE_CASE__,SCREAMING_SNAKE_CASE__   =   self.model_tester.prepare_config_and_inputs_for_common()
       SCREAMING_SNAKE_CASE__   =   ids_tensor([1, 10]     ,       config.vocab_size )
       SCREAMING_SNAKE_CASE__   =   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
       SCREAMING_SNAKE_CASE__   =   OpenLlamaModel(__lowerCamelCase )
       original_model.to(__lowerCamelCase )
       original_model.eval()
       SCREAMING_SNAKE_CASE__   =   original_model(__lowerCamelCase ).last_hidden_state
       SCREAMING_SNAKE_CASE__   =   original_model(__lowerCamelCase ).last_hidden_state

       set_seed(42 )  # Fixed seed at init time so the two models get the same random weights
       SCREAMING_SNAKE_CASE__   =   {'''type''': scaling_type, '''factor''': 10.0}
       SCREAMING_SNAKE_CASE__   =   OpenLlamaModel(__lowerCamelCase )
       scaled_model.to(__lowerCamelCase )
       scaled_model.eval()
       SCREAMING_SNAKE_CASE__   =   scaled_model(__lowerCamelCase ).last_hidden_state
       SCREAMING_SNAKE_CASE__   =   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 ) )





import argparse
import os
import pickle
import sys

import torch

from transformers import TransfoXLConfig, TransfoXLLMHeadModel, load_tf_weights_in_transfo_xl
from transformers.models.transfo_xl import tokenization_transfo_xl as data_utils
from transformers.models.transfo_xl.tokenization_transfo_xl import CORPUS_NAME, VOCAB_FILES_NAMES
from transformers.utils import CONFIG_NAME, WEIGHTS_NAME, logging


logging.set_verbosity_info()

# We do this to be able to load python 2 datasets pickles
# See e.g. https://stackoverflow.com/questions/2121874/python-pickling-after-changing-a-modules-directory/2121918#2121918
_SCREAMING_SNAKE_CASE					:  Tuple             =      data_utils.TransfoXLTokenizer
_SCREAMING_SNAKE_CASE					:  Dict             =      data_utils.TransfoXLCorpus
_SCREAMING_SNAKE_CASE					:  Union[str, Any]             =      data_utils
_SCREAMING_SNAKE_CASE					:  Any             =      data_utils
def     UpperCAmelCase_       (						_A				,		_A				,		_A				,		_A    ):





     '''simple docstring'''




     if transfo_xl_dataset_file:
          # Convert a pre-processed corpus (see original TensorFlow repo)
          with open(_A				,		'''rb'''    ) as fp:
               SCREAMING_SNAKE_CASE__   =   pickle.load(_A				,		encoding='''latin1'''    )
          # Save vocabulary and dataset cache as Dictionaries (should be better than pickles for the long-term)
          SCREAMING_SNAKE_CASE__   =   pytorch_dump_folder_path + '''/''' + VOCAB_FILES_NAMES['''pretrained_vocab_file''']
          print(F'''Save vocabulary to {pytorch_vocab_dump_path}'''    )
          SCREAMING_SNAKE_CASE__   =   corpus.vocab.__dict__
          torch.save(_A				,		_A    )

          SCREAMING_SNAKE_CASE__   =   corpus.__dict__
          corpus_dict_no_vocab.pop('''vocab'''				,		_A    )
          SCREAMING_SNAKE_CASE__   =   pytorch_dump_folder_path + '''/''' + CORPUS_NAME
          print(F'''Save dataset to {pytorch_dataset_dump_path}'''    )
          torch.save(_A				,		_A    )

     if tf_checkpoint_path:
          # Convert a pre-trained TensorFlow model
          SCREAMING_SNAKE_CASE__   =   os.path.abspath(_A    )
          SCREAMING_SNAKE_CASE__   =   os.path.abspath(_A    )

          print(F'''Converting Transformer XL checkpoint from {tf_path} with config at {config_path}.'''    )
          # Initialise PyTorch model
          if transfo_xl_config_file == "":
               SCREAMING_SNAKE_CASE__   =   TransfoXLConfig()
          else:
               SCREAMING_SNAKE_CASE__   =   TransfoXLConfig.from_json_file(_A    )
          print(F'''Building PyTorch model from configuration: {config}'''    )
          SCREAMING_SNAKE_CASE__   =   TransfoXLLMHeadModel(_A    )

          SCREAMING_SNAKE_CASE__   =   load_tf_weights_in_transfo_xl(_A				,		_A				,		_A    )
          # Save pytorch-model
          SCREAMING_SNAKE_CASE__   =   os.path.join(_A				,		_A    )
          SCREAMING_SNAKE_CASE__   =   os.path.join(_A				,		_A    )
          print(F'''Save PyTorch model to {os.path.abspath(_A    )}'''    )
          torch.save(model.state_dict()				,		_A    )
          print(F'''Save configuration file to {os.path.abspath(_A    )}'''    )
          with open(_A				,		'''w'''				,		encoding='''utf-8'''    ) as f:
               f.write(config.to_json_string()    )


if __name__ == "__main__":
       _SCREAMING_SNAKE_CASE					:  Any             =      argparse.ArgumentParser()
       parser.add_argument(
           '''--pytorch_dump_folder_path''',
           default=None,
           type=str,
           required=True,
           help='''Path to the folder to store the PyTorch model or dataset/vocab.''',
       )
       parser.add_argument(
           '''--tf_checkpoint_path''',
           default='''''',
           type=str,
           help='''An optional path to a TensorFlow checkpoint path to be converted.''',
       )
       parser.add_argument(
           '''--transfo_xl_config_file''',
           default='''''',
           type=str,
           help=(
               '''An optional config json file corresponding to the pre-trained BERT model. \n'''
               '''This specifies the model architecture.'''
           ),
       )
       parser.add_argument(
           '''--transfo_xl_dataset_file''',
           default='''''',
           type=str,
           help='''An optional dataset file to be converted in a vocabulary.''',
       )
       _SCREAMING_SNAKE_CASE					:  Union[str, Any]             =      parser.parse_args()
       convert_transfo_xl_checkpoint_to_pytorch(
           args.tf_checkpoint_path,
           args.transfo_xl_config_file,
           args.pytorch_dump_folder_path,
           args.transfo_xl_dataset_file,
       )


