


from typing import List, Optional, Union

import numpy as np
import PIL
import torch
from PIL import Image

from ...models import UNetaDConditionModel, VQModel
from ...pipelines import DiffusionPipeline
from ...pipelines.pipeline_utils import ImagePipelineOutput
from ...schedulers import DDPMScheduler
from ...utils import (
    is_accelerate_available,
    is_accelerate_version,
    logging,
    randn_tensor,
    replace_example_docstring,
)


lowercase_           =	logging.get_logger(__name__)  # pylint: disable=invalid-name

lowercase_           =	'\n    Examples:\n        ```py\n        >>> import torch\n        >>> import numpy as np\n\n        >>> from diffusers import KandinskyV22PriorEmb2EmbPipeline, KandinskyV22ControlnetImg2ImgPipeline\n        >>> from transformers import pipeline\n        >>> from diffusers.utils import load_image\n\n\n        >>> def make_hint(image, depth_estimator):\n        ...     image = depth_estimator(image)["depth"]\n        ...     image = np.array(image)\n        ...     image = image[:, :, None]\n        ...     image = np.concatenate([image, image, image], axis=2)\n        ...     detected_map = torch.from_numpy(image).float() / 255.0\n        ...     hint = detected_map.permute(2, 0, 1)\n        ...     return hint\n\n\n        >>> depth_estimator = pipeline("depth-estimation")\n\n        >>> pipe_prior = KandinskyV22PriorEmb2EmbPipeline.from_pretrained(\n        ...     "kandinsky-community/kandinsky-2-2-prior", torch_dtype=torch.float16\n        ... )\n        >>> pipe_prior = pipe_prior.to("cuda")\n\n        >>> pipe = KandinskyV22ControlnetImg2ImgPipeline.from_pretrained(\n        ...     "kandinsky-community/kandinsky-2-2-controlnet-depth", torch_dtype=torch.float16\n        ... )\n        >>> pipe = pipe.to("cuda")\n\n        >>> img = load_image(\n        ...     "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"\n        ...     "/kandinsky/cat.png"\n        ... ).resize((768, 768))\n\n\n        >>> hint = make_hint(img, depth_estimator).unsqueeze(0).half().to("cuda")\n\n        >>> prompt = "A robot, 4k photo"\n        >>> negative_prior_prompt = "lowres, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature"\n\n        >>> generator = torch.Generator(device="cuda").manual_seed(43)\n\n        >>> img_emb = pipe_prior(prompt=prompt, image=img, strength=0.85, generator=generator)\n        >>> negative_emb = pipe_prior(prompt=negative_prior_prompt, image=img, strength=1, generator=generator)\n\n        >>> images = pipe(\n        ...     image=img,\n        ...     strength=0.5,\n        ...     image_embeds=img_emb.image_embeds,\n        ...     negative_image_embeds=negative_emb.image_embeds,\n        ...     hint=hint,\n        ...     num_inference_steps=50,\n        ...     generator=generator,\n        ...     height=768,\n        ...     width=768,\n        ... ).images\n\n        >>> images[0].save("robot_cat.png")\n        ```\n'
def       UpperCamelCase__     (  SCREAMING_SNAKE_CASE__			,       SCREAMING_SNAKE_CASE__			,       SCREAMING_SNAKE_CASE__=8						):
 __lowerCamelCase		:							str							=						height // scale_factor**2
 if height % scale_factor**2 != 0:
  new_height += 1
 __lowerCamelCase		:							List[str]							=						width // scale_factor**2
 if width % scale_factor**2 != 0:
  new_width += 1
 return new_height * scale_factor, new_width * scale_factor
