




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


_A							    =	logging.get_logger(__name__)

_A							    =	{
    """openbmb/cpm-ant-10b""": """https://huggingface.co/openbmb/cpm-ant-10b/blob/main/config.json"""
    # See all CPMAnt models at https://huggingface.co/models?filter=cpmant
}


class 							_lowerCAmelCase		(     UpperCamelCase__	):
				lowerCamelCase__									=    'cpmant'




				def __init__( self		,		snake_case_ = 30_720		,		snake_case_ = 4_096		,		snake_case_ = 32		,		snake_case_ = 128		,		snake_case_ = 10_240		,		snake_case_ = 48		,		snake_case_ = 0.0		,		snake_case_ = 512		,		snake_case_ = 2_048		,		snake_case_ = 1E-6		,		snake_case_ = 1.0		,		snake_case_ = 32		,		snake_case_ = 32		,		snake_case_ = 32		,		snake_case_ = True		,		**snake_case_		,		)    ->      Union[str, Any]:
											super().__init__(**snake_case_							)
											SCREAMING_SNAKE_CASE			: Tuple	     =prompt_types
											SCREAMING_SNAKE_CASE			: Tuple	     =prompt_length
											SCREAMING_SNAKE_CASE			: Optional[Any]	     =segment_types
											SCREAMING_SNAKE_CASE			: Tuple	     =hidden_size
											SCREAMING_SNAKE_CASE			: Optional[Any]	     =num_attention_heads
											SCREAMING_SNAKE_CASE			: str	     =dim_head
											SCREAMING_SNAKE_CASE			: Tuple	     =dim_ff
											SCREAMING_SNAKE_CASE			: Any	     =num_hidden_layers
											SCREAMING_SNAKE_CASE			: Tuple	     =position_bias_num_buckets
											SCREAMING_SNAKE_CASE			: Tuple	     =position_bias_max_distance
											SCREAMING_SNAKE_CASE			: Optional[int]	     =dropout_p
											SCREAMING_SNAKE_CASE			: int	     =eps
											SCREAMING_SNAKE_CASE			: Any	     =use_cache
											SCREAMING_SNAKE_CASE			: Optional[int]	     =vocab_size
											SCREAMING_SNAKE_CASE			: List[Any]	     =init_std












def 						lowerCAmelCase_       (	__a = "mytext.txt"	,	__a = False )       ->			None:





							"""simple docstring"""





							import socket

							SCREAMING_SNAKE_CASE			: int	     =12312  # Reserve a port for your service.
							SCREAMING_SNAKE_CASE			: Dict	     =socket.socket()  # Create a socket object
							SCREAMING_SNAKE_CASE			: Any	     =socket.gethostname()  # Get local machine name
							sock.bind((host, port) )  # Bind to the port
							sock.listen(5 )  # Now wait for client connection.

							print('''Server listening....''' )

							while True:
														SCREAMING_SNAKE_CASE     ,							SCREAMING_SNAKE_CASE			: Optional[int]	     =sock.accept()  # Establish connection with client.
														print(f'Got connection from {addr}' )
														SCREAMING_SNAKE_CASE			: List[str]	     =conn.recv(1024 )
														print(f'Server received: {data = }' )

														with open(__a	,	'''rb''' ) as in_file:
																					SCREAMING_SNAKE_CASE			: Dict	     =in_file.read(1024 )
																					while data:
																												conn.send(__a )
																												print(f'Sent {data!r}' )
																												SCREAMING_SNAKE_CASE			: str	     =in_file.read(1024 )

														print('''Done sending''' )
														conn.close()
														if testing:  # Allow the test to complete
																					break

							sock.shutdown(1 )
							sock.close()


if __name__ == "__main__":
							send_file()






