



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


__A       =logging.get_logger(__name__)

__A       ={
    # pcqm4mv1 now deprecated
    "graphormer-base": "https://huggingface.co/clefourrier/graphormer-base-pcqm4mv2/resolve/main/config.json",
    # See all Graphormer models at https://huggingface.co/models?filter=graphormer
}

class 						UpperCAmelCase__     (     __UpperCamelCase  ):




			'''simple docstring'''






			UpperCamelCase     		=			"""graphormer"""
			UpperCamelCase     		=			["""past_key_values"""]




			def __init__(  self				:					str			,			a_				:					int = 1			,			a_				:					int = 5_12 * 9			,			a_				:					int = 5_12 * 3			,			a_				:					int = 5_12			,			a_				:					int = 5_12			,			a_				:					int = 5_12			,			a_				:					int = 1_28			,			a_				:					int = 5			,			a_				:					int = 10_24			,			a_				:					str = "multi_hop"			,			a_				:					int = 5_12			,			a_				:					bool = False			,			a_				:					int = 12			,			a_				:					int = 7_68			,			a_				:					int = 7_68			,			a_				:					int = 32			,			a_				:					float = 0.1			,			a_				:					float = 0.1			,			a_				:					float = 0.0			,			a_				:					bool = False			,			a_				:					bool = False			,			a_				:					bool = False			,			a_				:					str = "gelu"			,			a_				:					float = None			,			a_				:					bool = False			,			a_				:					int = 0			,			a_				:					bool = False			,			a_				:					float = 0.0			,			a_				:					int = 8			,			a_				:					int = None			,			a_				:					int = None			,			a_				:					bool = True			,			a_				:					bool = True			,			a_				:					List[str]=0			,			a_				:					Dict=1			,			a_				:					Dict=2			,			**a_				:					Union[str, Any]			,			):
					'''simple docstring'''





					__UpperCAmelCase       :	Optional[int]						=      num_classes
					__UpperCAmelCase       :	str						=      num_atoms
					__UpperCAmelCase       :	Optional[Any]						=      num_in_degree
					__UpperCAmelCase       :	Optional[int]						=      num_out_degree
					__UpperCAmelCase       :	Union[str, Any]						=      num_edges
					__UpperCAmelCase       :	Optional[int]						=      num_spatial
					__UpperCAmelCase       :	Dict						=      num_edge_dis
					__UpperCAmelCase       :	Any						=      edge_type
					__UpperCAmelCase       :	Optional[int]						=      multi_hop_max_dist
					__UpperCAmelCase       :	int						=      spatial_pos_max
					__UpperCAmelCase       :	Optional[Any]						=      max_nodes
					__UpperCAmelCase       :	Optional[Any]						=      num_hidden_layers
					__UpperCAmelCase       :	Any						=      embedding_dim
					__UpperCAmelCase       :	Optional[Any]						=      embedding_dim
					__UpperCAmelCase       :	List[str]						=      ffn_embedding_dim
					__UpperCAmelCase       :	List[str]						=      num_attention_heads
					__UpperCAmelCase       :	int						=      dropout
					__UpperCAmelCase       :	Optional[Any]						=      attention_dropout
					__UpperCAmelCase       :	List[Any]						=      layerdrop
					__UpperCAmelCase       :	Optional[Any]						=      encoder_normalize_before
					__UpperCAmelCase       :	Any						=      pre_layernorm
					__UpperCAmelCase       :	int						=      apply_graphormer_init
					__UpperCAmelCase       :	Optional[int]						=      activation_fn
					__UpperCAmelCase       :	Union[str, Any]						=      embed_scale
					__UpperCAmelCase       :	List[str]						=      freeze_embeddings
					__UpperCAmelCase       :	Optional[Any]						=      num_trans_layers_to_freeze
					__UpperCAmelCase       :	str						=      share_input_output_embed
					__UpperCAmelCase       :	List[Any]						=      traceable
					__UpperCAmelCase       :	Union[str, Any]						=      q_noise
					__UpperCAmelCase       :	Dict						=      qn_block_size

					# These parameters are here for future extensions
					# atm, the model only supports self attention
					__UpperCAmelCase       :	Any						=      kdim
					__UpperCAmelCase       :	List[str]						=      vdim
					__UpperCAmelCase       :	List[Any]						=      self_attention
					__UpperCAmelCase       :	Any						=      bias

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










from typing import TYPE_CHECKING

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


__A       ={
    "configuration_speech_to_text_2": ["SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP", "Speech2Text2Config"],
    "processing_speech_to_text_2": ["Speech2Text2Processor"],
    "tokenization_speech_to_text_2": ["Speech2Text2Tokenizer"],
}


try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__A       =[
				    "SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST",
				    "Speech2Text2ForCausalLM",
				    "Speech2Text2PreTrainedModel",
				]


if TYPE_CHECKING:
				from .configuration_speech_to_text_a import SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP, SpeechaTextaConfig
				from .processing_speech_to_text_a import SpeechaTextaProcessor
				from .tokenization_speech_to_text_a import SpeechaTextaTokenizer

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_speech_to_text_a import (
								    SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST,
								    SpeechaTextaForCausalLM,
								    SpeechaTextaPreTrainedModel,
								)

else:
				import sys

				__A       =_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





