Skip to main content

sie-qdrant

SIE integration for Qdrant.

Installation

pip install sie-qdrant

Dense embeddings

from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams, PointStruct
from sie_qdrant import SIEVectorizer

vectorizer = SIEVectorizer(base_url="http://localhost:8080", model="BAAI/bge-m3")

qdrant = QdrantClient("http://localhost:6333")
qdrant.create_collection(
    collection_name="documents",
    vectors_config=VectorParams(size=1024, distance=Distance.COSINE),
)

texts = ["first doc", "second doc"]
vectors = vectorizer.embed_documents(texts)
qdrant.upsert(
    collection_name="documents",
    points=[
        PointStruct(id=i, vector=v, payload={"text": t})
        for i, (t, v) in enumerate(zip(texts, vectors))
    ],
)

query_vec = vectorizer.embed_query("search text")
results = qdrant.query_points(
    collection_name="documents", query=query_vec, limit=5
)

Named vectors (dense + sparse)

SIE's multi-output encode produces dense and sparse vectors in one call. Qdrant supports sparse vectors natively via SparseVector(indices, values), so no expansion to full vocabulary length is needed:

from qdrant_client import QdrantClient
from qdrant_client.models import (
    Distance, VectorParams, PointStruct,
    SparseVectorParams, SparseVector,
)
from sie_qdrant import SIENamedVectorizer

vectorizer = SIENamedVectorizer(
    base_url="http://localhost:8080",
    model="BAAI/bge-m3",
    output_types=["dense", "sparse"],
)

qdrant = QdrantClient("http://localhost:6333")
qdrant.create_collection(
    collection_name="documents",
    vectors_config={"dense": VectorParams(size=1024, distance=Distance.COSINE)},
    sparse_vectors_config={"sparse": SparseVectorParams()},
)

named = vectorizer.embed_documents(["hello world"])
qdrant.upsert(
    collection_name="documents",
    points=[
        PointStruct(
            id=0,
            vector={
                "dense": named[0]["dense"],
                "sparse": SparseVector(**named[0]["sparse"]),
            },
            payload={"text": "hello world"},
        )
    ],
)

Storage advantage: Unlike integrations that expand sparse vectors to full vocabulary length (~30K floats), Qdrant stores sparse vectors in their native indices+values form, making hybrid search storage-efficient.

Testing

# Unit tests (no server needed)
pytest

# Integration tests (requires SIE + Qdrant)
pytest -m integration

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sie_qdrant-0.6.27.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sie_qdrant-0.6.27-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file sie_qdrant-0.6.27.tar.gz.

File metadata

  • Download URL: sie_qdrant-0.6.27.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sie_qdrant-0.6.27.tar.gz
Algorithm Hash digest
SHA256 2856484a2a69a153d14c0698b7d397ec961a97d4ebe0e86454c042ad794b37fa
MD5 e780414ba21715d2808e841a076336e0
BLAKE2b-256 b250779e8fbba893f3937608c2b0f2eb5cd1ec6a1c29b9e9cee8e638890a4350

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_qdrant-0.6.27.tar.gz:

Publisher: release-python.yml on superlinked/sie-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sie_qdrant-0.6.27-py3-none-any.whl.

File metadata

  • Download URL: sie_qdrant-0.6.27-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sie_qdrant-0.6.27-py3-none-any.whl
Algorithm Hash digest
SHA256 b957f2757d045538b9c0d7375af7e469a7e4466d50ebd1b331b1f8fe9f5da8a2
MD5 3af7be942ec0c8c88041da0c811a39dc
BLAKE2b-256 aeee0b1d29ba51998870c9a418ac5c7002638b95aa7a06b5dc78fee7ccd8c4f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_qdrant-0.6.27-py3-none-any.whl:

Publisher: release-python.yml on superlinked/sie-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.30

2 files

0.6.29

2 files

0.6.28

2 files

This release

0.6.27 This release

2 files

0.6.26

2 files

0.6.25

2 files

0.6.24

2 files

0.6.23

2 files

0.6.22

2 files

0.6.21

2 files

0.6.20

2 files

0.6.19

2 files

0.6.18

2 files

0.6.17

2 files

0.6.16

2 files

0.6.15

2 files

0.6.14

2 files

0.6.13

2 files

0.6.12

2 files

0.6.11

2 files

0.6.10

2 files

0.6.9

2 files

0.6.8

2 files

0.6.7

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page