def       UpperCamelCase__     (  SCREAMING_SNAKE_CASE__			,       SCREAMING_SNAKE_CASE__=512			,       SCREAMING_SNAKE_CASE__=512						):
 __lowerCamelCase		:							Tuple							=						pil_image.resize((w, h)			,       resample=Image.BICUBIC			,       reducing_gap=1						)
 __lowerCamelCase		:							Union[str, Any]							=						np.array(pil_image.convert('RGB'						)						)
 __lowerCamelCase		:							List[str]							=						arr.astype(np.floataa						) / 127.5 - 1
 __lowerCamelCase		:							Optional[int]							=						np.transpose(SCREAMING_SNAKE_CASE__			,       [2, 0, 1]						)
 __lowerCamelCase		:							Union[str, Any]							=						torch.from_numpy(SCREAMING_SNAKE_CASE__						).unsqueeze(0						)
 return image



class        A_					(       __UpperCamelCase    ):




      '''simple docstring'''


      def __init__(				self:       Any						,      a:       UNetaDConditionModel						,      a:       DDPMScheduler						,      a:       VQModel						,      ):
       super().__init__()

       self.register_modules(
           unet=a						,      scheduler=a						,      movq=a						,      )
       __lowerCamelCase		:							Dict							=						2 ** (len(self.movq.config.block_out_channels				) - 1)




      def      _snake_case	(				self:       Tuple						,      a:       Dict						,      a:       Union[str, Any]						,      a:       List[str]				):
       # get the original timestep using init_timestep
       __lowerCamelCase		:							Any							=						min(int(num_inference_steps * strength				)						,      a				)

       __lowerCamelCase		:							Optional[Any]							=						max(num_inference_steps - init_timestep						,      0				)
       __lowerCamelCase		:							Optional[Any]							=						self.scheduler.timesteps[t_start:]

       return timesteps, num_inference_steps - t_start




      def      _snake_case	(				self:       Optional[int]						,      a:       Optional[Any]						,      a:       Tuple						,      a:       List[Any]						,      a:       Optional[Any]						,      a:       str						,      a:       Union[str, Any]						,      a:       int=None				):
       if not isinstance(a						,      (torch.Tensor, PIL.Image.Image, list)				):
        raise ValueError(
            F'`image` has to be of type `torch.Tensor`, `PIL.Image.Image` or list but is {type(a				)}'				)

       __lowerCamelCase		:							List[Any]							=						image.to(device=a						,      dtype=a				)

       __lowerCamelCase		:							Optional[int]							=						batch_size * num_images_per_prompt

       if image.shape[1] == 4:
        __lowerCamelCase		:							Dict							=						image

       else:
        if isinstance(a						,      a				) and len(a				) != batch_size:
         raise ValueError(
             F'You have passed a list of generators of length {len(a				)}, but requested an effective batch'
             F' size of {batch_size}. Make sure the batch size matches the length of the generators.'				)

        elif isinstance(a						,      a				):
         __lowerCamelCase		:							List[str]							=						[
             self.movq.encode(image[i : i + 1]				).latent_dist.sample(generator[i]				) for i in range(a				)
         ]
         __lowerCamelCase		:							Optional[Any]							=						torch.cat(a						,      dim=0				)
        else:
         __lowerCamelCase		:							Optional[Any]							=						self.movq.encode(a				).latent_dist.sample(a				)

        __lowerCamelCase		:							List[str]							=						self.movq.config.scaling_factor * init_latents

       __lowerCamelCase		:							Dict							=						torch.cat([init_latents]						,      dim=0				)

       __lowerCamelCase		:							List[Any]							=						init_latents.shape
       __lowerCamelCase		:							Dict							=						randn_tensor(a						,      generator=a						,      device=a						,      dtype=a				)

       # get latents
       __lowerCamelCase		:							str							=						self.scheduler.add_noise(a						,      a						,      a				)

       __lowerCamelCase		:							str							=						init_latents

       return latents




      def      _snake_case	(				self:       int						,      a:       Dict=0				):
       if is_accelerate_available():
        from accelerate import cpu_offload
       else:
        raise ImportError('Please install accelerate via `pip install accelerate`'				)

       __lowerCamelCase		:							List[str]							=						torch.device(F'cuda:{gpu_id}'				)

       __lowerCamelCase		:							Optional[int]							=						[
           self.unet,
           self.movq,
       ]
       for cpu_offloaded_model in models:
        if cpu_offloaded_model is not None:
         cpu_offload(a						,      a				)




      def      _snake_case	(				self:       Optional[int]						,      a:       str=0				):
       if is_accelerate_available() and is_accelerate_version('>='						,      '0.17.0.dev0'				):
        from accelerate import cpu_offload_with_hook
       else:
        raise ImportError('`enable_model_cpu_offload` requires `accelerate v0.17.0` or higher.'				)

       __lowerCamelCase		:							Tuple							=						torch.device(F'cuda:{gpu_id}'				)

       if self.device.type != "cpu":
        self.to('cpu'						,      silence_dtype_warnings=a				)
        torch.cuda.empty_cache()  # otherwise we don't see the memory savings (but they probably exist)

       __lowerCamelCase		:							Dict							=						None
       for cpu_offloaded_model in [self.unet, self.movq]:
        __lowerCamelCase					,     __lowerCamelCase		:							Optional[Any]							=						cpu_offload_with_hook(a						,      a						,      prev_module_hook=a				)

       # We'll offload the last model manually.
       __lowerCamelCase		:							Union[str, Any]							=						hook




      @property
      # Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline._execution_device
      def      _snake_case	(				self:       Optional[Any]				):
       if not hasattr(self.unet						,      '_hf_hook'				):
        return self.device
       for module in self.unet.modules():
        if (
            hasattr(a						,      '_hf_hook'				)
            and hasattr(module._hf_hook						,      'execution_device'				)
            and module._hf_hook.execution_device is not None
        ):
         return torch.device(module._hf_hook.execution_device				)
       return self.device




      @torch.no_grad()
      @replace_example_docstring(a				)
      def __call__(				self:       Tuple						,      a:       Union[torch.FloatTensor, List[torch.FloatTensor]]						,      a:       Union[torch.FloatTensor, PIL.Image.Image, List[torch.FloatTensor], List[PIL.Image.Image]]						,      a:       Union[torch.FloatTensor, List[torch.FloatTensor]]						,      a:       torch.FloatTensor						,      a:       int = 512						,      a:       int = 512						,      a:       int = 100						,      a:       float = 4.0						,      a:       float = 0.3						,      a:       int = 1						,      a:       Optional[Union[torch.Generator, List[torch.Generator]]] = None						,      a:       Optional[str] = "pil"						,      a:       bool = True						,      ):
       __lowerCamelCase		:							Optional[Any]							=						self._execution_device

       __lowerCamelCase		:							List[Any]							=						guidance_scale > 1.0

       if isinstance(a						,      a				):
        __lowerCamelCase		:							str							=						torch.cat(a						,      dim=0				)
       if isinstance(a						,      a				):
        __lowerCamelCase		:							List[Any]							=						torch.cat(a						,      dim=0				)
       if isinstance(a						,      a				):
        __lowerCamelCase		:							List[str]							=						torch.cat(a						,      dim=0				)

       __lowerCamelCase		:							List[str]							=						image_embeds.shape[0]

       if do_classifier_free_guidance:
        __lowerCamelCase		:							Optional[Any]							=						image_embeds.repeat_interleave(a						,      dim=0				)
        __lowerCamelCase		:							Optional[Any]							=						negative_image_embeds.repeat_interleave(a						,      dim=0				)
        __lowerCamelCase		:							Tuple							=						hint.repeat_interleave(a						,      dim=0				)

       __lowerCamelCase		:							int							=						torch.cat([negative_image_embeds, image_embeds]						,      dim=0				).to(dtype=self.unet.dtype						,      device=a				)
       __lowerCamelCase		:							str							=						torch.cat([hint, hint]						,      dim=0				).to(dtype=self.unet.dtype						,      device=a				)

       if not isinstance(a						,      a				):
        __lowerCamelCase		:							Tuple							=						[image]
       if not all(isinstance(a						,      (PIL.Image.Image, torch.Tensor)				) for i in image				):
        raise ValueError(
            F'Input is in incorrect format: {[type(a				) for i in image]}. Currently, we only support  PIL image and pytorch tensor'				)

       __lowerCamelCase		:							str							=						torch.cat([prepare_image(a						,      a						,      a				) for i in image]						,      dim=0				)
       __lowerCamelCase		:							List[str]							=						image.to(dtype=image_embeds.dtype						,      device=a				)

       __lowerCamelCase		:							int							=						self.movq.encode(a				)['latents']
       __lowerCamelCase		:							Optional[Any]							=						latents.repeat_interleave(a						,      dim=0				)
       self.scheduler.set_timesteps(a						,      device=a				)
       __lowerCamelCase					,     __lowerCamelCase		:							Dict							=						self.get_timesteps(a						,      a						,      a				)
       __lowerCamelCase		:							Union[str, Any]							=						timesteps[:1].repeat(batch_size * num_images_per_prompt				)
       __lowerCamelCase					,     __lowerCamelCase		:							Union[str, Any]							=						downscale_height_and_width(a						,      a						,      self.movq_scale_factor				)
       __lowerCamelCase		:							Optional[int]							=						self.prepare_latents(
           a						,      a						,      a						,      a						,      image_embeds.dtype						,      a						,      a				)
       for i, t in enumerate(self.progress_bar(a				)				):
        # expand the latents if we are doing classifier free guidance
        __lowerCamelCase		:							List[Any]							=						torch.cat([latents] * 2				) if do_classifier_free_guidance else latents

        __lowerCamelCase		:							Optional[Any]							=						{'image_embeds': image_embeds, 'hint': hint}
        __lowerCamelCase		:							Tuple							=						self.unet(
            sample=a						,      timestep=a						,      encoder_hidden_states=a						,      added_cond_kwargs=a						,      return_dict=a						,      )[0]

        if do_classifier_free_guidance:
         __lowerCamelCase					,     __lowerCamelCase		:							Optional[int]							=						noise_pred.split(latents.shape[1]						,      dim=1				)
         __lowerCamelCase					,     __lowerCamelCase		:							List[str]							=						noise_pred.chunk(2				)
         __lowerCamelCase					,     __lowerCamelCase		:							Union[str, Any]							=						variance_pred.chunk(2				)
         __lowerCamelCase		:							Optional[int]							=						noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
         __lowerCamelCase		:							Tuple							=						torch.cat([noise_pred, variance_pred_text]						,      dim=1				)

        if not (
            hasattr(self.scheduler.config						,      'variance_type'				)
            and self.scheduler.config.variance_type in ["learned", "learned_range"]
        ):
         __lowerCamelCase					,     __lowerCamelCase		:							str							=						noise_pred.split(latents.shape[1]						,      dim=1				)

        # compute the previous noisy sample x_t -> x_t-1

        __lowerCamelCase		:							Dict							=						self.scheduler.step(
            a						,      a						,      a						,      generator=a						,      )[0]

       # post-processing
       __lowerCamelCase		:							Tuple							=						self.movq.decode(a						,      force_not_quantize=a				)['sample']

       if output_type not in ["pt", "np", "pil"]:
        raise ValueError(F'Only the output types `pt`, `pil` and `np` are supported not output_type={output_type}'				)

       if output_type in ["np", "pil"]:
        __lowerCamelCase		:							Optional[Any]							=						image * 0.5 + 0.5
        __lowerCamelCase		:							Optional[Any]							=						image.clamp(0						,      1				)
        __lowerCamelCase		:							Optional[Any]							=						image.cpu().permute(0						,      2						,      3						,      1				).float().numpy()

       if output_type == "pil":
        __lowerCamelCase		:							List[str]							=						self.numpy_to_pil(a				)

       if not return_dict:
        return (image,)

       return ImagePipelineOutput(images=a				)





