






"""simple docstring"""




import jax.numpy as jnp

from ...utils import logging
from ..ta.modeling_flax_ta import FlaxTaEncoderModel, FlaxTaForConditionalGeneration, FlaxTaModel
from .configuration_mta import MTaConfig


_snake_case          =   logging.get_logger(__name__)

_snake_case          =   'T5Config'

def 			lowerCAmelCase__     (     UpperCamelCase__     ,   UpperCamelCase__     ,   UpperCamelCase__				):



  '''simple docstring'''
  _a  :       Any             =	jnp.zeros_like(UpperCamelCase__				)
  _a  :       Tuple             =	shifted_input_ids.at[:, 1:].set(input_ids[:, :-1]				)
  _a  :       Union[str, Any]             =	shifted_input_ids.at[:, 0].set(UpperCamelCase__				)

  _a  :       Union[str, Any]             =	jnp.where(shifted_input_ids == -1_0_0     ,   UpperCamelCase__     ,   UpperCamelCase__				)
  return shifted_input_ids






class        UpperCamelCase			(	snake_case_      ):
 UpperCamelCase					:       List[Any]			=					'''mt5'''
 UpperCamelCase					:       Optional[int]			=					MTaConfig







class        UpperCamelCase			(	snake_case_      ):
 UpperCamelCase					:       Dict			=					'''mt5'''
 UpperCamelCase					:       Union[str, Any]			=					MTaConfig







class        UpperCamelCase			(	snake_case_      ):
 UpperCamelCase					:       int			=					'''mt5'''
 UpperCamelCase					:       List[Any]			=					MTaConfig









"""simple docstring"""




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


_snake_case          =   {
    'configuration_perceiver': ['PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP', 'PerceiverConfig', 'PerceiverOnnxConfig'],
    'tokenization_perceiver': ['PerceiverTokenizer'],
}

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _snake_case          =   ['PerceiverFeatureExtractor']
 _snake_case          =   ['PerceiverImageProcessor']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _snake_case          =   [
     'PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST',
     'PerceiverForImageClassificationConvProcessing',
     'PerceiverForImageClassificationFourier',
     'PerceiverForImageClassificationLearned',
     'PerceiverForMaskedLM',
     'PerceiverForMultimodalAutoencoding',
     'PerceiverForOpticalFlow',
     'PerceiverForSequenceClassification',
     'PerceiverLayer',
     'PerceiverModel',
     'PerceiverPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_perceiver import PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP, PerceiverConfig, PerceiverOnnxConfig
 from .tokenization_perceiver import PerceiverTokenizer

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_perceiver import PerceiverFeatureExtractor
  from .image_processing_perceiver import PerceiverImageProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_perceiver import (
      PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST,
      PerceiverForImageClassificationConvProcessing,
      PerceiverForImageClassificationFourier,
      PerceiverForImageClassificationLearned,
      PerceiverForMaskedLM,
      PerceiverForMultimodalAutoencoding,
      PerceiverForOpticalFlow,
      PerceiverForSequenceClassification,
      PerceiverLayer,
      PerceiverModel,
      PerceiverPreTrainedModel,
  )

else:
 import sys

 _snake_case          =   _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)

