Preliminary support for importing PyTorch weights. (#511)

* Pickle work-in-progress.

* More unpickling.

* More pickling.

* Proper handling of setitems.

* Clippy.

* Again more pickling.

* Restore the example.

* Add enough pickle support to get the list of tensors.

* Read the data from zip files.

* Retrieve the tensor shape.

* Extract the size and dtype.

* More storage types.

* Improve the destructuring.
This commit is contained in:
Laurent Mazare
2023-08-19 11:26:32 +01:00
committed by GitHub
parent 90ff04e77e
commit ad33715c61
3 changed files with 573 additions and 0 deletions

View File

@ -56,6 +56,7 @@ pub mod layout;
mod mkl;
pub mod npy;
mod op;
pub mod pickle;
pub mod quantized;
pub mod safetensors;
pub mod shape;