
'''simple docstring'''

import tempfile
import unittest

import transformers
from transformers import XGLMConfig, XGLMTokenizer, is_flax_available, is_torch_available
from transformers.testing_utils import is_pt_flax_cross_test, require_flax, require_sentencepiece, slow

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


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

     from transformers.modeling_flax_pytorch_utils import (
         convert_pytorch_state_dict_to_flax,
         load_flax_weights_in_pytorch_model,
     )
     from transformers.models.xglm.modeling_flax_xglm import FlaxXGLMForCausalLM, FlaxXGLMModel


if is_torch_available():
     import torch


@require_flax
class 					a_					:




       def __init__(       self				,				snake_case_				,				snake_case_=1_4				,				snake_case_=7				,				snake_case_=True				,				snake_case_=True				,				snake_case_=True				,				snake_case_=9_9				,				snake_case_=3_2				,				snake_case_=5				,				snake_case_=4				,				snake_case_=3_7				,				snake_case_="gelu"				,				snake_case_=0.1				,				snake_case_=0.1				,				snake_case_=5_1_2				,				snake_case_=0.02				,				snake_case_=None				,				):
         _lowerCAmelCase    :					Any							=   parent
         _lowerCAmelCase    :					int							=   batch_size
         _lowerCAmelCase    :					List[str]							=   seq_length
         _lowerCAmelCase    :					Tuple							=   is_training
         _lowerCAmelCase    :					int							=   use_input_mask
         _lowerCAmelCase    :					str							=   use_labels
         _lowerCAmelCase    :					Tuple							=   vocab_size
         _lowerCAmelCase    :					Optional[Any]							=   d_model
         _lowerCAmelCase    :					int							=   num_hidden_layers
         _lowerCAmelCase    :					List[str]							=   num_attention_heads
         _lowerCAmelCase    :					Any							=   ffn_dim
         _lowerCAmelCase    :					List[Any]							=   activation_function
         _lowerCAmelCase    :					int							=   activation_dropout
         _lowerCAmelCase    :					List[Any]							=   attention_dropout
         _lowerCAmelCase    :					Dict							=   max_position_embeddings
         _lowerCAmelCase    :					int							=   initializer_range
         _lowerCAmelCase    :					List[str]							=   None
         _lowerCAmelCase    :					List[str]							=   0
         _lowerCAmelCase    :					Optional[int]							=   2
         _lowerCAmelCase    :					int							=   1




       def 							__UpperCamelCase    (       self					):
         _lowerCAmelCase    :					Optional[Any]							=   np.clip(ids_tensor([self.batch_size, self.seq_length]				,				self.vocab_size					)				,				3				,				self.vocab_size					)

         _lowerCAmelCase    :					Union[str, Any]							=   None
         if self.use_input_mask:
           _lowerCAmelCase    :					List[str]							=   random_attention_mask([self.batch_size, self.seq_length]					)

         _lowerCAmelCase    :					Optional[int]							=   XGLMConfig(
             vocab_size=self.vocab_size				,				d_model=self.hidden_size				,				num_layers=self.num_hidden_layers				,				attention_heads=self.num_attention_heads				,				ffn_dim=self.ffn_dim				,				activation_function=self.activation_function				,				activation_dropout=self.activation_dropout				,				attention_dropout=self.attention_dropout				,				max_position_embeddings=self.max_position_embeddings				,				initializer_range=self.initializer_range				,				use_cache=snake_case_				,				bos_token_id=self.bos_token_id				,				eos_token_id=self.eos_token_id				,				pad_token_id=self.pad_token_id				,				)

         return (config, input_ids, input_mask)




       def 							__UpperCamelCase    (       self					):
         _lowerCAmelCase    :					Optional[Any]							=   self.prepare_config_and_inputs()
         _lowerCAmelCase			,   _lowerCAmelCase			,   _lowerCAmelCase    :					str							=   config_and_inputs
         _lowerCAmelCase    :					Dict							=   {"""input_ids""": input_ids, """attention_mask""": attention_mask}
         return config, inputs_dict




       def 							__UpperCamelCase    (       self					):
         _lowerCAmelCase			,   _lowerCAmelCase			,   _lowerCAmelCase    :					int							=   self.prepare_config_and_inputs()

         _lowerCAmelCase    :					Union[str, Any]							=   floats_tensor([self.batch_size, self.seq_length, self.hidden_size]					)
         _lowerCAmelCase    :					str							=   ids_tensor([self.batch_size, self.seq_length]				,				vocab_size=2					)

         return (
             config,
             input_ids,
             attention_mask,
             encoder_hidden_states,
             encoder_attention_mask,
         )




       def 							__UpperCamelCase    (       self				,				snake_case_				,				snake_case_				,				snake_case_				,				snake_case_					):
         _lowerCAmelCase    :					str							=   2_0
         _lowerCAmelCase    :					Optional[Any]							=   model_class_name(snake_case_					)

         _lowerCAmelCase    :					Dict							=   model.init_cache(input_ids.shape[0]				,				snake_case_					)
         _lowerCAmelCase    :					int							=   jnp.ones((input_ids.shape[0], max_decoder_length)				,				dtype="""i4"""					)

         _lowerCAmelCase    :					List[Any]							=   jnp.broadcast_to(
             jnp.arange(input_ids.shape[-1] - 1					)[None, :]				,				(input_ids.shape[0], input_ids.shape[-1] - 1)					)
         _lowerCAmelCase    :					List[str]							=   model(
             input_ids[:, :-1]				,				attention_mask=snake_case_				,				past_key_values=snake_case_				,				position_ids=snake_case_				,				)

         _lowerCAmelCase    :					Optional[Any]							=   jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]				,				dtype="""i4"""					)
         _lowerCAmelCase    :					Tuple							=   model(
             input_ids[:, -1:]				,				attention_mask=snake_case_				,				past_key_values=outputs_cache.past_key_values				,				position_ids=snake_case_				,				)

         _lowerCAmelCase    :					List[str]							=   model(snake_case_					)

         _lowerCAmelCase    :					Optional[int]							=   np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])					)					)
         self.parent.assertTrue(diff < 1E-3				,				msg=f'Max diff is {diff}'					)







       def 							__UpperCamelCase    (       self				,				snake_case_				,				snake_case_				,				snake_case_				,				snake_case_					):
         _lowerCAmelCase    :					List[Any]							=   2_0
         _lowerCAmelCase    :					Optional[Any]							=   model_class_name(snake_case_					)

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

         _lowerCAmelCase    :					int							=   model.init_cache(input_ids.shape[0]				,				snake_case_					)
         _lowerCAmelCase    :					Any							=   jnp.broadcast_to(
             jnp.arange(input_ids.shape[-1] - 1					)[None, :]				,				(input_ids.shape[0], input_ids.shape[-1] - 1)					)

         _lowerCAmelCase    :					Any							=   model(
             input_ids[:, :-1]				,				attention_mask=snake_case_				,				past_key_values=snake_case_				,				position_ids=snake_case_				,				)
         _lowerCAmelCase    :					str							=   jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]				,				dtype="""i4"""					)
         _lowerCAmelCase    :					List[str]							=   model(
             input_ids[:, -1:]				,				past_key_values=outputs_cache.past_key_values				,				attention_mask=snake_case_				,				position_ids=snake_case_				,				)

         _lowerCAmelCase    :					Tuple							=   model(snake_case_				,				attention_mask=snake_case_					)
         _lowerCAmelCase    :					Tuple							=   np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])					)					)
         self.parent.assertTrue(diff < 1E-3				,				msg=f'Max diff is {diff}'					)



