






"""simple docstring"""





from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCamelCase			=      logging.get_logger(__name__)

UpperCamelCase			=      {
    """mnaylor/mega-base-wikitext""": """https://huggingface.co/mnaylor/mega-base-wikitext/resolve/main/config.json""",
}







class 		_a       (						_lowerCAmelCase   ):





   '''simple docstring'''






   UpperCamelCase__      					=    "mega"





   def __init__(   self			,				UpperCAmelCase_=30_522			,				UpperCAmelCase_=128			,				UpperCAmelCase_=4			,				UpperCAmelCase_=256			,				UpperCAmelCase_=16			,				UpperCAmelCase_=True			,				UpperCAmelCase_=64			,				UpperCAmelCase_=False			,				UpperCAmelCase_=-1			,				UpperCAmelCase_=None			,				UpperCAmelCase_=True			,				UpperCAmelCase_="scalenorm"			,				UpperCAmelCase_=True			,				UpperCAmelCase_="silu"			,				UpperCAmelCase_="softmax"			,				UpperCAmelCase_=0.1			,				UpperCAmelCase_=0.1			,				UpperCAmelCase_=0.1			,				UpperCAmelCase_=False			,				UpperCAmelCase_=True			,				UpperCAmelCase_=256			,				UpperCAmelCase_=True			,				UpperCAmelCase_=0.1			,				UpperCAmelCase_=2_048			,				UpperCAmelCase_=False			,				UpperCAmelCase_=2			,				UpperCAmelCase_=0.02			,				UpperCAmelCase_=0.2			,				UpperCAmelCase_=0.02			,				UpperCAmelCase_=1.0			,				UpperCAmelCase_=1			,				UpperCAmelCase_=0			,				UpperCAmelCase_=2			,				UpperCAmelCase_="rotary"			,				UpperCAmelCase_=None			,				UpperCAmelCase_=True			,				UpperCAmelCase_=True			,				**UpperCAmelCase_			,				)	-> Dict:




          '''simple docstring'''




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

          lowercase__:    str        =      vocab_size
          lowercase__:    Optional[Any]        =      hidden_size
          lowercase__:    str        =      num_hidden_layers
          lowercase__:    int        =      activation
          lowercase__:    Any        =      attention_activation
          lowercase__:    List[str]        =      intermediate_size
          lowercase__:    List[Any]        =      ema_projection_size
          lowercase__:    str        =      bidirectional
          lowercase__:    Union[str, Any]        =      shared_representation_size
          lowercase__:    int        =      use_chunking
          lowercase__:    Optional[int]        =      chunk_size
          lowercase__:    str        =      truncation
          lowercase__:    int        =      normalize_before_mega
          lowercase__:    Optional[Any]        =      normalization_type
          lowercase__:    Any        =      norm_affine
          lowercase__:    Dict        =      dropout_prob
          lowercase__:    Tuple        =      hidden_dropout_prob
          lowercase__:    Optional[Any]        =      attention_probs_dropout_prob
          lowercase__:    Dict        =      use_feature_dropout
          lowercase__:    int        =      use_normalized_ffn
          lowercase__:    Optional[int]        =      nffn_hidden_size
          lowercase__:    Union[str, Any]        =      normalize_before_ffn
          lowercase__:    Dict        =      nffn_activation_dropout_prob
          lowercase__:    List[str]        =      max_positions
          lowercase__:    str        =      add_token_type_embeddings
          lowercase__:    List[Any]        =      type_vocab_size
          lowercase__:    Any        =      initializer_range
          lowercase__:    Union[str, Any]        =      ema_delta_alpha_range
          lowercase__:    List[str]        =      ema_beta_range
          lowercase__:    int        =      ema_gamma_omega_range
          lowercase__:    Dict        =      relative_positional_bias
          lowercase__:    Optional[Any]        =      use_cache
          lowercase__:    int        =      classifier_dropout
          lowercase__:    Dict        =      add_lm_hidden_dense_layer
          lowercase__:    List[Any]        =      1  # not used but required by Hugging Face







class 		_a       (						_lowerCAmelCase   ):





   '''simple docstring'''






   @property
   def __lowercase    (   self)	-> Union[str, Any]:




          '''simple docstring'''




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














"""simple docstring"""





from __future__ import annotations






def     A(  snake_case_						,       snake_case_		):
       """simple docstring"""





       lowercase__  ,     lowercase__:    Optional[int]        =      0, len(snake_case_		) - 1
       while start_ind <= end_ind:
              if array[start_ind] == search_item:
                     return start_ind
              elif array[end_ind] == search_item:
                     return end_ind
              else:
                     start_ind += 1
                     end_ind -= 1
    # returns -1 if search_item is not found in array
       return -1


if __name__ == "__main__":
  print(double_linear_search(list(range(1_00)), 40))






