Skip to content

feat: support for Halfvec and Sparsevec vector types#226

Open
Nazar Pechevystyi (nazarpechka) wants to merge 4 commits into
langchain-ai:mainfrom
nazarpechka:support_halfvec_sparsevec
Open

feat: support for Halfvec and Sparsevec vector types#226
Nazar Pechevystyi (nazarpechka) wants to merge 4 commits into
langchain-ai:mainfrom
nazarpechka:support_halfvec_sparsevec

Conversation

@nazarpechka

Copy link
Copy Markdown
Contributor

This PR adds full support for pgvector’s Halfvec and Sparsevec vector types in both table and index creation.
This adresses the 2 000-dimension limit of the standard vector type, not enough for models like text-embedding-3-large.

  • halfvec stores embeddings as INT8 quantized values and supports indexing up to 16 000 dimensions.
  • sparsevec stores sparse embeddings and also supports up to 16 000 dimensions.

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