




'''simple docstring'''


from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig


_snake_case : Any  				=						{
    'albert-base-v1': 'https://huggingface.co/albert-base-v1/resolve/main/config.json',
    'albert-large-v1': 'https://huggingface.co/albert-large-v1/resolve/main/config.json',
    'albert-xlarge-v1': 'https://huggingface.co/albert-xlarge-v1/resolve/main/config.json',
    'albert-xxlarge-v1': 'https://huggingface.co/albert-xxlarge-v1/resolve/main/config.json',
    'albert-base-v2': 'https://huggingface.co/albert-base-v2/resolve/main/config.json',
    'albert-large-v2': 'https://huggingface.co/albert-large-v2/resolve/main/config.json',
    'albert-xlarge-v2': 'https://huggingface.co/albert-xlarge-v2/resolve/main/config.json',
    'albert-xxlarge-v2': 'https://huggingface.co/albert-xxlarge-v2/resolve/main/config.json',
}

class      A       (						_a       ):
							lowercase_							     =							'albert'







							def __init__(    self			:    List[str]				,     lowerCAmelCase_			:    Tuple=3_00_00				,     lowerCAmelCase_			:    Dict=1_28				,     lowerCAmelCase_			:    str=40_96				,     lowerCAmelCase_			:    int=12				,     lowerCAmelCase_			:    Dict=1				,     lowerCAmelCase_			:    Tuple=64				,     lowerCAmelCase_			:    Union[str, Any]=1_63_84				,     lowerCAmelCase_			:    Dict=1				,     lowerCAmelCase_			:    Union[str, Any]="gelu_new"				,     lowerCAmelCase_			:    List[str]=0				,     lowerCAmelCase_			:    int=0				,     lowerCAmelCase_			:    Dict=5_12				,     lowerCAmelCase_			:    Any=2				,     lowerCAmelCase_			:    Any=0.0_2				,     lowerCAmelCase_			:    Tuple=1e-12				,     lowerCAmelCase_			:    Union[str, Any]=0.1				,     lowerCAmelCase_			:    Union[str, Any]="absolute"				,     lowerCAmelCase_			:    Any=0				,     lowerCAmelCase_			:    List[str]=2				,     lowerCAmelCase_			:    Dict=3				,     **lowerCAmelCase_			:    Any				,     )     ->				Optional[Any]:


														"""simple docstring"""


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

														_a      	=							vocab_size
														_a      	=							embedding_size
														_a      	=							hidden_size
														_a      	=							num_hidden_layers
														_a      	=							num_hidden_groups
														_a      	=							num_attention_heads
														_a      	=							inner_group_num
														_a      	=							hidden_act
														_a      	=							intermediate_size
														_a      	=							hidden_dropout_prob
														_a      	=							attention_probs_dropout_prob
														_a      	=							max_position_embeddings
														_a      	=							type_vocab_size
														_a      	=							initializer_range
														_a      	=							layer_norm_eps
														_a      	=							classifier_dropout_prob
														_a      	=							position_embedding_type



class      A       (						_a       ):







							@property
							def   __lowerCAmelCase     (    self			:    Tuple   )     ->				Mapping[str, Mapping[int, str]]:


														"""simple docstring"""


														if self.task == "multiple-choice":
																					_a      	=							{0: '''batch''', 1: '''choice''', 2: '''sequence'''}
														else:
																					_a      	=							{0: '''batch''', 1: '''sequence'''}
														return OrderedDict(
														    [
														        ('''input_ids''', dynamic_axis),
														        ('''attention_mask''', dynamic_axis),
														        ('''token_type_ids''', dynamic_axis),
														    ]   )







'''simple docstring'''


from __future__ import annotations

from collections import deque
from collections.abc import Iterator
from dataclasses import dataclass

@dataclass
class      A       :
							lowercase_							     =							42
							lowercase_							     =							42



class      A       :







							def __init__(    self			:    Optional[Any]				,     lowerCAmelCase_			:    int   )     ->				str:


														"""simple docstring"""


														_a      	=							[[] for _ in range(lowerCAmelCase_   )]
														_a      	=							size







							def __getitem__(    self			:    Any				,     lowerCAmelCase_			:    int   )     ->				Iterator[Edge]:


														"""simple docstring"""


														return iter(self._graph[vertex]   )







							@property
							def   __lowerCAmelCase     (    self			:    str   )     ->				Tuple:


														"""simple docstring"""


														return self._size







							def   __lowerCAmelCase     (    self			:    Union[str, Any]				,     lowerCAmelCase_			:    int				,     lowerCAmelCase_			:    int				,     lowerCAmelCase_			:    int   )     ->				Dict:


														"""simple docstring"""


														if weight not in (0, 1):
																					raise ValueError('''Edge weight must be either 0 or 1.'''   )

														if to_vertex < 0 or to_vertex >= self.size:
																					raise ValueError('''Vertex indexes must be in [0; size).'''   )

														self._graph[from_vertex].append(Edge(lowerCAmelCase_				,     lowerCAmelCase_   )   )







							def   __lowerCAmelCase     (    self			:    Tuple				,     lowerCAmelCase_			:    int				,     lowerCAmelCase_			:    int   )     ->				int | None:


														"""simple docstring"""


														_a      	=							deque([start_vertex]   )
														_a      	=							[None] * self.size
														_a      	=							0

														while queue:
																					_a      	=							queue.popleft()
																					_a      	=							distances[current_vertex]
																					if current_distance is None:
																												continue

																					for edge in self[current_vertex]:
																												_a      	=							current_distance + edge.weight
																												_a      	=							distances[edge.destination_vertex]
																												if (
																												    isinstance(lowerCAmelCase_				,     lowerCAmelCase_   )
																												    and new_distance >= dest_vertex_distance
																												):
																																			continue
																												_a      	=							new_distance
																												if edge.weight == 0:
																																			queue.appendleft(edge.destination_vertex   )
																												else:
																																			queue.append(edge.destination_vertex   )

														if distances[finish_vertex] is None:
																					raise ValueError('''No path from start_vertex to finish_vertex.'''   )

														return distances[finish_vertex]


if __name__ == "__main__":
				import doctest

				doctest.testmod()

