



def 						UpperCAmelCase (    _lowerCamelCase = "mytext.txt"			,     _lowerCamelCase = False     ):
			import socket

			A				:       Tuple														=    1_2312  # Reserve a port for your service.
			A				:       int														=    socket.socket()  # Create a socket object
			A				:       List[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:
						A				:       List[Any]														=    sock.accept()  # Establish connection with client.
						print(f"""Got connection from {addr}"""     )
						A				:       Tuple														=    conn.recv(1024     )
						print(f"""Server received: {data = }"""     )

						with open(_lowerCamelCase			,     "rb"     ) as in_file:
									A				:       Tuple														=    in_file.read(1024     )
									while data:
												conn.send(_lowerCamelCase     )
												print(f"""Sent {data!r}"""     )
												A				:       Optional[Any]														=    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()
'''simple docstring'''





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


UpperCamelCase       :     Any			=    logging.get_logger(__name__)

UpperCamelCase       :     Optional[int]			=    {
    """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   UpperCamelCase					(       a_       ):







    """simple docstring"""





    A     :    List[str]				=			"cpmant"





    def __init__(					self     :						Tuple							,							UpperCAmelCase_     :						int = 3_0_7_2_0							,							UpperCAmelCase_     :						int = 4_0_9_6							,							UpperCAmelCase_     :						int = 3_2							,							UpperCAmelCase_     :						int = 1_2_8							,							UpperCAmelCase_     :						int = 1_0_2_4_0							,							UpperCAmelCase_     :						int = 4_8							,							UpperCAmelCase_     :						int = 0.0							,							UpperCAmelCase_     :						int = 5_1_2							,							UpperCAmelCase_     :						int = 2_0_4_8							,							UpperCAmelCase_     :						int = 1e-6							,							UpperCAmelCase_     :						float = 1.0							,							UpperCAmelCase_     :						int = 3_2							,							UpperCAmelCase_     :						int = 3_2							,							UpperCAmelCase_     :						int = 3_2							,							UpperCAmelCase_     :						bool = True							,							**UpperCAmelCase_     :						Tuple							,							):


         """simple docstring"""







         super().__init__(**UpperCAmelCase_)
         a					:							Union[str, Any]							= prompt_types
         a					:							List[str]							= prompt_length
         a					:							List[Any]							= segment_types
         a					:							Any							= hidden_size
         a					:							Optional[int]							= num_attention_heads
         a					:							Union[str, Any]							= dim_head
         a					:							int							= dim_ff
         a					:							Union[str, Any]							= num_hidden_layers
         a					:							List[Any]							= position_bias_num_buckets
         a					:							Optional[int]							= position_bias_max_distance
         a					:							str							= dropout_p
         a					:							List[str]							= eps
         a					:							Dict							= use_cache
         a					:							Tuple							= vocab_size
         a					:							Optional[Any]							= init_std

