loongson/pypi/: safetensors-0.4.3 metadata and description

Simple index

author_email Nicolas Patry <patry.nicolas@protonmail.com>
classifiers
  • Development Status :: 5 - Production/Stable
  • Intended Audience :: Developers
  • Intended Audience :: Education
  • Intended Audience :: Science/Research
  • License :: OSI Approved :: Apache Software License
  • Operating System :: OS Independent
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.7
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Topic :: Scientific/Engineering :: Artificial Intelligence
  • Typing :: Typed
description_content_type text/markdown; charset=UTF-8; variant=GFM
project_urls
  • Homepage, https://github.com/huggingface/safetensors
  • Source, https://github.com/huggingface/safetensors
provides_extras dev
requires_dist
  • numpy >=1.21.6 ; extra == 'numpy'
  • safetensors[numpy] ; extra == 'torch'
  • torch >=1.10 ; extra == 'torch'
  • safetensors[numpy] ; extra == 'tensorflow'
  • tensorflow >=2.11.0 ; extra == 'tensorflow'
  • safetensors[numpy] ; extra == 'pinned-tf'
  • tensorflow ==2.11.0 ; extra == 'pinned-tf'
  • safetensors[numpy] ; extra == 'jax'
  • flax >=0.6.3 ; extra == 'jax'
  • jax >=0.3.25 ; extra == 'jax'
  • jaxlib >=0.3.25 ; extra == 'jax'
  • mlx >=0.0.9 ; extra == 'mlx'
  • safetensors[numpy] ; extra == 'paddlepaddle'
  • paddlepaddle >=2.4.1 ; extra == 'paddlepaddle'
  • black ==22.3 ; extra == 'quality'
  • click ==8.0.4 ; extra == 'quality'
  • isort >=5.5.4 ; extra == 'quality'
  • flake8 >=3.8.3 ; extra == 'quality'
  • safetensors[numpy] ; extra == 'testing'
  • h5py >=3.7.0 ; extra == 'testing'
  • huggingface-hub >=0.12.1 ; extra == 'testing'
  • setuptools-rust >=1.5.2 ; extra == 'testing'
  • pytest >=7.2.0 ; extra == 'testing'
  • pytest-benchmark >=4.0.0 ; extra == 'testing'
  • hypothesis >=6.70.2 ; extra == 'testing'
  • safetensors[torch] ; extra == 'all'
  • safetensors[numpy] ; extra == 'all'
  • safetensors[pinned-tf] ; extra == 'all'
  • safetensors[jax] ; extra == 'all'
  • safetensors[paddlepaddle] ; extra == 'all'
  • safetensors[quality] ; extra == 'all'
  • safetensors[testing] ; extra == 'all'
  • safetensors[all] ; extra == 'dev'
requires_python >=3.7

Because this project isn't in the mirror_whitelist, no releases from root/pypi are included.

File Tox results History
safetensors-0.4.3-cp310-cp310-linux_loongarch64.whl
Size
512 KB
Type
Python Wheel
Python
3.1.0
safetensors-0.4.3-cp311-cp311-linux_loongarch64.whl
Size
512 KB
Type
Python Wheel
Python
3.1.1
safetensors-0.4.3-cp312-cp312-linux_loongarch64.whl
Size
511 KB
Type
Python Wheel
Python
3.1.2
safetensors-0.4.3-cp38-cp38-linux_loongarch64.whl
Size
512 KB
Type
Python Wheel
Python
3.8
safetensors-0.4.3-cp39-cp39-linux_loongarch64.whl
Size
513 KB
Type
Python Wheel
Python
3.9
## Installation

```
pip install safetensors
```


## Usage

### Numpy

```python
from safetensors.numpy import save_file, load_file
import numpy as np

tensors = {
"a": np.zeros((2, 2)),
"b": np.zeros((2, 3), dtype=np.uint8)
}

save_file(tensors, "./model.safetensors")


# Now loading
loaded = load_file("./model.safetensors")
```

### Torch

```python
from safetensors.torch import save_file, load_file
import torch

tensors = {
"a": torch.zeros((2, 2)),
"b": torch.zeros((2, 3), dtype=torch.uint8)
}

save_file(tensors, "./model.safetensors")


# Now loading
loaded = load_file("./model.safetensors")
```

### Developing

```
# inside ./safetensors/bindings/python
pip install .[dev]
```
Should be enough to install this library locally.

### Testing

```
# inside ./safetensors/bindings/python
pip install .[dev]
pytest -sv tests/
```



Render warnings:
<string>:12: (WARNING/2) Inline literal start-string without end-string.