




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


_lowerCamelCase			:	Dict							 =     logging.get_logger(__name__)

_lowerCamelCase			:	Union[str, Any]							 =     {
    """bigcode/gpt_bigcode-santacoder""": """https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json""",
}


class        UpperCamelCase_					(				UpperCAmelCase__  ):

    '''simple docstring'''






    UpperCAmelCase__													=   '''gpt_bigcode'''
    UpperCAmelCase__													=   ['''past_key_values''']
    UpperCAmelCase__													=   {
        '''hidden_size''': '''n_embd''',
        '''max_position_embeddings''': '''n_positions''',
        '''num_attention_heads''': '''n_head''',
        '''num_hidden_layers''': '''n_layer''',
    }


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





           '''simple docstring'''

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

           A__   				=					bos_token_id
           A__   				=					eos_token_id

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








from typing import TYPE_CHECKING

from ...file_utils import _LazyModule, is_tokenizers_available, is_torch_available, is_vision_available
from ...utils import OptionalDependencyNotAvailable


_lowerCamelCase			:	Union[str, Any]							 =     {"""configuration_dpt""": ["""DPT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """DPTConfig"""]}

try:
  if not is_vision_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _lowerCamelCase			:	Optional[Any]							 =     ["""DPTFeatureExtractor"""]
  _lowerCamelCase			:	int							 =     ["""DPTImageProcessor"""]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _lowerCamelCase			:	Optional[int]							 =     [
      """DPT_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """DPTForDepthEstimation""",
      """DPTForSemanticSegmentation""",
      """DPTModel""",
      """DPTPreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_dpt import DPT_PRETRAINED_CONFIG_ARCHIVE_MAP, DPTConfig

  try:
    if not is_vision_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .feature_extraction_dpt import DPTFeatureExtractor
    from .image_processing_dpt import DPTImageProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_dpt import (
        DPT_PRETRAINED_MODEL_ARCHIVE_LIST,
        DPTForDepthEstimation,
        DPTForSemanticSegmentation,
        DPTModel,
        DPTPreTrainedModel,
    )


else:
  import sys

  _lowerCamelCase			:	Any							 =     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


