Skip to main content

Pure-Python safetensors

Project description

pure_safetensors

Safetensors library but in pure clean Python. Run it on PyPy or IronPython or wherever.

Dependencies

We try to keep dependencies light:

Optionally, this library integrates with NumPy (if available). PyTorch integration is planned.

To run the tests, you'll need pytest, numpy, and optionally hypothesis.

Examples

TODO

Bugs

The space allocator is a greedy algorithm based on first-fit-decreasing bin packing. So if you add/remove tensors to an existing file, it may leave too much empty space behind.

Alternatives

pure_safetensors safetensors pure_torch.py safetensors.cpp
Written in pure Python?
Supports NumPy directly (no PyTorch)?
Can write safetensors files?
Can add/delete tensors in-place (no copying)?
Has unit tests?
Stable API? 🤷
Automatically make files sparse to save space?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pure_safetensors-0.1.0.tar.gz (10.8 kB view hashes)

Uploaded Source

Built Distribution

pure_safetensors-0.1.0-py3-none-any.whl (10.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page