




from typing import Any

import numpy as np







def 			lowerCamelCase_		(       UpperCamelCase__				:      np.ndarray      )     ->       bool:





				"""simple docstring"""


				return np.array_equal(UpperCamelCase__ ,     matrix.conjugate().T      )







def 			lowerCamelCase_		(       UpperCamelCase__				:      np.ndarray ,     UpperCamelCase__				:      np.ndarray      )     ->       Any:





				"""simple docstring"""


				__lowerCamelCase		       =    v.conjugate().T
				__lowerCamelCase		       =    v_star.dot(UpperCamelCase__      )
				assert isinstance(UpperCamelCase__ ,     np.ndarray      )
				return (v_star_dot.dot(UpperCamelCase__      )) / (v_star.dot(UpperCamelCase__      ))







def 			lowerCamelCase_		(       )     ->       None:





				"""simple docstring"""


				__lowerCamelCase		       =    np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]      )
				__lowerCamelCase		       =    np.array([[1], [2], [3]]      )
				assert is_hermitian(UpperCamelCase__      ), F"""{a} is not hermitian."""
				print(rayleigh_quotient(UpperCamelCase__ ,     UpperCamelCase__      )      )

				__lowerCamelCase		       =    np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]      )
				assert is_hermitian(UpperCamelCase__      ), F"""{a} is not hermitian."""
				assert rayleigh_quotient(UpperCamelCase__ ,     UpperCamelCase__      ) == float(3      )


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					tests()



'''simple docstring'''




from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


__lowercase          =  {
    '''susnato/ernie-m-base_pytorch''': '''https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json''',
    '''susnato/ernie-m-large_pytorch''': '''https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json''',
}






class 				a__(					lowerCAmelCase__	):


			'''simple docstring'''






			UpperCAmelCase_			:     List[str]      =       '''ernie_m'''
			UpperCAmelCase_			:     Dict[str, str]      =       {"dropout": "classifier_dropout", "num_classes": "num_labels"}



			def __init__(   self       ,    __lowerCAmelCase = 250002       ,    __lowerCAmelCase = 768       ,    __lowerCAmelCase = 12       ,    __lowerCAmelCase = 12       ,    __lowerCAmelCase = 3072       ,    __lowerCAmelCase = "gelu"       ,    __lowerCAmelCase = 0.1       ,    __lowerCAmelCase = 0.1       ,    __lowerCAmelCase = 514       ,    __lowerCAmelCase = 0.02       ,    __lowerCAmelCase = 1       ,    __lowerCAmelCase = 1E-0_5       ,    __lowerCAmelCase=None       ,    __lowerCAmelCase=False       ,    __lowerCAmelCase=0.0       ,    **__lowerCAmelCase       ,    ):




					"""simple docstring"""


					super().__init__(pad_token_id=__lowerCAmelCase       ,    **__lowerCAmelCase)
					lowerCAmelCase   					=  vocab_size
					lowerCAmelCase   					=  hidden_size
					lowerCAmelCase   					=  num_hidden_layers
					lowerCAmelCase   					=  num_attention_heads
					lowerCAmelCase   					=  intermediate_size
					lowerCAmelCase   					=  hidden_act
					lowerCAmelCase   					=  hidden_dropout_prob
					lowerCAmelCase   					=  attention_probs_dropout_prob
					lowerCAmelCase   					=  max_position_embeddings
					lowerCAmelCase   					=  initializer_range
					lowerCAmelCase   					=  layer_norm_eps
					lowerCAmelCase   					=  classifier_dropout
					lowerCAmelCase   					=  is_decoder
					lowerCAmelCase   					=  act_dropout




