"""simple docstring"""


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


lowerCAmelCase_:					List[Any]     =					logging.get_logger(__name__)

lowerCAmelCase_:					Union[str, Any]     =					{"ctrl": "https://huggingface.co/ctrl/resolve/main/config.json"}






class    a__    (   _UpperCAmelCase	):
       snake_case_							=      "ctrl"
       snake_case_							=      ["past_key_values"]
       snake_case_							=      {
           "max_position_embeddings": "n_positions",
           "hidden_size": "n_embd",
           "num_attention_heads": "n_head",
           "num_hidden_layers": "n_layer",
       }


       def __init__(     self,				_UpperCAmelCase=24_6534,				_UpperCAmelCase=256,				_UpperCAmelCase=1280,				_UpperCAmelCase=8192,				_UpperCAmelCase=48,				_UpperCAmelCase=16,				_UpperCAmelCase=0.1,				_UpperCAmelCase=0.1,				_UpperCAmelCase=1E-6,				_UpperCAmelCase=0.02,				_UpperCAmelCase=True,				**_UpperCAmelCase,				):
            '''simple docstring'''



            lowercase__				 =							vocab_size
            lowercase__				 =							n_positions
            lowercase__				 =							n_embd
            lowercase__				 =							n_layer
            lowercase__				 =							n_head
            lowercase__				 =							dff
            lowercase__				 =							resid_pdrop
            lowercase__				 =							embd_pdrop
            lowercase__				 =							layer_norm_epsilon
            lowercase__				 =							initializer_range

            lowercase__				 =							use_cache

            super().__init__(**lowercase__  )





"""simple docstring"""


from typing import Optional

from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader






class    a__    (   _a	):


   def __init__(     self,				_UpperCAmelCase,				_UpperCAmelCase = None,				_UpperCAmelCase = None,				_UpperCAmelCase = None,				_UpperCAmelCase = False,				_UpperCAmelCase = False,				_UpperCAmelCase = None,				**_UpperCAmelCase,				):
        '''simple docstring'''



        super().__init__(
            _UpperCAmelCase,				split=_UpperCAmelCase,				features=_UpperCAmelCase,				cache_dir=_UpperCAmelCase,				keep_in_memory=_UpperCAmelCase,				streaming=_UpperCAmelCase,				num_proc=_UpperCAmelCase,				**_UpperCAmelCase,				)
        lowercase__				 =							path_or_paths if isinstance(_UpperCAmelCase,				_UpperCAmelCase  ) else {self.split: path_or_paths}
        lowercase__				 =							Text(
            cache_dir=_UpperCAmelCase,				data_files=_UpperCAmelCase,				features=_UpperCAmelCase,				**_UpperCAmelCase,				)


   def 	snake_case__	(     self  ):
        '''simple docstring'''



        if self.streaming:
             lowercase__				 =							self.builder.as_streaming_dataset(split=self.split  )
        # Build regular (map-style) dataset
        else:
             lowercase__				 =							None
             lowercase__				 =							None
             lowercase__				 =							None
             lowercase__				 =							None

             self.builder.download_and_prepare(
                 download_config=_UpperCAmelCase,				download_mode=_UpperCAmelCase,				verification_mode=_UpperCAmelCase,				base_path=_UpperCAmelCase,				num_proc=self.num_proc,				)
             lowercase__				 =							self.builder.as_dataset(
                 split=self.split,				verification_mode=_UpperCAmelCase,				in_memory=self.keep_in_memory  )
        return dataset




