




import random
import unittest

import numpy as np
import torch

from diffusers import DDIMScheduler, LDMSuperResolutionPipeline, UNetaDModel, VQModel
from diffusers.utils import PIL_INTERPOLATION, floats_tensor, load_image, slow, torch_device
from diffusers.utils.testing_utils import enable_full_determinism, require_torch


enable_full_determinism()


class  lowerCamelCase     (		unittest.TestCase    ):






			'''simple docstring'''





			@property
			def 				UpperCAmelCase__							(			self      : List[Any]	)    -> Union[str, Any]:
								__magic_name__				:						Dict     				=				1
								__magic_name__				:						int     				=				3
								__magic_name__				:						List[Any]     				=				(32, 32)

								__magic_name__				:						Optional[Any]     				=				floats_tensor((batch_size, num_channels) + sizes							,    rng=random.Random(0	)	).to(lowerCamelCase_	)
								return image

			@property
			def 				UpperCAmelCase__							(			self      : List[Any]	)    -> List[str]:
								torch.manual_seed(0	)
								__magic_name__				:						Tuple     				=				UNetaDModel(
								    block_out_channels=(32, 64)							,    layers_per_block=2							,    sample_size=32							,    in_channels=6							,    out_channels=3							,    down_block_types=('''DownBlock2D''', '''AttnDownBlock2D''')							,    up_block_types=('''AttnUpBlock2D''', '''UpBlock2D''')							,    )
								return model

			@property
			def 				UpperCAmelCase__							(			self      : int	)    -> Any:
								torch.manual_seed(0	)
								__magic_name__				:						Tuple     				=				VQModel(
								    block_out_channels=[32, 64]							,    in_channels=3							,    out_channels=3							,    down_block_types=['''DownEncoderBlock2D''', '''DownEncoderBlock2D''']							,    up_block_types=['''UpDecoderBlock2D''', '''UpDecoderBlock2D''']							,    latent_channels=3							,    )
								return model

			def 				UpperCAmelCase__							(			self      : Optional[int]	)    -> int:
								__magic_name__				:						List[str]     				=				'''cpu'''
								__magic_name__				:						int     				=				self.dummy_uncond_unet
								__magic_name__				:						Optional[int]     				=				DDIMScheduler()
								__magic_name__				:						Optional[int]     				=				self.dummy_vq_model

								__magic_name__				:						List[str]     				=				LDMSuperResolutionPipeline(unet=lowerCamelCase_							,    vqvae=lowerCamelCase_							,    scheduler=lowerCamelCase_	)
								ldm.to(lowerCamelCase_	)
								ldm.set_progress_bar_config(disable=lowerCamelCase_	)

								__magic_name__				:						Any     				=				self.dummy_image.to(lowerCamelCase_	)

								__magic_name__				:						Optional[Any]     				=				torch.Generator(device=lowerCamelCase_	).manual_seed(0	)
								__magic_name__				:						Any     				=				ldm(image=lowerCamelCase_							,    generator=lowerCamelCase_							,    num_inference_steps=2							,    output_type='''numpy'''	).images

								__magic_name__				:						Tuple     				=				image[0, -3:, -3:, -1]

								assert image.shape == (1, 64, 64, 3)
								__magic_name__				:						Tuple     				=				np.array([0.8_6_7_8, 0.8_2_4_5, 0.6_3_8_1, 0.6_8_3_0, 0.4_3_8_5, 0.5_5_9_9, 0.4_6_4_1, 0.6_2_0_1, 0.5_1_5_0]	)

								assert np.abs(image_slice.flatten() - expected_slice	).max() < 1E-2


			@unittest.skipIf(torch_device != '''cuda'''							,    '''This test requires a GPU'''	)
			def 				UpperCAmelCase__							(			self      : Dict	)    -> int:
								__magic_name__				:						Optional[Any]     				=				self.dummy_uncond_unet
								__magic_name__				:						Optional[int]     				=				DDIMScheduler()
								__magic_name__				:						Tuple     				=				self.dummy_vq_model

								# put models in fp16
								__magic_name__				:						Optional[Any]     				=				unet.half()
								__magic_name__				:						Dict     				=				vqvae.half()

								__magic_name__				:						Union[str, Any]     				=				LDMSuperResolutionPipeline(unet=lowerCamelCase_							,    vqvae=lowerCamelCase_							,    scheduler=lowerCamelCase_	)
								ldm.to(lowerCamelCase_	)
								ldm.set_progress_bar_config(disable=lowerCamelCase_	)

								__magic_name__				:						Optional[int]     				=				self.dummy_image.to(lowerCamelCase_	)

								__magic_name__				:						Optional[Any]     				=				ldm(lowerCamelCase_							,    num_inference_steps=2							,    output_type='''numpy'''	).images

								assert image.shape == (1, 64, 64, 3)






