




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


_lowerCAmelCase						:   str		=   logging.get_logger(__name__)

_lowerCAmelCase						:   str		=   {
    "google/canine-s": "https://huggingface.co/google/canine-s/resolve/main/config.json",
    # See all CANINE models at https://huggingface.co/models?filter=canine
}
class 			_UpperCamelCase      (				lowerCAmelCase		):
      UpperCAmelCase_        =		"""canine"""
      def __init__(			self   :Tuple ,      lowerCamelCase   :List[Any]=768 ,      lowerCamelCase   :Optional[Any]=12 ,      lowerCamelCase   :Union[str, Any]=12 ,      lowerCamelCase   :int=3072 ,      lowerCamelCase   :str="gelu" ,      lowerCamelCase   :Optional[Any]=0.1 ,      lowerCamelCase   :Optional[int]=0.1 ,      lowerCamelCase   :List[Any]=1_6384 ,      lowerCamelCase   :Dict=16 ,      lowerCamelCase   :Optional[Any]=0.02 ,      lowerCamelCase   :List[Any]=1e-12 ,      lowerCamelCase   :Any=0 ,      lowerCamelCase   :Any=0xe000 ,      lowerCamelCase   :List[str]=0xe001 ,      lowerCamelCase   :str=4 ,      lowerCamelCase   :List[Any]=4 ,      lowerCamelCase   :str=8 ,      lowerCamelCase   :Union[str, Any]=1_6384 ,      lowerCamelCase   :Union[str, Any]=128 ,      **lowerCamelCase   :Dict ,      )     ->			Dict:
       super().__init__(pad_token_id=lowerCamelCase ,      bos_token_id=lowerCamelCase ,      eos_token_id=lowerCamelCase ,      **lowerCamelCase      )

       UpperCAmelCase__							 =						max_position_embeddings
       UpperCAmelCase__							 =						hidden_size
       UpperCAmelCase__							 =						num_hidden_layers
       UpperCAmelCase__							 =						num_attention_heads
       UpperCAmelCase__							 =						intermediate_size
       UpperCAmelCase__							 =						hidden_act
       UpperCAmelCase__							 =						hidden_dropout_prob
       UpperCAmelCase__							 =						attention_probs_dropout_prob
       UpperCAmelCase__							 =						initializer_range
       UpperCAmelCase__							 =						type_vocab_size
       UpperCAmelCase__							 =						layer_norm_eps

       # Character config:
       UpperCAmelCase__							 =						downsampling_rate
       UpperCAmelCase__							 =						upsampling_kernel_size
       UpperCAmelCase__							 =						num_hash_functions
       UpperCAmelCase__							 =						num_hash_buckets
       UpperCAmelCase__							 =						local_transformer_stride












