pymllm.convertor.model_file_v2 ============================== .. py:module:: pymllm.convertor.model_file_v2 Attributes ---------- .. autoapisummary:: pymllm.convertor.model_file_v2.MLLM_MODEL_FILE_V2_MAGIC_NUMBER pymllm.convertor.model_file_v2.MLLM_MODEL_FILE_V2_VERSION pymllm.convertor.model_file_v2.MLLM_MODEL_FILE_V2_MODEL_NAME_LENGTH pymllm.convertor.model_file_v2.MLLM_MODEL_FILE_V2_PARAMS_NAME_LENGTH pymllm.convertor.model_file_v2.MLLM_MODEL_FILE_V2_TENSOR_SHAPE_LENGTH Classes ------- .. autoapisummary:: pymllm.convertor.model_file_v2.ModelFileV2Descriptor pymllm.convertor.model_file_v2.ModelFileV2ParamsDescriptor pymllm.convertor.model_file_v2.ModelFileV2 Module Contents --------------- .. py:data:: MLLM_MODEL_FILE_V2_MAGIC_NUMBER :value: 20890 .. py:data:: MLLM_MODEL_FILE_V2_VERSION :value: 2 .. py:data:: MLLM_MODEL_FILE_V2_MODEL_NAME_LENGTH :value: 512 .. py:data:: MLLM_MODEL_FILE_V2_PARAMS_NAME_LENGTH :value: 256 .. py:data:: MLLM_MODEL_FILE_V2_TENSOR_SHAPE_LENGTH :value: 16 .. py:class:: ModelFileV2Descriptor(model_name, num_params) .. py:attribute:: SIZE :value: 532 .. py:attribute:: magic :value: 20890 .. py:attribute:: version :value: 2 .. py:attribute:: model_name .. py:attribute:: num_params .. py:attribute:: params_desc_offset :value: 0 .. py:class:: ModelFileV2ParamsDescriptor(param_id, param_type, param_size, param_offset, shape, name) .. py:attribute:: SIZE :value: 352 .. py:attribute:: param_id .. py:attribute:: param_type .. py:attribute:: param_size .. py:attribute:: param_offset .. py:attribute:: shape_len .. py:attribute:: shape .. py:attribute:: name .. py:class:: ModelFileV2(file_path, model_name, update_mode='Static', **kwargs) .. py:attribute:: file_path .. py:attribute:: model_name .. py:attribute:: update_mode :value: 'Static' .. py:attribute:: v2_param_descriptor :type: List[ModelFileV2ParamsDescriptor] :value: [] .. py:attribute:: v2_file_header .. py:attribute:: file_handler .. py:method:: streaming_write(tensor_name, tensor_obj) .. py:method:: static_write(tensor_obj) .. py:method:: finalize()