


"""simple docstring"""






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


UpperCAmelCase    :     Optional[Any]   						=		logging.get_logger(__name__)

UpperCAmelCase    :     Tuple   						=		{
    's-JoL/Open-Llama-V1': 'https://huggingface.co/s-JoL/Open-Llama-V1/blob/main/config.json',
}





class      lowerCamelCase__   (     A				):







					"""simple docstring"""


					__a	       =							"""open-llama"""






					def __init__(       self    : List[str] ,       UpperCamelCase    : str=100_000 ,       UpperCamelCase    : Dict=4_096 ,       UpperCamelCase    : Dict=11_008 ,       UpperCamelCase    : List[str]=32 ,       UpperCamelCase    : Union[str, Any]=32 ,       UpperCamelCase    : List[Any]="silu" ,       UpperCamelCase    : Any=2_048 ,       UpperCamelCase    : List[str]=0.02 ,       UpperCamelCase    : Optional[int]=1e-6 ,       UpperCamelCase    : Optional[int]=True ,       UpperCamelCase    : Union[str, Any]=0 ,       UpperCamelCase    : Any=1 ,       UpperCamelCase    : Dict=2 ,       UpperCamelCase    : Dict=False ,       UpperCamelCase    : Union[str, Any]=True ,       UpperCamelCase    : Optional[int]=0.1 ,       UpperCamelCase    : int=0.1 ,       UpperCamelCase    : str=True ,       UpperCamelCase    : Any=True ,       UpperCamelCase    : Tuple=None ,       **UpperCamelCase    : Optional[int] ,       ):
												'''simple docstring'''






												__UpperCAmelCase   :						Any      							=					vocab_size
												__UpperCAmelCase   :						Tuple      							=					max_position_embeddings
												__UpperCAmelCase   :						Optional[int]      							=					hidden_size
												__UpperCAmelCase   :						Tuple      							=					intermediate_size
												__UpperCAmelCase   :						Union[str, Any]      							=					num_hidden_layers
												__UpperCAmelCase   :						Tuple      							=					num_attention_heads
												__UpperCAmelCase   :						Tuple      							=					hidden_act
												__UpperCAmelCase   :						Union[str, Any]      							=					initializer_range
												__UpperCAmelCase   :						Any      							=					rms_norm_eps
												__UpperCAmelCase   :						Tuple      							=					use_cache
												__UpperCAmelCase   :						Dict      							=					kwargs.pop(
												    """use_memorry_efficient_attention""" ,       UpperCamelCase  )
												__UpperCAmelCase   :						Optional[Any]      							=					hidden_dropout_prob
												__UpperCAmelCase   :						List[str]      							=					attention_dropout_prob
												__UpperCAmelCase   :						Any      							=					use_stable_embedding
												__UpperCAmelCase   :						Optional[Any]      							=					shared_input_output_embedding
												__UpperCAmelCase   :						int      							=					rope_scaling
												self._rope_scaling_validation()

												super().__init__(
												    pad_token_id=UpperCamelCase ,       bos_token_id=UpperCamelCase ,       eos_token_id=UpperCamelCase ,       tie_word_embeddings=UpperCamelCase ,       **UpperCamelCase ,       )






					def lowerCamelCase__							(       self    : str  ):
												'''simple docstring'''






												if self.rope_scaling is None:
																			return

												if not isinstance(self.rope_scaling ,       UpperCamelCase  ) or len(self.rope_scaling  ) != 2:
																			raise ValueError(
																			    """`rope_scaling` must be a dictionary with with two fields, `name` and `factor`, """
																			    f'''got {self.rope_scaling}'''  )
												__UpperCAmelCase   :						str      							=					self.rope_scaling.get("""type""" ,       UpperCamelCase  )
												__UpperCAmelCase   :						List[Any]      							=					self.rope_scaling.get("""factor""" ,       UpperCamelCase  )
												if rope_scaling_type is None or rope_scaling_type not in ["linear", "dynamic"]:
																			raise ValueError(
																			    f'''`rope_scaling`\'s name field must be one of [\'linear\', \'dynamic\'], got {rope_scaling_type}'''  )
												if rope_scaling_factor is None or not isinstance(UpperCamelCase ,       UpperCamelCase  ) or rope_scaling_factor <= 1.0:
																			raise ValueError(f'''`rope_scaling`\'s factor field must be an float > 1, got {rope_scaling_factor}'''  )




"""simple docstring"""






import re
def      lowerCamelCase       (     _UpperCamelCase		:      str							)		->       str:

							'''simple docstring'''



							if len(re.findall("""[ATCG]"""       ,			_UpperCamelCase							)							) != len(_UpperCamelCase							):
														raise ValueError("""Invalid Strand"""							)

							return dna.translate(dna.maketrans("""ATCG"""       ,			"""TAGC"""							)							)


if __name__ == "__main__":
							import doctest

							doctest.testmod()
