usearch 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +5 -2
- package/Cargo.toml +1 -1
- package/README.md +5 -5
- package/VERSION +1 -1
- package/conanfile.py +1 -1
- package/package.json +1 -1
- package/python/scripts/bench.py +6 -6
|
@@ -166,6 +166,9 @@ jobs:
|
|
|
166
166
|
name: Publish Docker Image
|
|
167
167
|
needs: versioning
|
|
168
168
|
runs-on: ubuntu-latest
|
|
169
|
+
permissions:
|
|
170
|
+
contents: read
|
|
171
|
+
packages: write
|
|
169
172
|
steps:
|
|
170
173
|
- uses: actions/checkout@v3
|
|
171
174
|
with:
|
|
@@ -177,7 +180,7 @@ jobs:
|
|
|
177
180
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
178
181
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
179
182
|
- name: Log in to GitHub Registry
|
|
180
|
-
uses: docker/login-action@
|
|
183
|
+
uses: docker/login-action@v2
|
|
181
184
|
with:
|
|
182
185
|
registry: ghcr.io
|
|
183
186
|
username: ${{ github.actor }}
|
|
@@ -186,7 +189,7 @@ jobs:
|
|
|
186
189
|
uses: docker/setup-buildx-action@v2
|
|
187
190
|
- name: Extract tags & labels for Docker
|
|
188
191
|
id: meta
|
|
189
|
-
uses: docker/metadata-action@
|
|
192
|
+
uses: docker/metadata-action@v4
|
|
190
193
|
with:
|
|
191
194
|
images: |
|
|
192
195
|
unum/usearch
|
package/Cargo.toml
CHANGED
package/README.md
CHANGED
|
@@ -66,11 +66,11 @@ Both USearch and FAISS implement the same HNSW algorithm.
|
|
|
66
66
|
But they differ in a lot of design decisions.
|
|
67
67
|
USearch is designed to be compact and broadly compatible without sacrificing performance.
|
|
68
68
|
|
|
69
|
-
| | FAISS, `f32` | USearch, `f32` | USearch, `f16` | USearch, `f8` |
|
|
70
|
-
| :--------- | -----------: | -------------: | -------------: | ------------: |
|
|
71
|
-
| Insertions | 76 K/s | 89 K/s | 73 K/s | **137 K/s** |
|
|
72
|
-
| Queries | 118 K/s | 167 K/s | 140 K/s | **281 K/s** |
|
|
73
|
-
| Recall @1 | 99% | 99.2% | 98% | **99.2%** |
|
|
69
|
+
| | FAISS, `f32` | USearch, `f32` | USearch, `f16` | USearch, `f8` | USearch + Numba, `f32` |
|
|
70
|
+
| :--------- | -----------: | -------------: | -------------: | ------------: | ---------------------: |
|
|
71
|
+
| Insertions | 76 K/s | 89 K/s | 73 K/s | **137 K/s** | 99 K/s |
|
|
72
|
+
| Queries | 118 K/s | 167 K/s | 140 K/s | **281 K/s** | 165 K/s |
|
|
73
|
+
| Recall @1 | 99% | 99.2% | 98% | **99.2%** | 99.2% |
|
|
74
74
|
|
|
75
75
|
> Dataset: 1M vectors sample of the Deep1B dataset.
|
|
76
76
|
> Hardware: `c7g.metal` AWS instance with 64 cores and DDR5 memory.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.2
|
package/conanfile.py
CHANGED
|
@@ -4,7 +4,7 @@ from conans import ConanFile
|
|
|
4
4
|
class USearchConan(ConanFile):
|
|
5
5
|
|
|
6
6
|
name = 'USearch'
|
|
7
|
-
version = '0.9.
|
|
7
|
+
version = '0.9.2'
|
|
8
8
|
license = 'Apache 2.0'
|
|
9
9
|
url = 'https://github.com/unum-cloud/usearch'
|
|
10
10
|
description = 'Smaller & Faster Single-File Vector Search Engine from Unum'
|
package/package.json
CHANGED
package/python/scripts/bench.py
CHANGED
|
@@ -106,10 +106,10 @@ def main(
|
|
|
106
106
|
|
|
107
107
|
@cfunc(signature_f32)
|
|
108
108
|
def inner_product_f32(a, b, n, m):
|
|
109
|
-
a_array = carray(a,
|
|
110
|
-
b_array = carray(b,
|
|
109
|
+
a_array = carray(a, dim)
|
|
110
|
+
b_array = carray(b, dim)
|
|
111
111
|
c = types.float32(0)
|
|
112
|
-
for i in range(
|
|
112
|
+
for i in range(dim):
|
|
113
113
|
c += a_array[i] * b_array[i]
|
|
114
114
|
return types.float32(1 - c)
|
|
115
115
|
|
|
@@ -120,12 +120,12 @@ def main(
|
|
|
120
120
|
|
|
121
121
|
@cfunc(signature_f8)
|
|
122
122
|
def cos_f8(a, b, n, m):
|
|
123
|
-
a_array = carray(a,
|
|
124
|
-
b_array = carray(b,
|
|
123
|
+
a_array = carray(a, dim)
|
|
124
|
+
b_array = carray(b, dim)
|
|
125
125
|
c = types.int32(0)
|
|
126
126
|
a_sq = types.int32(0)
|
|
127
127
|
b_sq = types.int32(0)
|
|
128
|
-
for i in range(
|
|
128
|
+
for i in range(dim):
|
|
129
129
|
ai = types.int16(a_array[i])
|
|
130
130
|
bi = types.int16(b_array[i])
|
|
131
131
|
c += ai * bi
|