Describe the bug
Just updated library from 2.12.0 to 2.15.3
Now I'm getting irrelevant closest items.
I expect for an anchor item to be closest to it by any metric (I use cos), you can see in Expected behavior screenshot. Now after update anchor item is not closest + I get a lot of irrelevant items for it (see the screenshot).
It turns out the difference is in dtype='bf16' which is default in new version. After reverting it back to dtype='f16' I get an expected behabior.

Steps to reproduce
Here is the code I use
from usearch.index import Index
item_count, dimension = train_matrix.shape
index = Index(
ndim=dimension, # Define the number of dimensions in input vectors
metric='cos', # Choose 'l2sq', 'haversine' or other metric, default = 'ip'
dtype='bf16', # Quantize to 'f16' or 'i8' if needed, default = 'f32'
# connectivity=16, # Optional: Limit number of neighbors per graph node
# expansion_add=128, # Optional: Control the recall of indexing
# expansion_search=64, # Optional: Control the quality of the search
# multi=False, # Optional: Allow multiple vectors per key, default = False
)
_ = index.add(list(range(item_count)), train_matrix)
k = 100
res = index.search(train_matrix, count=k+1) # +1 because same product is closest
train_similars = train_ids[res.keys]
Expected behavior
using dtype='f16'

USearch version
2.15.3
Operating System
Ubuntu 20.04.6 LTS
Hardware architecture
x86
Which interface are you using?
Python bindings
Contact Details
ale.yalunin@gmail.com
Are you open to being tagged as a contributor?
Is there an existing issue for this?
Code of Conduct
Describe the bug
Just updated library from 2.12.0 to 2.15.3
Now I'm getting irrelevant closest items.
I expect for an anchor item to be closest to it by any metric (I use cos), you can see in Expected behavior screenshot. Now after update anchor item is not closest + I get a lot of irrelevant items for it (see the screenshot).
It turns out the difference is in dtype='bf16' which is default in new version. After reverting it back to dtype='f16' I get an expected behabior.
Steps to reproduce
Here is the code I use
Expected behavior
using dtype='f16'

USearch version
2.15.3
Operating System
Ubuntu 20.04.6 LTS
Hardware architecture
x86
Which interface are you using?
Python bindings
Contact Details
ale.yalunin@gmail.com
Are you open to being tagged as a contributor?
.githistory as a contributorIs there an existing issue for this?
Code of Conduct