import unittest

from transformers import ErnieMTokenizer
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin


lowercase_           =	get_tests_dir('fixtures/spiece.model')


@require_sentencepiece
@require_tokenizers
class        A_					(       __UpperCamelCase					,      unittest.TestCase    ):




      '''simple docstring'''


      __snake_case					       =   ErnieMTokenizer
      __snake_case					       =   False
      __snake_case					       =   True
      __snake_case					       =   False
      __snake_case					       =   False




      def      _snake_case	(				self:       Optional[int]				):
       super().setUp()

       # We have a SentencePiece fixture for testing
       __lowerCamelCase		:							List[str]							=						ErnieMTokenizer(a						,      unk_token='<unk>'						,      pad_token='<pad>'				)
       tokenizer.save_pretrained(self.tmpdirname				)




      def      _snake_case	(				self:       Dict						,      a:       List[Any]				):
       __lowerCamelCase		:							Optional[Any]							=						'this is a test'
       __lowerCamelCase		:							Optional[int]							=						'this is a test'
       return input_text, output_text




      def      _snake_case	(				self:       Tuple				):
       __lowerCamelCase		:							List[str]							=						'<pad>'
       __lowerCamelCase		:							Union[str, Any]							=						0

       self.assertEqual(self.get_tokenizer()._convert_token_to_id(a				)						,      a				)
       self.assertEqual(self.get_tokenizer()._convert_id_to_token(a				)						,      a				)




      def      _snake_case	(				self:       List[Any]				):
       __lowerCamelCase		:							List[str]							=						list(self.get_tokenizer().get_vocab().keys()				)

       self.assertEqual(vocab_keys[0]						,      '<pad>'				)
       self.assertEqual(vocab_keys[1]						,      '<unk>'				)
       self.assertEqual(vocab_keys[-1]						,      '▁eloquent'				)
       self.assertEqual(len(a				)						,      3_0000				)




      def      _snake_case	(				self:       Tuple				):
       self.assertEqual(self.get_tokenizer().vocab_size						,      3_0000				)




      def      _snake_case	(				self:       int				):
       if not self.test_rust_tokenizer:
        return

       __lowerCamelCase		:							Any							=						self.get_tokenizer()
       __lowerCamelCase		:							Optional[Any]							=						self.get_rust_tokenizer()

       __lowerCamelCase		:							Optional[int]							=						'I was born in 92000, and this is falsé.'

       __lowerCamelCase		:							Optional[Any]							=						tokenizer.tokenize(a				)
       __lowerCamelCase		:							Dict							=						rust_tokenizer.tokenize(a				)
       self.assertListEqual(a						,      a				)

       __lowerCamelCase		:							List[str]							=						tokenizer.encode(a						,      add_special_tokens=a				)
       __lowerCamelCase		:							List[Any]							=						rust_tokenizer.encode(a						,      add_special_tokens=a				)
       self.assertListEqual(a						,      a				)

       __lowerCamelCase		:							str							=						self.get_rust_tokenizer()
       __lowerCamelCase		:							str							=						tokenizer.encode(a				)
       __lowerCamelCase		:							List[str]							=						rust_tokenizer.encode(a				)
       self.assertListEqual(a						,      a				)




      def      _snake_case	(				self:       Optional[Any]				):
       __lowerCamelCase		:							Union[str, Any]							=						ErnieMTokenizer(a						,      do_lower_case=a						,      unk_token='<unk>'						,      pad_token='<pad>'				)

       __lowerCamelCase		:							List[str]							=						tokenizer.tokenize('This is a test'				)
       self.assertListEqual(a						,      ['▁this', '▁is', '▁a', '▁test']				)

       self.assertListEqual(tokenizer.convert_tokens_to_ids(a				)						,      [48, 25, 21, 1289]				)

       __lowerCamelCase		:							Optional[Any]							=						tokenizer.tokenize('I was born in 92000, and this is falsé.'				)
       # ErnieMTokenizer(paddlenlp implementation) outputs '9' instead of '_9' so to mimic that '_9' is changed to '9'
       self.assertListEqual(
           a						,      ['▁i', '▁was', '▁born', '▁in', '9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', 'é', '.']				)
       __lowerCamelCase		:							Any							=						tokenizer.convert_tokens_to_ids(a				)
       self.assertListEqual(a						,      [31, 23, 386, 19, 518, 3050, 15, 17, 48, 25, 8256, 18, 1, 9]				)

       __lowerCamelCase		:							int							=						tokenizer.convert_ids_to_tokens(a				)
       self.assertListEqual(
           a						,      ['▁i', '▁was', '▁born', '▁in', '9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '.']						,      )




      def      _snake_case	(				self:       str				):
       __lowerCamelCase		:							Tuple							=						ErnieMTokenizer(a						,      unk_token='<unk>'						,      pad_token='<pad>'				)

       __lowerCamelCase		:							Tuple							=						tokenizer.encode('sequence builders'				)
       __lowerCamelCase		:							List[Any]							=						tokenizer.encode('multi-sequence build'				)

       __lowerCamelCase		:							Optional[Any]							=						tokenizer.build_inputs_with_special_tokens(a				)
       __lowerCamelCase		:							Tuple							=						tokenizer.build_inputs_with_special_tokens(a						,      a				)

       assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]
       assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + [
           tokenizer.sep_token_id
       ] + text_a + [tokenizer.sep_token_id]




      @slow
      def      _snake_case	(				self:       List[Any]				):
       # fmt: off
       __lowerCamelCase		:							int							=						{'input_ids': [[0, 1_1062, 8_2772, 7, 15, 8_2772, 538, 5_1529, 237, 1_7198, 1290, 206, 9, 21_5175, 1314, 136, 1_7198, 1290, 206, 9, 5_6359, 42, 12_2009, 9, 1_6466, 16, 8_7344, 4537, 9, 4717, 7_8381, 6, 15_9958, 7, 15, 2_4480, 618, 4, 527, 2_2693, 9, 304, 4, 2777, 2_4480, 9874, 4, 4_3523, 594, 4, 803, 1_8392, 3_3189, 18, 4, 4_3523, 2_4447, 5, 5, 5, 16, 100, 2_4955, 8_3658, 9626, 14_4057, 15, 839, 2_2335, 16, 136, 2_4955, 8_3658, 8_3479, 15, 3_9102, 724, 16, 678, 645, 6460, 1328, 4589, 42, 12_2009, 11_5774, 23, 3559, 1328, 4_6876, 7, 136, 5_3894, 1940, 4_2227, 4_1159, 1_7721, 823, 425, 4, 2_7512, 9_8722, 206, 136, 5531, 4970, 919, 1_7336, 5, 2], [0, 2_0080, 618, 83, 8_2775, 47, 479, 9, 1517, 73, 5_3894, 333, 8_0581, 11_0117, 1_8811, 5256, 1295, 51, 15_2526, 297, 7986, 390, 12_4416, 538, 3_5431, 214, 98, 1_5044, 2_5737, 136, 7108, 4_3701, 23, 756, 13_5355, 7, 5, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 581, 6_3773, 11_9455, 6, 14_7797, 8_8203, 7, 645, 70, 21, 3285, 1_0269, 5, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]}
       # fmt: on

       self.tokenizer_integration_test_util(
           expected_encoding=a						,      model_name='susnato/ernie-m-base_pytorch'						,      sequences=[
               'Transformers (formerly known as pytorch-transformers and pytorch-pretrained-bert) provides '
               'general-purpose architectures (BERT, GPT-2, RoBERTa, XLM, DistilBert, XLNet...) for Natural '
               'Language Understanding (NLU) and Natural Language Generation (NLG) with over32+ pretrained '
               'models in100+ languages and deep interoperability between Jax, PyTorch and TensorFlow.',
               'BERT is designed to pre-train deep bidirectional representations from unlabeled text by jointly '
               'conditioning on both left and right context in all layers.',
               'The quick brown fox jumps over the lazy dog.',
           ]						,      )

