Skip to content

Commit 5755bba

Browse files
committed
chore(cargo): update for publishing
1 parent 728da70 commit 5755bba

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

bintensors/Cargo.toml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,32 @@ name = "bintensors"
33
version = "0.0.1-alpha.1"
44
edition = "2024"
55
license = "MIT"
6+
rust-version = "1.85"
67
authors = ["Luca Vivona"]
78
readme = "README.md"
9+
keywords = [
10+
"bintensors",
11+
"safetensors",
12+
"Tensors",
13+
"Pytorch",
14+
"Numpy",
15+
"bincode",
16+
]
817
repository = "https://github.com/GnosisFoundation/bintensors"
918
description = """
10-
Provides functions to read and write bintensors which aim to be faster then
11-
safetensors by using binary serialization rather then a JSON serialization.
12-
The format is 8 bytes which is an unsized int, being the size of a Binary header,
13-
the binary encoder header refers to the `dtype` the `shape` and `data_offsets` which are the offsets
14-
for the values in the rest of the file.
19+
bintensors is a high-performance binary tensor serialization
20+
format designed to be faster than safetensors by eliminating
21+
JSON metadata overhead. Instead of using JSON for metadata storage,
22+
bintensors employs a compact binary header, reducing parsing time and improving I/O efficiency.
23+
The format begins with an 8-byte unsigned integer (u64), indicating the size of the binary header.
24+
This header contains essential tensor metadata, including the data type (dtype),
25+
the shape of the tensor stored as a length-prefixed list,
26+
and data offsets specifying where each tensor's raw values are stored within the file.
27+
An index map is also included for named tensor lookups. With its efficient structure,
28+
bintensors provides a fast and lightweight alternative for serializing and deserializing large models,
29+
making it ideal for machine learning, scientific computing, and other high-performance applications.
1530
"""
31+
exclude = ["target/*", "Cargo.lock"]
1632

1733
[dependencies]
1834
bincode = { version = "2.0.1", default-features = false, features = ["derive"] }
@@ -27,7 +43,7 @@ sha2 = "0.10.8"
2743
sha1 = "0.10.6"
2844

2945

30-
[features]
46+
[features]
3147
default = ["std"]
3248
std = ["bincode/default"]
3349

0 commit comments

Comments
 (0)