@slow
@require_torch
class  lowerCamelCase     (		unittest.TestCase    ):






			'''simple docstring'''





			def 				UpperCAmelCase__							(			self      : int	)    -> int:
								__magic_name__				:						List[Any]     				=				load_image(
								    '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main'''
								    '''/vq_diffusion/teddy_bear_pool.png'''	)
								__magic_name__				:						Union[str, Any]     				=				init_image.resize((64, 64)							,    resample=PIL_INTERPOLATION['''lanczos''']	)

								__magic_name__				:						List[Any]     				=				LDMSuperResolutionPipeline.from_pretrained('''duongna/ldm-super-resolution'''							,    device_map='''auto'''	)
								ldm.set_progress_bar_config(disable=lowerCamelCase_	)

								__magic_name__				:						str     				=				torch.manual_seed(0	)
								__magic_name__				:						Dict     				=				ldm(image=lowerCamelCase_							,    generator=lowerCamelCase_							,    num_inference_steps=20							,    output_type='''numpy'''	).images

								__magic_name__				:						List[Any]     				=				image[0, -3:, -3:, -1]

								assert image.shape == (1, 256, 256, 3)
								__magic_name__				:						Dict     				=				np.array([0.7_6_4_4, 0.7_6_7_9, 0.7_6_4_2, 0.7_6_3_3, 0.7_6_6_6, 0.7_5_6_0, 0.7_4_2_5, 0.7_2_5_7, 0.6_9_0_7]	)

								assert np.abs(image_slice.flatten() - expected_slice	).max() < 1E-2









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






			'''simple docstring'''





			def __init__(			self      : Union[str, Any]							,    lowerCamelCase_      : List[Any]							,    lowerCamelCase_      : str=14							,    lowerCamelCase_      : str=7							,    lowerCamelCase_      : Dict=True							,    lowerCamelCase_      : Union[str, Any]=True							,    lowerCamelCase_      : Optional[int]=True							,    lowerCamelCase_      : Optional[int]=99							,    lowerCamelCase_      : List[str]=32							,    lowerCamelCase_      : Tuple=5							,    lowerCamelCase_      : str=4							,    lowerCamelCase_      : Optional[Any]=37							,    lowerCamelCase_      : str="gelu"							,    lowerCamelCase_      : List[str]=0.1							,    lowerCamelCase_      : Optional[Any]=0.1							,    lowerCamelCase_      : Any=512							,    lowerCamelCase_      : Optional[int]=0.0_2							,    lowerCamelCase_      : Dict=None							,    )    -> Optional[int]:
								__magic_name__				:						List[Any]     				=				parent
								__magic_name__				:						int     				=				batch_size
								__magic_name__				:						Union[str, Any]     				=				seq_length
								__magic_name__				:						Dict     				=				is_training
								__magic_name__				:						List[str]     				=				use_input_mask
								__magic_name__				:						Optional[Any]     				=				use_labels
								__magic_name__				:						List[Any]     				=				vocab_size
								__magic_name__				:						Optional[int]     				=				d_model
								__magic_name__				:						Tuple     				=				num_hidden_layers
								__magic_name__				:						Any     				=				num_attention_heads
								__magic_name__				:						int     				=				ffn_dim
								__magic_name__				:						List[Any]     				=				activation_function
								__magic_name__				:						Dict     				=				activation_dropout
								__magic_name__				:						int     				=				attention_dropout
								__magic_name__				:						List[str]     				=				max_position_embeddings
								__magic_name__				:						Union[str, Any]     				=				initializer_range
								__magic_name__				:						Optional[Any]     				=				None
								__magic_name__				:						Tuple     				=				0
								__magic_name__				:						List[str]     				=				2
								__magic_name__				:						Dict     				=				1

			def 				UpperCAmelCase__							(			self      : int	)    -> int:
								__magic_name__				:						Tuple     				=				np.clip(ids_tensor([self.batch_size, self.seq_length]							,    self.vocab_size	)							,    3							,    self.vocab_size	)

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

								__magic_name__				:						Union[str, Any]     				=				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=lowerCamelCase_							,    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      : Union[str, Any]	)    -> Tuple:
								__magic_name__				:						int     				=				self.prepare_config_and_inputs()
								__magic_name__				,     __magic_name__				,     __magic_name__				:						Tuple     				=				config_and_inputs
								__magic_name__				:						Any     				=				{'''input_ids''': input_ids, '''attention_mask''': attention_mask}
								return config, inputs_dict

			def 				UpperCAmelCase__							(			self      : Dict	)    -> Dict:
								__magic_name__				,     __magic_name__				,     __magic_name__				:						Dict     				=				self.prepare_config_and_inputs()

								__magic_name__				:						Any     				=				floats_tensor([self.batch_size, self.seq_length, self.hidden_size]	)
								__magic_name__				:						Optional[Any]     				=				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      : str							,    lowerCamelCase_      : Tuple							,    lowerCamelCase_      : Optional[int]							,    lowerCamelCase_      : Optional[int]							,    lowerCamelCase_      : Any	)    -> Dict:
								__magic_name__				:						Dict     				=				20
								__magic_name__				:						List[str]     				=				model_class_name(lowerCamelCase_	)

								__magic_name__				:						Any     				=				model.init_cache(input_ids.shape[0]							,    lowerCamelCase_	)
								__magic_name__				:						Tuple     				=				jnp.ones((input_ids.shape[0], max_decoder_length)							,    dtype='''i4'''	)

								__magic_name__				:						Union[str, Any]     				=				jnp.broadcast_to(
								    jnp.arange(input_ids.shape[-1] - 1	)[None, :]							,    (input_ids.shape[0], input_ids.shape[-1] - 1)	)
								__magic_name__				:						Dict     				=				model(
								    input_ids[:, :-1]							,    attention_mask=lowerCamelCase_							,    past_key_values=lowerCamelCase_							,    position_ids=lowerCamelCase_							,    )

								__magic_name__				:						Dict     				=				jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]							,    dtype='''i4'''	)
								__magic_name__				:						int     				=				model(
								    input_ids[:, -1:]							,    attention_mask=lowerCamelCase_							,    past_key_values=outputs_cache.past_key_values							,    position_ids=lowerCamelCase_							,    )

								__magic_name__				:						Optional[int]     				=				model(lowerCamelCase_	)

								__magic_name__				:						Union[str, Any]     				=				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      : Optional[int]							,    lowerCamelCase_      : Optional[Any]							,    lowerCamelCase_      : Tuple							,    lowerCamelCase_      : Optional[Any]							,    lowerCamelCase_      : Optional[int]	)    -> List[str]:
								__magic_name__				:						Optional[int]     				=				20
								__magic_name__				:						Optional[Any]     				=				model_class_name(lowerCamelCase_	)

								__magic_name__				:						Union[str, Any]     				=				jnp.concatenate(
								    [attention_mask, jnp.zeros((attention_mask.shape[0], max_decoder_length - attention_mask.shape[1])	)]							,    axis=-1							,    )

								__magic_name__				:						int     				=				model.init_cache(input_ids.shape[0]							,    lowerCamelCase_	)
								__magic_name__				:						Optional[int]     				=				jnp.broadcast_to(
								    jnp.arange(input_ids.shape[-1] - 1	)[None, :]							,    (input_ids.shape[0], input_ids.shape[-1] - 1)	)

								__magic_name__				:						Union[str, Any]     				=				model(
								    input_ids[:, :-1]							,    attention_mask=lowerCamelCase_							,    past_key_values=lowerCamelCase_							,    position_ids=lowerCamelCase_							,    )
								__magic_name__				:						Tuple     				=				jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]							,    dtype='''i4'''	)
								__magic_name__				:						Optional[int]     				=				model(
								    input_ids[:, -1:]							,    past_key_values=outputs_cache.past_key_values							,    attention_mask=lowerCamelCase_							,    position_ids=lowerCamelCase_							,    )

								__magic_name__				:						int     				=				model(lowerCamelCase_							,    attention_mask=lowerCamelCase_	)
								__magic_name__				:						List[Any]     				=				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  lowerCamelCase     (		_lowerCamelCase					,_lowerCamelCase					,unittest.TestCase    ):






			'''simple docstring'''





			UpperCamelCase__										=(FlaxXGLMModel, FlaxXGLMForCausalLM) if is_flax_available() else ()
			UpperCamelCase__										=(FlaxXGLMForCausalLM,) if is_flax_available() else ()

			def 				UpperCAmelCase__							(			self      : str	)    -> Tuple:
								__magic_name__				:						Tuple     				=				FlaxXGLMModelTester(self	)

			def 				UpperCAmelCase__							(			self      : Dict	)    -> List[str]:
								for model_class_name in self.all_model_classes:
													__magic_name__				,     __magic_name__				,     __magic_name__				:						Any     				=				self.model_tester.prepare_config_and_inputs()
													self.model_tester.check_use_cache_forward(lowerCamelCase_							,    lowerCamelCase_							,    lowerCamelCase_							,    lowerCamelCase_	)

			def 				UpperCAmelCase__							(			self      : List[str]	)    -> int:
								for model_class_name in self.all_model_classes:
													__magic_name__				,     __magic_name__				,     __magic_name__				:						int     				=				self.model_tester.prepare_config_and_inputs()
													self.model_tester.check_use_cache_forward_with_attn_mask(
													    lowerCamelCase_							,    lowerCamelCase_							,    lowerCamelCase_							,    lowerCamelCase_	)

			@slow
			def 				UpperCAmelCase__							(			self      : Any	)    -> Optional[Any]:
								__magic_name__				:						List[str]     				=				XGLMTokenizer.from_pretrained('''XGLM'''							,    padding_side='''left'''	)
								__magic_name__				:						Tuple     				=				tokenizer(['''Hello this is a long string''', '''Hey''']							,    return_tensors='''np'''							,    padding=lowerCamelCase_							,    truncation=lowerCamelCase_	)

								__magic_name__				:						Dict     				=				FlaxXGLMForCausalLM.from_pretrained('''facebook/xglm-564M'''	)
								__magic_name__				:						Optional[Any]     				=				1
								__magic_name__				:						str     				=				False

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

								__magic_name__				:						List[Any]     				=				jit_generate(inputs['''input_ids''']							,    attention_mask=inputs['''attention_mask''']	).sequences

								__magic_name__				:						Optional[Any]     				=				tokenizer.batch_decode(lowerCamelCase_							,    skip_special_tokens=lowerCamelCase_	)

								__magic_name__				:						Dict     				=				[
								    '''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(lowerCamelCase_							,    lowerCamelCase_	)

			@is_pt_flax_cross_test
			def 				UpperCAmelCase__							(			self      : Any	)    -> Union[str, Any]:
								__magic_name__				,     __magic_name__				:						List[str]     				=				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
																		__magic_name__				:						List[Any]     				=				self._prepare_for_class(lowerCamelCase_							,    lowerCamelCase_	)
																		__magic_name__				:						Tuple     				=				{k: torch.tensor(v.tolist()	) for k, v in prepared_inputs_dict.items()}

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

																		__magic_name__				,     __magic_name__				:						Optional[Any]     				=				pt_inputs['''input_ids'''].shape
																		__magic_name__				:						int     				=				np.random.randint(0							,    seq_length - 1							,    size=(batch_size,)	)
																		for batch_idx, start_index in enumerate(lowerCamelCase_	):
																							__magic_name__				:						Optional[int]     				=				0
																							__magic_name__				:						Optional[Any]     				=				1
																							__magic_name__				:						Optional[int]     				=				0
																							__magic_name__				:						str     				=				1
																		__magic_name__				:						List[str]     				=				pt_model_class(lowerCamelCase_	).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.
																		__magic_name__				:						str     				=				False
																		__magic_name__				:						Any     				=				model_class(lowerCamelCase_							,    dtype=jnp.floataa	)
																		__magic_name__				:						Optional[int]     				=				convert_pytorch_state_dict_to_flax(pt_model.state_dict()							,    lowerCamelCase_	)
																		__magic_name__				:						int     				=				fx_state

																		with torch.no_grad():
																							__magic_name__				:						Tuple     				=				pt_model(**lowerCamelCase_	).to_tuple()

																		__magic_name__				:						Optional[int]     				=				fx_model(**lowerCamelCase_	).to_tuple()
																		self.assertEqual(len(lowerCamelCase_	)							,    len(lowerCamelCase_	)							,    '''Output lengths differ between Flax and PyTorch'''	)
																		for fx_output, pt_output in zip(lowerCamelCase_							,    lowerCamelCase_	):
																							self.assert_almost_equals(fx_output[:, -1]							,    pt_output[:, -1].numpy()							,    4E-2	)

																		with tempfile.TemporaryDirectory() as tmpdirname:
																							pt_model.save_pretrained(lowerCamelCase_	)
																							__magic_name__				:						List[str]     				=				model_class.from_pretrained(lowerCamelCase_							,    from_pt=lowerCamelCase_	)

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

			@is_pt_flax_cross_test
			def 				UpperCAmelCase__							(			self      : int	)    -> List[str]:
								__magic_name__				,     __magic_name__				:						Tuple     				=				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
																		__magic_name__				:						List[Any]     				=				self._prepare_for_class(lowerCamelCase_							,    lowerCamelCase_	)
																		__magic_name__				:						Any     				=				{k: torch.tensor(v.tolist()	) for k, v in prepared_inputs_dict.items()}

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

																		__magic_name__				:						str     				=				pt_model_class(lowerCamelCase_	).eval()
																		__magic_name__				:						Any     				=				False
																		__magic_name__				:						Any     				=				model_class(lowerCamelCase_							,    dtype=jnp.floataa	)

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

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

																		with torch.no_grad():
																							__magic_name__				:						Any     				=				pt_model(**lowerCamelCase_	).to_tuple()

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

																		with tempfile.TemporaryDirectory() as tmpdirname:
																							fx_model.save_pretrained(lowerCamelCase_	)
																							__magic_name__				:						Union[str, Any]     				=				pt_model_class.from_pretrained(lowerCamelCase_							,    from_flax=lowerCamelCase_	)

																		with torch.no_grad():
																							__magic_name__				:						List[Any]     				=				pt_model_loaded(**lowerCamelCase_	).to_tuple()

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


			@slow
			def 				UpperCAmelCase__							(			self      : Dict	)    -> List[str]:
								for model_class_name in self.all_model_classes:
													__magic_name__				:						Union[str, Any]     				=				model_class_name.from_pretrained('''facebook/xglm-564M'''	)
													__magic_name__				:						Optional[int]     				=				model(np.ones((1, 1)	)	)
													self.assertIsNotNone(lowerCamelCase_	)



