Skip to content
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

Default to bf16 #465

Merged
merged 10 commits into from
Aug 19, 2024
Merged

Default to bf16 #465

merged 10 commits into from
Aug 19, 2024

Conversation

ashvardanian
Copy link
Contributor

The new default behavior is to use bf16 when constructing new indices on modern CPUs. This should positively affect both throughput and recall compared to f16.

ashvardanian and others added 10 commits August 12, 2024 20:58
Closes #421

Co-authored-by: jrcavani <[email protected]>
Closes #450

Co-authored-by: Michał Bartoszkiewicz <[email protected]>
This commit exposes the underlying SimSIMD `bf16`
kernels for distance functions, that can be up to 3x faster
than IEEE half-precision floats for different multiplication-
intensive operations. It also brings backwards-compatibility
for older CPUs, that don't yet support `bf16`.

Important to note, NumPy still doesn't support half-precision,
so we can't reliably guess what the name of the `bf16` type
will be in the buffer protocol specifications.
numpy/numpy#19808
@ashvardanian ashvardanian merged commit 2e4bf82 into main Aug 19, 2024
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant