


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


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

lowerCAmelCase__  :Optional[Any]             =							{
    '''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 		__a				(    UpperCAmelCase      ):
		_a     :  Any           =     'canine'
		def __init__(      self      ,   _SCREAMING_SNAKE_CASE=768      ,   _SCREAMING_SNAKE_CASE=12      ,   _SCREAMING_SNAKE_CASE=12      ,   _SCREAMING_SNAKE_CASE=3072      ,   _SCREAMING_SNAKE_CASE="gelu"      ,   _SCREAMING_SNAKE_CASE=0.1      ,   _SCREAMING_SNAKE_CASE=0.1      ,   _SCREAMING_SNAKE_CASE=16384      ,   _SCREAMING_SNAKE_CASE=16      ,   _SCREAMING_SNAKE_CASE=0.02      ,   _SCREAMING_SNAKE_CASE=1e-1_2      ,   _SCREAMING_SNAKE_CASE=0      ,   _SCREAMING_SNAKE_CASE=0XE_000      ,   _SCREAMING_SNAKE_CASE=0XE_001      ,   _SCREAMING_SNAKE_CASE=4      ,   _SCREAMING_SNAKE_CASE=4      ,   _SCREAMING_SNAKE_CASE=8      ,   _SCREAMING_SNAKE_CASE=16384      ,   _SCREAMING_SNAKE_CASE=128      ,   **_SCREAMING_SNAKE_CASE      ,   )			->	int:




									"""simple docstring"""





									super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE      ,   bos_token_id=_SCREAMING_SNAKE_CASE      ,   eos_token_id=_SCREAMING_SNAKE_CASE      ,   **_SCREAMING_SNAKE_CASE						)

									_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 typing import TYPE_CHECKING

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


lowerCAmelCase__  :Any             =							{'''configuration_xglm''': ['''XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''XGLMConfig''']}

try:
		if not is_sentencepiece_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCAmelCase__  :Optional[Any]             =							['''XGLMTokenizer''']

try:
		if not is_tokenizers_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCAmelCase__  :str             =							['''XGLMTokenizerFast''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCAmelCase__  :List[str]             =							[
		    '''XGLM_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''XGLMForCausalLM''',
		    '''XGLMModel''',
		    '''XGLMPreTrainedModel''',
		]


try:
		if not is_flax_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCAmelCase__  :str             =							[
		    '''FlaxXGLMForCausalLM''',
		    '''FlaxXGLMModel''',
		    '''FlaxXGLMPreTrainedModel''',
		]


try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCAmelCase__  :List[Any]             =							[
		    '''TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''TFXGLMForCausalLM''',
		    '''TFXGLMModel''',
		    '''TFXGLMPreTrainedModel''',
		]


if TYPE_CHECKING:
		from .configuration_xglm import XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XGLMConfig

		try:
				if not is_sentencepiece_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_xglm import XGLMTokenizer

		try:
				if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_xglm_fast import XGLMTokenizerFast

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_xglm import XGLM_PRETRAINED_MODEL_ARCHIVE_LIST, XGLMForCausalLM, XGLMModel, XGLMPreTrainedModel

		try:
				if not is_flax_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_flax_xglm import FlaxXGLMForCausalLM, FlaxXGLMModel, FlaxXGLMPreTrainedModel

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_xglm import (
				    TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFXGLMForCausalLM,
				    TFXGLMModel,
				    TFXGLMPreTrainedModel,
				)


else:
		import sys

		lowerCAmelCase__  :Any             =							_LazyModule(__name__, globals()['''__file__'''], _import_structure)
