






'''simple docstring'''




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


lowerCAmelCase__          =						logging.get_logger(__name__)

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







class       __lowercase					(__lowerCamelCase    ):
	_lowerCamelCase              =  '''open-llama'''

	def __init__(      self   :						Optional[int]  ,					UpperCAmelCase_   :						Any=100_000  ,					UpperCAmelCase_   :						Union[str, Any]=4_096  ,					UpperCAmelCase_   :						int=11_008  ,					UpperCAmelCase_   :						Dict=32  ,					UpperCAmelCase_   :						List[Any]=32  ,					UpperCAmelCase_   :						Optional[int]="silu"  ,					UpperCAmelCase_   :						Optional[int]=2_048  ,					UpperCAmelCase_   :						str=0.02  ,					UpperCAmelCase_   :						Optional[Any]=1e-6  ,					UpperCAmelCase_   :						int=True  ,					UpperCAmelCase_   :						Any=0  ,					UpperCAmelCase_   :						Optional[int]=1  ,					UpperCAmelCase_   :						Union[str, Any]=2  ,					UpperCAmelCase_   :						Any=False  ,					UpperCAmelCase_   :						List[Any]=True  ,					UpperCAmelCase_   :						Tuple=0.1  ,					UpperCAmelCase_   :						Union[str, Any]=0.1  ,					UpperCAmelCase_   :						Tuple=True  ,					UpperCAmelCase_   :						str=True  ,					UpperCAmelCase_   :						List[Any]=None  ,					**UpperCAmelCase_   :						Dict  ,					):
			UpperCamelCase__				:					int					=					vocab_size
			UpperCamelCase__				:					Optional[int]					=					max_position_embeddings
			UpperCamelCase__				:					Dict					=					hidden_size
			UpperCamelCase__				:					Dict					=					intermediate_size
			UpperCamelCase__				:					List[Any]					=					num_hidden_layers
			UpperCamelCase__				:					Union[str, Any]					=					num_attention_heads
			UpperCamelCase__				:					Optional[int]					=					hidden_act
			UpperCamelCase__				:					List[Any]					=					initializer_range
			UpperCamelCase__				:					List[Any]					=					rms_norm_eps
			UpperCamelCase__				:					Optional[int]					=					use_cache
			UpperCamelCase__				:					Any					=					kwargs.pop(
			    'use_memorry_efficient_attention'  ,					UpperCAmelCase_)
			UpperCamelCase__				:					int					=					hidden_dropout_prob
			UpperCamelCase__				:					Tuple					=					attention_dropout_prob
			UpperCamelCase__				:					Optional[Any]					=					use_stable_embedding
			UpperCamelCase__				:					Optional[Any]					=					shared_input_output_embedding
			UpperCamelCase__				:					Dict					=					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      __UpperCamelCase							(      self   :						List[str]):
			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__				:					Optional[Any]					=					self.rope_scaling.get('type'  ,					UpperCAmelCase_)
			UpperCamelCase__				:					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 requests
from bsa import BeautifulSoup







def       __UpperCAmelCase						(  lowerCamelCase_ = "AAPL")							->     str:
		UpperCamelCase__				:					str					=					f'https://in.finance.yahoo.com/quote/{symbol}?s={symbol}'
		UpperCamelCase__				:					Optional[Any]					=					BeautifulSoup(requests.get(lowerCamelCase_).text     ,      'html.parser')
		UpperCamelCase__				:					Union[str, Any]					=					'My(6px) Pos(r) smartphone_Mt(6px)'
		return soup.find('div'     ,      class_=class_).find('span').text


if __name__ == "__main__":
		for symbol in "AAPL AMZN IBM GOOG MSFT ORCL".split():
				print(f'''Current {symbol:<4} stock price is {stock_price(symbol):>8}''')