@require_sentencepiece
@require_flax
class 					a_					(_a							,     _a							,     unittest.TestCase      ):
       __lowerCAmelCase      :			Optional[Any]      = (FlaxXGLMModel, FlaxXGLMForCausalLM) if is_flax_available() else ()
       __lowerCAmelCase      :			Tuple      = (FlaxXGLMForCausalLM,) if is_flax_available() else ()




       def 							__UpperCamelCase    (       self					):
         _lowerCAmelCase    :					Union[str, Any]							=   FlaxXGLMModelTester(self					)




       def 							__UpperCamelCase    (       self					):
         for model_class_name in self.all_model_classes:
           _lowerCAmelCase			,   _lowerCAmelCase			,   _lowerCAmelCase    :					List[Any]							=   self.model_tester.prepare_config_and_inputs()
           self.model_tester.check_use_cache_forward(snake_case_				,				snake_case_				,				snake_case_				,				snake_case_					)




       def 							__UpperCamelCase    (       self					):
         for model_class_name in self.all_model_classes:
           _lowerCAmelCase			,   _lowerCAmelCase			,   _lowerCAmelCase    :					str							=   self.model_tester.prepare_config_and_inputs()
           self.model_tester.check_use_cache_forward_with_attn_mask(
               snake_case_				,				snake_case_				,				snake_case_				,				snake_case_					)




       @slow
       def 							__UpperCamelCase    (       self					):
         _lowerCAmelCase    :					Optional[int]							=   XGLMTokenizer.from_pretrained("""XGLM"""				,				padding_side="""left"""					)
         _lowerCAmelCase    :					Any							=   tokenizer(["""Hello this is a long string""", """Hey"""]				,				return_tensors="""np"""				,				padding=snake_case_				,				truncation=snake_case_					)

         _lowerCAmelCase    :					List[str]							=   FlaxXGLMForCausalLM.from_pretrained("""facebook/xglm-564M"""					)
         _lowerCAmelCase    :					List[Any]							=   1
         _lowerCAmelCase    :					Any							=   False

         _lowerCAmelCase    :					List[str]							=   jax.jit(model.generate					)

         _lowerCAmelCase    :					Any							=   jit_generate(inputs["""input_ids"""]				,				attention_mask=inputs["""attention_mask"""]					).sequences

         _lowerCAmelCase    :					Tuple							=   tokenizer.batch_decode(snake_case_				,				skip_special_tokens=snake_case_					)

         _lowerCAmelCase    :					Optional[int]							=   [
             """Hello this is a long string of questions, but I'm not sure if I'm""",
             """Hey, I'm a newbie to the forum and I'""",
         ]

         self.assertListEqual(snake_case_				,				snake_case_					)




       @is_pt_flax_cross_test
       def 							__UpperCamelCase    (       self					):
         _lowerCAmelCase			,   _lowerCAmelCase    :					Optional[Any]							=   self.model_tester.prepare_config_and_inputs_for_common()

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

             # load corresponding PyTorch class
             _lowerCAmelCase    :					Optional[Any]							=   model_class.__name__[4:]  # Skip the "Flax" at the beginning
             _lowerCAmelCase    :					Dict							=   getattr(snake_case_				,				snake_case_					)

             _lowerCAmelCase			,   _lowerCAmelCase    :					Tuple							=   pt_inputs["""input_ids"""].shape
             _lowerCAmelCase    :					Tuple							=   np.random.randint(0				,				seq_length - 1				,				size=(batch_size,)					)
             for batch_idx, start_index in enumerate(snake_case_					):
               _lowerCAmelCase    :					Dict							=   0
               _lowerCAmelCase    :					Optional[int]							=   1
               _lowerCAmelCase    :					List[str]							=   0
               _lowerCAmelCase    :					List[str]							=   1
             _lowerCAmelCase    :					Any							=   pt_model_class(snake_case_					).eval()
             # Flax models don't use the `use_cache` option and cache is not returned as a default.
             # So we disable `use_cache` here for PyTorch model.
             _lowerCAmelCase    :					Any							=   False
             _lowerCAmelCase    :					Optional[Any]							=   model_class(snake_case_				,				dtype=jnp.floataa					)
             _lowerCAmelCase    :					Dict							=   convert_pytorch_state_dict_to_flax(pt_model.state_dict()				,				snake_case_					)
             _lowerCAmelCase    :					str							=   fx_state

             with torch.no_grad():
               _lowerCAmelCase    :					Tuple							=   pt_model(**snake_case_					).to_tuple()

             _lowerCAmelCase    :					str							=   fx_model(**snake_case_					).to_tuple()
             self.assertEqual(len(snake_case_					)				,				len(snake_case_					)				,				"""Output lengths differ between Flax and PyTorch"""					)
             for fx_output, pt_output in zip(snake_case_				,				snake_case_					):
               self.assert_almost_equals(fx_output[:, -1]				,				pt_output[:, -1].numpy()				,				4E-2					)

             with tempfile.TemporaryDirectory() as tmpdirname:
               pt_model.save_pretrained(snake_case_					)
               _lowerCAmelCase    :					Union[str, Any]							=   model_class.from_pretrained(snake_case_				,				from_pt=snake_case_					)

             _lowerCAmelCase    :					int							=   fx_model_loaded(**snake_case_					).to_tuple()
             self.assertEqual(
                 len(snake_case_					)				,				len(snake_case_					)				,				"""Output lengths differ between Flax and PyTorch"""					)
             for fx_output_loaded, pt_output in zip(snake_case_				,				snake_case_					):
               self.assert_almost_equals(fx_output_loaded[:, -1]				,				pt_output[:, -1].numpy()				,				4E-2					)




       @is_pt_flax_cross_test
       def 							__UpperCamelCase    (       self					):
         _lowerCAmelCase			,   _lowerCAmelCase    :					Optional[int]							=   self.model_tester.prepare_config_and_inputs_for_common()
         for model_class in self.all_model_classes:
           with self.subTest(model_class.__name__					):
             # prepare inputs
             _lowerCAmelCase    :					List[Any]							=   self._prepare_for_class(snake_case_				,				snake_case_					)
             _lowerCAmelCase    :					List[Any]							=   {k: torch.tensor(v.tolist()					) for k, v in prepared_inputs_dict.items()}

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

             _lowerCAmelCase    :					List[str]							=   pt_model_class(snake_case_					).eval()
             _lowerCAmelCase    :					List[Any]							=   False
             _lowerCAmelCase    :					Tuple							=   model_class(snake_case_				,				dtype=jnp.floataa					)

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

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

             with torch.no_grad():
               _lowerCAmelCase    :					int							=   pt_model(**snake_case_					).to_tuple()

             _lowerCAmelCase    :					Union[str, Any]							=   fx_model(**snake_case_					).to_tuple()
             self.assertEqual(len(snake_case_					)				,				len(snake_case_					)				,				"""Output lengths differ between Flax and PyTorch"""					)
             for fx_output, pt_output in zip(snake_case_				,				snake_case_					):
               self.assert_almost_equals(fx_output[:, -1]				,				pt_output[:, -1].numpy()				,				4E-2					)

             with tempfile.TemporaryDirectory() as tmpdirname:
               fx_model.save_pretrained(snake_case_					)
               _lowerCAmelCase    :					int							=   pt_model_class.from_pretrained(snake_case_				,				from_flax=snake_case_					)

             with torch.no_grad():
               _lowerCAmelCase    :					List[str]							=   pt_model_loaded(**snake_case_					).to_tuple()

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







       @slow
       def 							__UpperCamelCase    (       self					):
         for model_class_name in self.all_model_classes:
           _lowerCAmelCase    :					Dict							=   model_class_name.from_pretrained("""facebook/xglm-564M"""					)
           _lowerCAmelCase    :					int							=   model(np.ones((1, 1)					)					)
           self.assertIsNotNone(snake_case_					)