from ..utils import DummyObject, requires_backends
class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :List[Any] ,      *lowerCamelCase   :int ,      **lowerCamelCase   :List[Any]      )     ->			Dict:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :Union[str, Any] ,      *lowerCamelCase   :Any ,      **lowerCamelCase   :List[str]      )     ->			int:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :Optional[int] ,      *lowerCamelCase   :List[str] ,      **lowerCamelCase   :List[Any]      )     ->			Dict:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :Dict ,      *lowerCamelCase   :int ,      **lowerCamelCase   :str      )     ->			str:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :Optional[int] ,      *lowerCamelCase   :Tuple ,      **lowerCamelCase   :List[Any]      )     ->			Optional[int]:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :Optional[Any] ,      *lowerCamelCase   :Dict ,      **lowerCamelCase   :Optional[int]      )     ->			List[Any]:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :List[str] ,      *lowerCamelCase   :Union[str, Any] ,      **lowerCamelCase   :Any      )     ->			Union[str, Any]:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :List[Any] ,      *lowerCamelCase   :str ,      **lowerCamelCase   :List[Any]      )     ->			Tuple:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :str ,      *lowerCamelCase   :Any ,      **lowerCamelCase   :Dict      )     ->			int:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :Union[str, Any] ,      *lowerCamelCase   :int ,      **lowerCamelCase   :Dict      )     ->			List[Any]:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :int ,      *lowerCamelCase   :Union[str, Any] ,      **lowerCamelCase   :str      )     ->			Optional[int]:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :List[str] ,      *lowerCamelCase   :Optional[int] ,      **lowerCamelCase   :Tuple      )     ->			Dict:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :Union[str, Any] ,      *lowerCamelCase   :Any ,      **lowerCamelCase   :List[str]      )     ->			Union[str, Any]:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :Optional[Any] ,      *lowerCamelCase   :Union[str, Any] ,      **lowerCamelCase   :Optional[Any]      )     ->			Optional[int]:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :List[Any] ,      *lowerCamelCase   :Dict ,      **lowerCamelCase   :Optional[int]      )     ->			List[str]:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :Tuple ,      *lowerCamelCase   :str ,      **lowerCamelCase   :List[str]      )     ->			List[Any]:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :Any ,      *lowerCamelCase   :List[str] ,      **lowerCamelCase   :Any      )     ->			int:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :List[Any] ,      *lowerCamelCase   :List[Any] ,      **lowerCamelCase   :Optional[Any]      )     ->			Tuple:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :Any ,      *lowerCamelCase   :List[Any] ,      **lowerCamelCase   :List[str]      )     ->			List[str]:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :Optional[Any] ,      *lowerCamelCase   :Optional[int] ,      **lowerCamelCase   :Dict      )     ->			Union[str, Any]:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :int ,      *lowerCamelCase   :List[Any] ,      **lowerCamelCase   :str      )     ->			str:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :str ,      *lowerCamelCase   :Any ,      **lowerCamelCase   :Union[str, Any]      )     ->			Optional[Any]:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :Optional[Any] ,      *lowerCamelCase   :Any ,      **lowerCamelCase   :List[str]      )     ->			int:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :List[Any] ,      *lowerCamelCase   :Union[str, Any] ,      **lowerCamelCase   :Union[str, Any]      )     ->			List[Any]:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :Dict ,      *lowerCamelCase   :Dict ,      **lowerCamelCase   :int      )     ->			List[Any]:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :Tuple ,      *lowerCamelCase   :Optional[Any] ,      **lowerCamelCase   :Optional[int]      )     ->			Dict:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :Any ,      *lowerCamelCase   :Optional[int] ,      **lowerCamelCase   :List[str]      )     ->			List[Any]:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :List[Any] ,      *lowerCamelCase   :int ,      **lowerCamelCase   :Optional[Any]      )     ->			List[str]:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :int ,      *lowerCamelCase   :List[Any] ,      **lowerCamelCase   :List[Any]      )     ->			Any:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :str ,      *lowerCamelCase   :Optional[int] ,      **lowerCamelCase   :str      )     ->			List[str]:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :List[Any] ,      *lowerCamelCase   :str ,      **lowerCamelCase   :int      )     ->			List[Any]:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :List[str] ,      *lowerCamelCase   :List[Any] ,      **lowerCamelCase   :Any      )     ->			List[Any]:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :Optional[Any] ,      *lowerCamelCase   :Any ,      **lowerCamelCase   :Tuple      )     ->			int:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :Any ,      *lowerCamelCase   :List[Any] ,      **lowerCamelCase   :Tuple      )     ->			Dict:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :List[Any] ,      *lowerCamelCase   :int ,      **lowerCamelCase   :Union[str, Any]      )     ->			List[Any]:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :str ,      *lowerCamelCase   :int ,      **lowerCamelCase   :List[str]      )     ->			List[str]:
       requires_backends(cls ,      ["flax"]      )



class 			_UpperCamelCase      (				metaclass=lowerCAmelCase		):
      UpperCAmelCase_        =		["""flax"""]
      def __init__(			self   :int ,      *lowerCamelCase   :Dict ,      **lowerCamelCase   :Optional[int]      )     ->			str:
       requires_backends(self ,      ["flax"]      )
      @classmethod
      def 	UpperCAmelCase_						(			cls   :Union[str, Any] ,      *lowerCamelCase   :Any ,      **lowerCamelCase   :Union[str, Any]      )     ->			Optional[int]:
       requires_backends(cls ,      ["flax"]      )







      @classmethod
      def 	UpperCAmelCase_						(			cls   :int ,      *lowerCamelCase   :Union[str, Any] ,      **lowerCamelCase   :Any      )     ->			Optional[Any]:
       requires_backends(cls ,      ["flax"]      )





