





from collections import OrderedDict
from typing import Mapping

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


UpperCAmelCase	:	Any		     =       logging.get_logger(__name__)

UpperCAmelCase	:	str		     =       {
    """kssteven/ibert-roberta-base""": """https://huggingface.co/kssteven/ibert-roberta-base/resolve/main/config.json""",
    """kssteven/ibert-roberta-large""": """https://huggingface.co/kssteven/ibert-roberta-large/resolve/main/config.json""",
    """kssteven/ibert-roberta-large-mnli""": (
        """https://huggingface.co/kssteven/ibert-roberta-large-mnli/resolve/main/config.json"""
    ),
}







class 				__lowerCAmelCase       (    UpperCamelCase__):
      _lowercase				:					int						=			"""ibert"""







      def __init__(    self		,      lowerCAmelCase__=3_0_5_2_2		,      lowerCAmelCase__=7_6_8		,      lowerCAmelCase__=1_2		,      lowerCAmelCase__=1_2		,      lowerCAmelCase__=3_0_7_2		,      lowerCAmelCase__="gelu"		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=5_1_2		,      lowerCAmelCase__=2		,      lowerCAmelCase__=0.02		,      lowerCAmelCase__=1E-12		,      lowerCAmelCase__=1		,      lowerCAmelCase__=0		,      lowerCAmelCase__=2		,      lowerCAmelCase__="absolute"		,      lowerCAmelCase__=False		,      lowerCAmelCase__="none"		,      **lowerCAmelCase__		,      )   ->						Any:



        '''simple docstring'''




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

        a__	:					str										=vocab_size
        a__	:					Optional[Any]										=hidden_size
        a__	:					str										=num_hidden_layers
        a__	:					List[Any]										=num_attention_heads
        a__	:					Any										=hidden_act
        a__	:					List[str]										=intermediate_size
        a__	:					Tuple										=hidden_dropout_prob
        a__	:					Any										=attention_probs_dropout_prob
        a__	:					Union[str, Any]										=max_position_embeddings
        a__	:					Tuple										=type_vocab_size
        a__	:					Tuple										=initializer_range
        a__	:					Union[str, Any]										=layer_norm_eps
        a__	:					Optional[int]										=position_embedding_type
        a__	:					str										=quant_mode
        a__	:					str										=force_dequant







class 				__lowerCAmelCase       (    UpperCamelCase__):







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



        '''simple docstring'''




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













from typing import Optional

import pyspark

from .. import Features, NamedSplit
from ..download import DownloadMode
from ..packaged_modules.spark.spark import Spark
from .abc import AbstractDatasetReader







class 				__lowerCAmelCase       (    UpperCamelCase__):







      def __init__(    self		,      lowerCAmelCase__		,      lowerCAmelCase__ = None		,      lowerCAmelCase__ = None		,      lowerCAmelCase__ = True		,      lowerCAmelCase__ = None		,      lowerCAmelCase__ = False		,      lowerCAmelCase__ = None		,      lowerCAmelCase__ = True		,      lowerCAmelCase__ = "arrow"		,      **lowerCAmelCase__		,      )   ->						Optional[int]:



        '''simple docstring'''




        super().__init__(
            split=lowerCAmelCase__		,      features=lowerCAmelCase__		,      cache_dir=lowerCAmelCase__		,      keep_in_memory=lowerCAmelCase__		,      streaming=lowerCAmelCase__		,      **lowerCAmelCase__		,      )
        a__	:					int										=load_from_cache_file
        a__	:					Tuple										=file_format
        a__	:					List[Any]										=Spark(
            df=lowerCAmelCase__		,      features=lowerCAmelCase__		,      cache_dir=lowerCAmelCase__		,      working_dir=lowerCAmelCase__		,      **lowerCAmelCase__		,      )







      def    _lowercase  (    self							)   ->						str:



        '''simple docstring'''




        if self.streaming:
          return self.builder.as_streaming_dataset(split=self.split							)
        a__	:					str										=None if self._load_from_cache_file else DownloadMode.FORCE_REDOWNLOAD
        self.builder.download_and_prepare(
            download_mode=lowerCAmelCase__		,      file_format=self._file_format		,      )
        return self.builder.as_dataset(split=self.split							)