'''simple docstring'''

import argparse

import torch
from clip import load

from transformers import CLIPConfig, CLIPModel


def 		_UpperCAmelCase			(					_lowerCamelCase  :    str					, _lowerCamelCase  :    Dict						)      ->  List[Any]:
  _lowerCAmelCase			,   _lowerCAmelCase			,   _lowerCAmelCase    :					List[Any]							=   pt_attn_layer.in_proj_weight.chunk(3					, dim=0						)
  _lowerCAmelCase			,   _lowerCAmelCase			,   _lowerCAmelCase    :					List[str]							=   pt_attn_layer.in_proj_bias.chunk(3					, dim=0						)

  _lowerCAmelCase    :					Optional[Any]							=   pt_attn_layer.out_proj.weight
  _lowerCAmelCase    :					List[Any]							=   pt_attn_layer.out_proj.bias

  _lowerCAmelCase    :					Union[str, Any]							=   q_proj
  _lowerCAmelCase    :					Optional[Any]							=   q_proj_bias

  _lowerCAmelCase    :					List[Any]							=   k_proj
  _lowerCAmelCase    :					Optional[int]							=   k_proj_bias

  _lowerCAmelCase    :					int							=   v_proj
  _lowerCAmelCase    :					Dict							=   v_proj_bias

  _lowerCAmelCase    :					str							=   out_proj_weights
  _lowerCAmelCase    :					Union[str, Any]							=   out_proj_bias


