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

Reduce max Vector dimension limit from 10,000 to 4,096 not to fail due to SAI/ANN limit #772

Closed
tatu-at-datastax opened this issue Jan 5, 2024 · 2 comments · Fixed by #775
Assignees
Milestone

Comments

@tatu-at-datastax
Copy link
Contributor

Currently JSON API limits maximum Vector ($vector) dimension to rather high limit -- 16,000 -- which was simply chosen as "big enough not to matter". But it appears that there is a true limit as per:

https://github.com/riptano/VECTOR-SEARCH/issues/73

which limits indexable entry to 16kB, and with float-vector (4 bytes for float32) it means actual upper max dimension of 4,096.
So let's align this limit so JSON API can validate creation without hitting DB guardrails (esp. since test DB may not even have guardrails enabled).

New limit should still be above sizes needed in practice (f.ex, OpenAI's "standard" 1,536 ).

@tatu-at-datastax tatu-at-datastax self-assigned this Jan 5, 2024
@tatu-at-datastax tatu-at-datastax changed the title Reduce max Vector dimension limit from 16,000 to 4,096 not to fail due to SAI/ANN limit Reduce max Vector dimension limit from 10,000 to 4,096 not to fail due to SAI/ANN limit Jan 5, 2024
@vkarpov15
Copy link
Collaborator

4096 should be fine: here's a nice read on embedding sizes from an AI eng perspective. The only place I've been able to find a model that outputs embeddings longer than 4096 is an outdated OpenAI model that would output embeddings of length 12000. So while it is possible we will need to support larger embeddings in the future, it isn't urgent.

@tatu-at-datastax
Copy link
Contributor Author

Thank you for sanity check @vkarpov15 . Good to know our thinking was not wrong here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants