






from typing import TYPE_CHECKING

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


UpperCAmelCase_ :						List[Any]      =      {}

try:
	if not is_sentencepiece_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase_ :						Union[str, Any]      =      ["NllbTokenizer"]

try:
	if not is_tokenizers_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase_ :						Union[str, Any]      =      ["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

	UpperCAmelCase_ :						List[Any]      =      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowercase__		:int   =    logging.get_logger(__name__)

lowercase__		:Any   =    {
    "sail/poolformer_s12": "https://huggingface.co/sail/poolformer_s12/resolve/main/config.json",
    # See all PoolFormer models at https://huggingface.co/models?filter=poolformer
}







class 				lowercase		(					SCREAMING_SNAKE_CASE__		):
							lowercase_       :       Optional[Any]       					='''poolformer'''




							def __init__(				self   ,A__=3   ,A__=1_6   ,A__=1_6   ,A__=3   ,A__=4.0   ,A__=[2, 2, 6, 2]   ,A__=[6_4, 1_2_8, 3_2_0, 5_1_2]   ,A__=[7, 3, 3, 3]   ,A__=[4, 2, 2, 2]   ,A__=[2, 1, 1, 1]   ,A__=4   ,A__=0.0   ,A__="gelu"   ,A__=True   ,A__=1E-5   ,A__=0.02   ,**A__   ,):
												lowercase							=						num_channels
												lowercase							=						patch_size
												lowercase							=						stride
												lowercase							=						padding
												lowercase							=						pool_size
												lowercase							=						hidden_sizes
												lowercase							=						mlp_ratio
												lowercase							=						depths
												lowercase							=						patch_sizes
												lowercase							=						strides
												lowercase							=						num_encoder_blocks
												lowercase							=						drop_path_rate
												lowercase							=						hidden_act
												lowercase							=						use_layer_scale
												lowercase							=						layer_scale_init_value
												lowercase							=						initializer_range
												super().__init__(**A__)







class 				lowercase		(					SCREAMING_SNAKE_CASE__		):
							lowercase_       :       List[Any]       					=version.parse('''1.11'''		)




							@property
							def  A__      (				self):
												return OrderedDict(
												    [
												        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
												    ])





							@property
							def  A__      (				self):
												return 2E-3