def 		_UpperCAmelCase			(					_lowerCamelCase  :    List[Any]					, _lowerCamelCase  :    List[Any]						)      ->  Dict:
  copy_linear(hf_mlp.fca					, pt_mlp.c_fc						)
  copy_linear(hf_mlp.fca					, pt_mlp.c_proj						)


def 		_UpperCAmelCase			(					_lowerCamelCase  :    Union[str, Any]					, _lowerCamelCase  :    List[str]						)      ->  Optional[Any]:
  _lowerCAmelCase    :					List[str]							=   pt_linear.weight
  _lowerCAmelCase    :					Union[str, Any]							=   pt_linear.bias


def 		_UpperCAmelCase			(					_lowerCamelCase  :    Optional[Any]					, _lowerCamelCase  :    int						)      ->  Optional[Any]:
  # copy layer norms
  copy_linear(hf_layer.layer_norma					, pt_layer.ln_a						)
  copy_linear(hf_layer.layer_norma					, pt_layer.ln_a						)

  # copy MLP
  copy_mlp(hf_layer.mlp					, pt_layer.mlp						)

  # copy attn
  copy_attn_layer(hf_layer.self_attn					, pt_layer.attn						)


def 		_UpperCAmelCase			(					_lowerCamelCase  :    Optional[int]					, _lowerCamelCase  :    Union[str, Any]						)      ->  Optional[Any]:
  for hf_layer, pt_layer in zip(_lowerCamelCase					, _lowerCamelCase						):
    copy_layer(_lowerCamelCase					, _lowerCamelCase						)


