

'''simple docstring'''
from math import ceil


def 	_lowerCAmelCase (						_UpperCamelCase						:					Any							,			_UpperCamelCase						:					Dict    )				->      Dict:
     """simple docstring"""




     _SCREAMING_SNAKE_CASE							   =list(range(0							,			_UpperCamelCase    )    )

     _SCREAMING_SNAKE_CASE							   =[item for sublist in list(device_map.values()    ) for item in sublist]

     # Duplicate check
     _SCREAMING_SNAKE_CASE							   =[]
     for i in device_map_blocks:
          if device_map_blocks.count(_UpperCamelCase    ) > 1 and i not in duplicate_blocks:
               duplicate_blocks.append(_UpperCamelCase    )
    # Missing blocks
     _SCREAMING_SNAKE_CASE							   =[i for i in blocks if i not in device_map_blocks]
     _SCREAMING_SNAKE_CASE							   =[i for i in device_map_blocks if i not in blocks]

     if len(_UpperCamelCase    ) != 0:
          raise ValueError(
              'Duplicate attention blocks specified in device_map. Attention blocks must be specified to one device.'
              ' These attention blocks were specified more than once: ' + str(_UpperCamelCase    )    )
     if len(_UpperCamelCase    ) != 0:
          raise ValueError(
              'There are attention blocks for this model that are not specified in the device_map. Add these attention '
              'blocks to a device on the device_map: ' + str(_UpperCamelCase    )    )
     if len(_UpperCamelCase    ) != 0:
          raise ValueError(
              'The device_map contains more attention blocks than this model has. Remove these from the device_map:'
              + str(_UpperCamelCase    )    )







def 	_lowerCAmelCase (						_UpperCamelCase						:					Optional[Any]							,			_UpperCamelCase						:					str    )				->      Any:
     """simple docstring"""




     _SCREAMING_SNAKE_CASE							   =list(range(_UpperCamelCase    )    )
     _SCREAMING_SNAKE_CASE							   =int(ceil(n_layers / len(_UpperCamelCase    )    )    )
     _SCREAMING_SNAKE_CASE							   =[layers[i : i + n_blocks] for i in range(0							,			_UpperCamelCase							,			_UpperCamelCase    )]

     return dict(zip(_UpperCamelCase							,			_UpperCamelCase    )    )



'''simple docstring'''
from ...utils import logging
from ..ta.modeling_tf_ta import TFTaEncoderModel, TFTaForConditionalGeneration, TFTaModel
from .configuration_mta import MTaConfig


lowerCamelCase			:				Optional[Any] 			=					logging.get_logger(__name__)

lowerCamelCase			:				Optional[Any] 			=					"T5Config"







class 							A__   (	A__  ):
  A__					=    'mt5'
  A__					=    MTaConfig







class 							A__   (	A__  ):
  A__					=    'mt5'
  A__					=    MTaConfig







class 							A__   (	A__  ):
  A__					=    'mt5'
  A__					=    MTaConfig
