'''simple docstring'''


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


snake_case__					:      Dict				      =  logging.get_logger(__name__)

snake_case__					:      int				      =  {'''ctrl''': '''https://huggingface.co/ctrl/resolve/main/config.json'''}






class 					__SCREAMING_SNAKE_CASE						(	lowercase__	):







  '''simple docstring'''






  lowerCamelCase_		:Dict						   =		"""ctrl"""
  lowerCamelCase_		:Optional[int]						   =		["""past_key_values"""]
  lowerCamelCase_		:List[str]						   =		{
      """max_position_embeddings""": """n_positions""",
      """hidden_size""": """n_embd""",
      """num_attention_heads""": """n_head""",
      """num_hidden_layers""": """n_layer""",
  }


  def __init__(			self				,		snake_case_=2_4_6_5_3_4				,		snake_case_=2_5_6				,		snake_case_=1_2_8_0				,		snake_case_=8_1_9_2				,		snake_case_=4_8				,		snake_case_=1_6				,		snake_case_=0.1				,		snake_case_=0.1				,		snake_case_=1E-6				,		snake_case_=0.02				,		snake_case_=True				,		**snake_case_				,		):




       '''simple docstring'''

       UpperCAmelCase_							:       Tuple       =				vocab_size
       UpperCAmelCase_							:       Union[str, Any]       =				n_positions
       UpperCAmelCase_							:       List[str]       =				n_embd
       UpperCAmelCase_							:       Dict       =				n_layer
       UpperCAmelCase_							:       Optional[int]       =				n_head
       UpperCAmelCase_							:       List[str]       =				dff
       UpperCAmelCase_							:       Tuple       =				resid_pdrop
       UpperCAmelCase_							:       Optional[Any]       =				embd_pdrop
       UpperCAmelCase_							:       str       =				layer_norm_epsilon
       UpperCAmelCase_							:       List[str]       =				initializer_range

       UpperCAmelCase_							:       List[str]       =				use_cache

       super().__init__(**lowercase_						)







'''simple docstring'''


def  _lowerCamelCase   (				lowerCamelCase_ :							str       ):



     """simple docstring"""





     UpperCAmelCase_							:       Optional[int]       =				[0] * len(lowerCamelCase_       )

     for i in range(1     ,					len(lowerCamelCase_       )       ):
          # use last results for better performance - dynamic programming
          UpperCAmelCase_							:       List[Any]       =				prefix_result[i - 1]
          while j > 0 and input_string[i] != input_string[j]:
               UpperCAmelCase_							:       str       =				prefix_result[j - 1]

          if input_string[i] == input_string[j]:
               j += 1
          UpperCAmelCase_							:       Any       =				j

     return prefix_result


def  _lowerCamelCase   (				lowerCamelCase_ :							str       ):



     """simple docstring"""





     return max(prefix_function(lowerCamelCase_       )       )


if __name__ == "__main__":
 import doctest

 doctest.testmod()






