pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: fshabashev (@fshabashev) <noreply+fshabashev@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] PR #849: increase maximum dimension size for HNSW index
Date: Wed, 04 Jun 2025 09:50:11 +0000
Message-ID: <gh-pgvector-pgvector-849@github.com> (raw)

Some popular embedding models, such as OpenAI's `text-embedding-3-large` have more than 2,000 dimensions. 
I propose increasing the `HNSW_MAX_DIM` from 2,000 to 4,000 to support larger embedding models. 

inline patch 1: src/hnsw.h (+1/-1 lines) download inline-1.patchdiff --git a/src/hnsw.h b/src/hnsw.h index 5102bfb5a..8a6c64803 100644 --- a/src/hnsw.h +++ b/src/hnsw.h @@ -12,7 +12,7 @@ #include "utils/sampling.h" #include "vector.h" -#define HNSW_MAX_DIM 2000 +#define HNSW_MAX_DIM 4000 #define HNSW_MAX_NNZ 1000 /* Support functions */

view thread (3+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-849@github.com>
Permalink:  ../gh-pgvector-pgvector-849@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