def 		_UpperCAmelCase			(					_lowerCamelCase  :    List[Any]					, _lowerCamelCase  :    Tuple						)      ->  Optional[int]:
  # copy  embeds
  _lowerCAmelCase    :					Optional[int]							=   pt_model.token_embedding.weight
  _lowerCAmelCase    :					List[str]							=   pt_model.positional_embedding

  # copy layer norm
  copy_linear(hf_encoder.final_layer_norm					, pt_model.ln_final						)

  # copy hidden layers
  copy_layers(hf_encoder.encoder.layers					, pt_model.transformer.resblocks						)


def 		_UpperCAmelCase			(					_lowerCamelCase  :    Dict					, _lowerCamelCase  :    Tuple						)      ->  Tuple:
  # copy projection
  _lowerCAmelCase    :					Any							=   pt_model.text_projection.data.T

  # copy text encoder
  copy_encoder(hf_model.text_model					, _lowerCamelCase						)


def 		_UpperCAmelCase			(					_lowerCamelCase  :    Dict					, _lowerCamelCase  :    Union[str, Any]						)      ->  List[Any]:
  # copy projection
  _lowerCAmelCase    :					List[str]							=   pt_model.visual.proj.data.T

  # copy layer norms
  copy_linear(hf_model.vision_model.pre_layrnorm					, pt_model.visual.ln_pre						)
  copy_linear(hf_model.vision_model.post_layernorm					, pt_model.visual.ln_post						)

  # copy embeds
  _lowerCAmelCase    :					List[Any]							=   pt_model.visual.conva.weight.data
  _lowerCAmelCase    :					List[str]							=   pt_model.visual.class_embedding
  _lowerCAmelCase    :					int							=   pt_model.visual.positional_embedding.data

  # copy encoder
  copy_layers(hf_model.vision_model.encoder.layers					, pt_model.visual.transformer.resblocks						)


