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

Qdrant local mode does not normalize vectors #212

Closed
kacperlukawski opened this issue Jul 14, 2023 · 0 comments
Closed

Qdrant local mode does not normalize vectors #212

kacperlukawski opened this issue Jul 14, 2023 · 0 comments

Comments

@kacperlukawski
Copy link
Member

Qdrant server normalizes vectors when Cosine distance is used. However, this is not done when Qdrant local in-memory mode is used. That might not be clear for a locally created application pointing to the Qdrant server in production.

How to reproduce?

import qdrant_client

client = qdrant_client.QdrantClient(":memory:")
client.create_collection("test", vectors_config={"size": 10, "distance": "Cosine"})
client.upsert("test", points=[models.PointStruct(id=1, vector=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])])

Even though the point was stored in a collection using Cosine distance, it was not normalized.

client.scroll("test", with_vectors=True)
# out: ([Record(id=1, payload={}, vector=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])], None)
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

No branches or pull requests

2 participants