




from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


__a							     =					logging.get_logger(__name__)

__a							     =					{
    'google/bit-50': 'https://huggingface.co/google/bit-50/resolve/main/config.json',
}

class     __a(	_a							,		_a  ):






    """simple docstring"""





    lowerCAmelCase         = '''bit'''
    lowerCAmelCase         = ['''preactivation''', '''bottleneck''']
    lowerCAmelCase         = ['''SAME''', '''VALID''']





    def __init__( self  ,_SCREAMING_SNAKE_CASE=3  ,_SCREAMING_SNAKE_CASE=64  ,_SCREAMING_SNAKE_CASE=[256, 512, 1_024, 2_048]  ,_SCREAMING_SNAKE_CASE=[3, 4, 6, 3]  ,_SCREAMING_SNAKE_CASE="preactivation"  ,_SCREAMING_SNAKE_CASE="relu"  ,_SCREAMING_SNAKE_CASE=None  ,_SCREAMING_SNAKE_CASE=32  ,_SCREAMING_SNAKE_CASE=0.0  ,_SCREAMING_SNAKE_CASE=False  ,_SCREAMING_SNAKE_CASE=32  ,_SCREAMING_SNAKE_CASE=1  ,_SCREAMING_SNAKE_CASE=None  ,_SCREAMING_SNAKE_CASE=None  ,**_SCREAMING_SNAKE_CASE  ,)					->						Optional[Any]:
         super().__init__(**_SCREAMING_SNAKE_CASE    )
         if layer_type not in self.layer_types:
              raise ValueError(f'''layer_type={layer_type} is not one of {",".join(self.layer_types    )}'''    )
         if global_padding is not None:
              if global_padding.upper() in self.supported_padding:
                   UpperCAmelCase_     :				str  =     global_padding.upper()
              else:
                   raise ValueError(f'''Padding strategy {global_padding} not supported'''    )
         UpperCAmelCase_     :				int  =     num_channels
         UpperCAmelCase_     :				Dict  =     embedding_size
         UpperCAmelCase_     :				Union[str, Any]  =     hidden_sizes
         UpperCAmelCase_     :				Optional[int]  =     depths
         UpperCAmelCase_     :				Tuple  =     layer_type
         UpperCAmelCase_     :				Union[str, Any]  =     hidden_act
         UpperCAmelCase_     :				int  =     global_padding
         UpperCAmelCase_     :				Optional[int]  =     num_groups
         UpperCAmelCase_     :				Dict  =     drop_path_rate
         UpperCAmelCase_     :				List[Any]  =     embedding_dynamic_padding
         UpperCAmelCase_     :				Optional[int]  =     output_stride
         UpperCAmelCase_     :				int  =     width_factor

         UpperCAmelCase_     :				Tuple  =     ['''stem'''] + [f'''stage{idx}''' for idx in range(1  ,len(_SCREAMING_SNAKE_CASE    ) + 1    )]
         UpperCAmelCase_,       UpperCAmelCase_     :				Optional[int]  =     get_aligned_output_features_output_indices(
             out_features=_SCREAMING_SNAKE_CASE  ,out_indices=_SCREAMING_SNAKE_CASE  ,stage_names=self.stage_names    )





from typing import TYPE_CHECKING

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


__a							     =					{}

try:
     if not is_sentencepiece_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     __a							     =					['NllbTokenizer']

try:
     if not is_tokenizers_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     __a							     =					['NllbTokenizerFast']


if TYPE_CHECKING:
     try:
          if not is_sentencepiece_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_nllb import NllbTokenizer

     try:
          if not is_tokenizers_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_nllb_fast import NllbTokenizerFast

else:
     import sys

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