pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: lucagiac81 (@lucagiac81) <noreply+lucagiac81@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #531: Add AVX-512 FP16 implementation of halfvec distance functions
Date: Tue, 12 Nov 2024 20:48:30 +0000
Message-ID: <gh-pgvector-pgvector-531-c2471552338@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-531@github.com>
References: <gh-pgvector-pgvector-531@github.com>

The latest update introduces an AVX512_FP16 implementation of vector_to_halfvec conversion (in separate commit), as that function has a noticeable contribution in VectorDBBench benchmarks. It is also rebased on pgvector v0.8.0. Sharing additional performance measurements with ANN-Benchmarks and VectorDBBench below.

For ANN-Benchmarks, we used a similar setup as for the [previously shared data](https://github.com/pgvector/pgvector/pull/531#issuecomment-2116043999). With the latest changes, the manual selection of FP16/FP32 computation is [removed](https://github.com/pgvector/pgvector/pull/531#issuecomment-2427840519). We also include measurements for index build time (with 8 parallel workers). Performance gains are relative to the existing F16c implementation.
For dbpedia-openai-1000k-angular dataset, we observe
- qps gain of 9.4%-14.2%
- p99 reduction of 9.0%-12.9%
- index build time reduction of 3.8% (m=16) and 11.6% (m=24)
- recall matched within +/-0.3%

For sift-128-euclidean, we observe 11-12% index build time reduction with recall matched within +/-0.1%, but no significant qps/p99 gain. This confirms that the recall degradation previously observed with FP16 computation is resolved and there are gains for certain metrics even at lower dimensions.

For VectorDBBench, we focused on larger datasets and varying search concurrency (1-40 range on an r7i.12xlarge instance). Below are initial results with two datasets:
- Performance1536D5M (OpenAI, 5M vectors, 1536 dimensions): 4-8% qps gain 
- Performance768D10M (Cohere, 10M vectors, 768 dimensions): 5-6% qps gain

view thread (32+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-531-c2471552338@github.com>
Permalink:  ../gh-pgvector-pgvector-531-c2471552338@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox