






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


UpperCamelCase			    =     logging.get_logger(__name__)

UpperCamelCase			    =     {
    '''bigcode/gpt_bigcode-santacoder''': '''https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json''',
}



class 				__UpperCAmelCase		(_UpperCAmelCase   ):
			__snake_case    :				Optional[Any]									=							"gpt_bigcode"
			__snake_case    :				Optional[int]									=							["past_key_values"]
			__snake_case    :				List[str]									=							{
			    "hidden_size": "n_embd",
			    "max_position_embeddings": "n_positions",
			    "num_attention_heads": "n_head",
			    "num_hidden_layers": "n_layer",
			}







			def __init__(     self:  List[Any]				,     UpperCAmelCase_:  Union[str, Any]=50_257				,     UpperCAmelCase_:  Optional[int]=1_024				,     UpperCAmelCase_:  Tuple=768				,     UpperCAmelCase_:  Union[str, Any]=12				,     UpperCAmelCase_:  str=12				,     UpperCAmelCase_:  int=None				,     UpperCAmelCase_:  Dict="gelu_pytorch_tanh"				,     UpperCAmelCase_:  Union[str, Any]=0.1				,     UpperCAmelCase_:  Union[str, Any]=0.1				,     UpperCAmelCase_:  List[Any]=0.1				,     UpperCAmelCase_:  Optional[Any]=1E-5				,     UpperCAmelCase_:  int=0.02				,     UpperCAmelCase_:  Union[str, Any]=True				,     UpperCAmelCase_:  Optional[Any]=True				,     UpperCAmelCase_:  int=50_256				,     UpperCAmelCase_:  str=50_256				,     UpperCAmelCase_:  Optional[Any]=True				,     UpperCAmelCase_:  List[str]=True				,     UpperCAmelCase_:  int=True				,     **UpperCAmelCase_:  Optional[int]				,     ):







									'''simple docstring'''




									_SCREAMING_SNAKE_CASE     				=  vocab_size
									_SCREAMING_SNAKE_CASE     				=  n_positions
									_SCREAMING_SNAKE_CASE     				=  n_embd
									_SCREAMING_SNAKE_CASE     				=  n_layer
									_SCREAMING_SNAKE_CASE     				=  n_head
									_SCREAMING_SNAKE_CASE     				=  n_inner
									_SCREAMING_SNAKE_CASE     				=  activation_function
									_SCREAMING_SNAKE_CASE     				=  resid_pdrop
									_SCREAMING_SNAKE_CASE     				=  embd_pdrop
									_SCREAMING_SNAKE_CASE     				=  attn_pdrop
									_SCREAMING_SNAKE_CASE     				=  layer_norm_epsilon
									_SCREAMING_SNAKE_CASE     				=  initializer_range
									_SCREAMING_SNAKE_CASE     				=  scale_attn_weights
									_SCREAMING_SNAKE_CASE     				=  use_cache
									_SCREAMING_SNAKE_CASE     				=  attention_softmax_in_fpaa
									_SCREAMING_SNAKE_CASE     				=  scale_attention_softmax_in_fpaa
									_SCREAMING_SNAKE_CASE     				=  multi_query

									_SCREAMING_SNAKE_CASE     				=  bos_token_id
									_SCREAMING_SNAKE_CASE     				=  eos_token_id

									super().__init__(bos_token_id=UpperCAmelCase_				,     eos_token_id=UpperCAmelCase_				,     **UpperCAmelCase_					)









from typing import TYPE_CHECKING

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


UpperCamelCase			    =     {
    '''configuration_layoutlmv3''': [
        '''LAYOUTLMV3_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''LayoutLMv3Config''',
        '''LayoutLMv3OnnxConfig''',
    ],
    '''processing_layoutlmv3''': ['''LayoutLMv3Processor'''],
    '''tokenization_layoutlmv3''': ['''LayoutLMv3Tokenizer'''],
}

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

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		UpperCamelCase			    =     [
		    '''LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''LayoutLMv3ForQuestionAnswering''',
		    '''LayoutLMv3ForSequenceClassification''',
		    '''LayoutLMv3ForTokenClassification''',
		    '''LayoutLMv3Model''',
		    '''LayoutLMv3PreTrainedModel''',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		UpperCamelCase			    =     [
		    '''TF_LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''TFLayoutLMv3ForQuestionAnswering''',
		    '''TFLayoutLMv3ForSequenceClassification''',
		    '''TFLayoutLMv3ForTokenClassification''',
		    '''TFLayoutLMv3Model''',
		    '''TFLayoutLMv3PreTrainedModel''',
		]

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		UpperCamelCase			    =     ['''LayoutLMv3FeatureExtractor''']
		UpperCamelCase			    =     ['''LayoutLMv3ImageProcessor''']


if TYPE_CHECKING:
		from .configuration_layoutlmva import (
		    LAYOUTLMV3_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    LayoutLMvaConfig,
		    LayoutLMvaOnnxConfig,
		)
		from .processing_layoutlmva import LayoutLMvaProcessor
		from .tokenization_layoutlmva import LayoutLMvaTokenizer

		try:
				if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_layoutlmva_fast import LayoutLMvaTokenizerFast

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_layoutlmva import (
				    LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST,
				    LayoutLMvaForQuestionAnswering,
				    LayoutLMvaForSequenceClassification,
				    LayoutLMvaForTokenClassification,
				    LayoutLMvaModel,
				    LayoutLMvaPreTrainedModel,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_layoutlmva import (
				    TF_LAYOUTLMV3_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFLayoutLMvaForQuestionAnswering,
				    TFLayoutLMvaForSequenceClassification,
				    TFLayoutLMvaForTokenClassification,
				    TFLayoutLMvaModel,
				    TFLayoutLMvaPreTrainedModel,
				)

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_layoutlmva import LayoutLMvaFeatureExtractor
				from .image_processing_layoutlmva import LayoutLMvaImageProcessor

else:
		import sys

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

