

'''simple docstring'''



from ...configuration_utils import PretrainedConfig
from ...utils import logging


_UpperCamelCase						:  str							       =				logging.get_logger(__name__)

_UpperCamelCase						:  Optional[int]							       =				{
    "transfo-xl-wt103": "https://huggingface.co/transfo-xl-wt103/resolve/main/config.json",
}



class 				_snake_case					(   a_			):
  SCREAMING_SNAKE_CASE			:       List[str]				=     '''transfo-xl'''
  SCREAMING_SNAKE_CASE			:       List[Any]				=     ['''mems''']
  SCREAMING_SNAKE_CASE			:       Dict				=     {
      '''n_token''': '''vocab_size''',
      '''hidden_size''': '''d_model''',
      '''num_attention_heads''': '''n_head''',
      '''num_hidden_layers''': '''n_layer''',
  }

  def __init__(				self      , _SCREAMING_SNAKE_CASE=26_77_35      , _SCREAMING_SNAKE_CASE=[2_00_00, 4_00_00, 20_00_00]      , _SCREAMING_SNAKE_CASE=10_24      , _SCREAMING_SNAKE_CASE=10_24      , _SCREAMING_SNAKE_CASE=16      , _SCREAMING_SNAKE_CASE=64      , _SCREAMING_SNAKE_CASE=40_96      , _SCREAMING_SNAKE_CASE=4      , _SCREAMING_SNAKE_CASE=False      , _SCREAMING_SNAKE_CASE=18      , _SCREAMING_SNAKE_CASE=16_00      , _SCREAMING_SNAKE_CASE=10_00      , _SCREAMING_SNAKE_CASE=True      , _SCREAMING_SNAKE_CASE=True      , _SCREAMING_SNAKE_CASE=0      , _SCREAMING_SNAKE_CASE=-1      , _SCREAMING_SNAKE_CASE=True      , _SCREAMING_SNAKE_CASE=0.1      , _SCREAMING_SNAKE_CASE=0.0      , _SCREAMING_SNAKE_CASE=True      , _SCREAMING_SNAKE_CASE="normal"      , _SCREAMING_SNAKE_CASE=0.01      , _SCREAMING_SNAKE_CASE=0.01      , _SCREAMING_SNAKE_CASE=0.02      , _SCREAMING_SNAKE_CASE=1e-5      , _SCREAMING_SNAKE_CASE=0      , **_SCREAMING_SNAKE_CASE      , ):





      '''simple docstring'''

      lowerCAmelCase 						=							vocab_size
      lowerCAmelCase 						=							[]
      self.cutoffs.extend(_SCREAMING_SNAKE_CASE	)
      if proj_share_all_but_first:
          lowerCAmelCase 						=							[False] + [True] * len(self.cutoffs	)
      else:
          lowerCAmelCase 						=							[False] + [False] * len(self.cutoffs	)
      lowerCAmelCase 						=							d_model
      lowerCAmelCase 						=							d_embed
      lowerCAmelCase 						=							d_head
      lowerCAmelCase 						=							d_inner
      lowerCAmelCase 						=							div_val
      lowerCAmelCase 						=							pre_lnorm
      lowerCAmelCase 						=							n_layer
      lowerCAmelCase 						=							n_head
      lowerCAmelCase 						=							mem_len
      lowerCAmelCase 						=							same_length
      lowerCAmelCase 						=							attn_type
      lowerCAmelCase 						=							clamp_len
      lowerCAmelCase 						=							sample_softmax
      lowerCAmelCase 						=							adaptive
      lowerCAmelCase 						=							dropout
      lowerCAmelCase 						=							dropatt
      lowerCAmelCase 						=							untie_r
      lowerCAmelCase 						=							init
      lowerCAmelCase 						=							init_range
      lowerCAmelCase 						=							proj_init_std
      lowerCAmelCase 						=							init_std
      lowerCAmelCase 						=							layer_norm_epsilon
      super().__init__(eos_token_id=_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	)

  @property
  def   _SCREAMING_SNAKE_CASE				(				self	):





      '''simple docstring'''

      logger.info(F'The model {self.model_type} is one of the few models that has no sequence length limit.'	)
      return -1


  @max_position_embeddings.setter
  def   _SCREAMING_SNAKE_CASE				(				self      , _SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      raise NotImplementedError(
          F'The model {self.model_type} is one of the few models that has no sequence length limit.'	)








'''simple docstring'''



from dataclasses import dataclass
from typing import List, Optional, Union

import numpy as np
import torch

from ...utils import BaseOutput, OptionalDependencyNotAvailable, is_torch_available, is_transformers_available



@dataclass
class 				_snake_case					(   a_			):
  SCREAMING_SNAKE_CASE			:       Union[List[np.ndarray], torch.FloatTensor]


try:
     if not (is_transformers_available() and is_torch_available()):
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
     from .pipeline_text_to_video_synth import TextToVideoSDPipeline
     from .pipeline_text_to_video_synth_imgaimg import VideoToVideoSDPipeline  # noqa: F401
     from .pipeline_text_to_video_zero import TextToVideoZeroPipeline





