-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: getting irrelevant closest items when using dtype='bf16' (default) instead of dtype='f16' #505
Comments
Hi @alexyalunin! Did you only change the dtype in the constructor or somewhere else? |
Can you please log the type of the input matrix and the |
train_matrix.dtype Idk how to log hardware_capabilities, here is index usearch.Index
|
I didn't change dtype of index by myself. |
I have just rebuilt the index 5 times in a loop and look at 5 anchor items (i.e. 25 examples). It seems like even with f16 the problem still exists, it is just less often than with bf16. |
Interesting 🤔 |
Found the issue in the underlying SimSIMD library. Investigating. Hope to merge within 24h. |
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
[email protected]
Are you open to being tagged as a contributor?
.git
history as a contributorIs there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: