coreweave / tensorizer

Module, Model, and Tensor Serialization/Deserialization
MIT License
180 stars 25 forks source link

refactor: Reorganize Deserialization Parsing #48

Closed Eta0 closed 1 year ago

Eta0 commented 1 year ago

Deserialization Reorganization

This change groups encoding and decoding logic for header and metadata entries into dedicated classes, completely separate from the TensorSerializer and TensorDeserializer classes. TensorSerializer was already mostly updated to do this in #46, so this mainly affects TensorDeserializer.

This disentangles most of the parsing of tensorizer's custom binary format from the use of that data, making it easier to update and optimize the deserializer's major bottlenecks like I/O, hash computation, and device transfer as was done in the serializer.