


'''simple docstring'''

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


lowerCAmelCase				:Any        =      logging.get_logger(__name__)

lowerCAmelCase				:Tuple        =      {
    '''s-JoL/Open-Llama-V1''': '''https://huggingface.co/s-JoL/Open-Llama-V1/blob/main/config.json''',
}
class _lowerCamelCase	(						lowercase__							):



		'''simple docstring'''







		A_     :      Optional[int]				   =    """open-llama"""







		def __init__( self		:						Tuple  ,					_A		:						List[Any]=100000  ,					_A		:						Dict=4096  ,					_A		:						List[str]=11008  ,					_A		:						Any=32  ,					_A		:						Union[str, Any]=32  ,					_A		:						Optional[int]="silu"  ,					_A		:						Optional[Any]=2048  ,					_A		:						str=0.02  ,					_A		:						Tuple=1E-6  ,					_A		:						int=True  ,					_A		:						Optional[int]=0  ,					_A		:						Tuple=1  ,					_A		:						List[str]=2  ,					_A		:						List[str]=False  ,					_A		:						Optional[int]=True  ,					_A		:						str=0.1  ,					_A		:						Optional[Any]=0.1  ,					_A		:						List[str]=True  ,					_A		:						Optional[Any]=True  ,					_A		:						str=None  ,					**_A		:						List[str]  ,					)  ->			List[Any]:
			__magic_name__	:   Dict					     =					vocab_size
			__magic_name__	:   str					     =					max_position_embeddings
			__magic_name__	:   int					     =					hidden_size
			__magic_name__	:   List[str]					     =					intermediate_size
			__magic_name__	:   Any					     =					num_hidden_layers
			__magic_name__	:   Dict					     =					num_attention_heads
			__magic_name__	:   List[str]					     =					hidden_act
			__magic_name__	:   Union[str, Any]					     =					initializer_range
			__magic_name__	:   int					     =					rms_norm_eps
			__magic_name__	:   Dict					     =					use_cache
			__magic_name__	:   List[Any]					     =					kwargs.pop(
			    'use_memorry_efficient_attention'  ,					_A      )
			__magic_name__	:   Optional[int]					     =					hidden_dropout_prob
			__magic_name__	:   List[Any]					     =					attention_dropout_prob
			__magic_name__	:   str					     =					use_stable_embedding
			__magic_name__	:   Any					     =					shared_input_output_embedding
			__magic_name__	:   Optional[int]					     =					rope_scaling
			self._rope_scaling_validation()

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







		def        __lowerCAmelCase		( self		:						Dict      )  ->			Optional[int]:
			if self.rope_scaling is None:
				return

			if not isinstance(self.rope_scaling  ,					_A      ) 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}'      )
			__magic_name__	:   Dict					     =					self.rope_scaling.get('type'  ,					_A      )
			__magic_name__	:   int					     =					self.rope_scaling.get('factor'  ,					_A      )
			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(_A  ,					_A      ) 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 warnings

from ...utils import logging
from .image_processing_beit import BeitImageProcessor


lowerCAmelCase				:Tuple        =      logging.get_logger(__name__)
class _lowerCamelCase	(						lowercase__							):



		'''simple docstring'''







		def __init__( self		:						Any  ,					*_A		:						List[Any]  ,					**_A		:						str      )  ->			None:
			warnings.warn(
			    'The class BeitFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please'
			    ' use BeitImageProcessor instead.'  ,					_A  ,					)
			super().__init__(*_A  ,					**_A      )