@torch.no_grad()
def 		_UpperCAmelCase			(					_lowerCamelCase  :    Union[str, Any]					, _lowerCamelCase  :    List[str]					, _lowerCamelCase  :    Any=None						)      ->  int:
  if config_path is not None:
    _lowerCAmelCase    :					Optional[int]							=   CLIPConfig.from_pretrained(_lowerCamelCase						)
  else:
    _lowerCAmelCase    :					int							=   CLIPConfig(projection_dim=5_12					, text_config={}					, vision_config={}						)

  _lowerCAmelCase    :					Optional[int]							=   CLIPModel(_lowerCamelCase						).eval()

  _lowerCAmelCase			,   _lowerCAmelCase    :					List[str]							=   load(_lowerCamelCase					, device="""cpu"""					, jit=_lowerCamelCase						)
  _lowerCAmelCase    :					List[Any]							=   pt_model.eval()

  copy_text_model_and_projection(_lowerCamelCase					, _lowerCamelCase						)
  copy_vison_model_and_projection(_lowerCamelCase					, _lowerCamelCase						)
  _lowerCAmelCase    :					Tuple							=   pt_model.logit_scale

  _lowerCAmelCase    :					List[str]							=   torch.arange(0					, 77						).unsqueeze(0						)
  _lowerCAmelCase    :					int							=   torch.randn(1					, 3					, 2_24					, 2_24						)

  _lowerCAmelCase    :					List[str]							=   hf_model(input_ids=_lowerCamelCase					, pixel_values=_lowerCamelCase					, return_dict=_lowerCamelCase						)
  _lowerCAmelCase    :					Union[str, Any]							=   hf_outputs.logits_per_image
  _lowerCAmelCase    :					List[str]							=   hf_outputs.logits_per_text
  _lowerCAmelCase			,   _lowerCAmelCase    :					Tuple							=   pt_model(_lowerCamelCase					, _lowerCamelCase						)

  assert torch.allclose(_lowerCamelCase					, _lowerCamelCase					, atol=1e-3						)
  assert torch.allclose(_lowerCamelCase					, _lowerCamelCase					, atol=1e-3						)

  hf_model.save_pretrained(_lowerCamelCase						)


if __name__ == "__main__":
     UpperCamelCase_            =    argparse.ArgumentParser()
     parser.add_argument("""--pytorch_dump_folder_path""", default=None, type=str, help="""Path to the output PyTorch model.""")
     parser.add_argument("""--checkpoint_path""", default=None, type=str, help="""Path to fairseq checkpoint""")
     parser.add_argument("""--config_path""", default=None, type=str, help="""Path to hf config.json of model to convert""")
     UpperCamelCase_            =    parser.parse_args()

     convert_clip_checkpoint(args.checkpoint_path, args.pytorch_dump_folder_path, args.config_path)


