Skip to main content

KodamaEmbed

Text embeddings and reranking on CPUs and GPUs.

pip install kodamaembed
from kodamaembed import Embedder

model = Embedder("sentence-transformers/all-MiniLM-L6-v2")
passages = model.embed_passages([
    "Berlin is the capital of Germany.",
    "Bananas are yellow.",
])
query = model.embed_queries("What is the capital of Germany?")
print(passages @ query[0])  # cosine similarities

The wheel holds the engine and its GPU kernels, and numpy is its only dependency. CUDA runs on NVIDIA GPUs of compute capability 8.0 or newer and Vulkan on Vulkan 1.3 GPUs, each with its driver. Every model downloads at a pinned Hugging Face commit into the Hugging Face cache, and every file is checked against its pinned SHA-256 before it loads. model.fingerprint identifies the model files and numerics.

Models

Name Kind Dimensions Tokens Download
BAAI/bge-base-en-v1.5 embedding 768 512 438.7 MB
BAAI/bge-large-en-v1.5 embedding 1024 512 1.3 GB
BAAI/bge-m3 embedding 1024 512 2.3 GB
BAAI/bge-small-en-v1.5 embedding 384 512 134.2 MB
ibm-granite/granite-embedding-english-r2 embedding 768 8192 301.6 MB
intfloat/e5-large embedding 1024 512 1.3 GB
intfloat/e5-large-v2 embedding 1024 512 1.3 GB
intfloat/e5-small-v2 embedding 384 512 134.2 MB
intfloat/multilingual-e5-base embedding 768 512 1.1 GB
intfloat/multilingual-e5-large embedding 1024 512 2.3 GB
intfloat/multilingual-e5-small embedding 384 512 487.7 MB
mixedbread-ai/mxbai-embed-large-v1 embedding 1024 512 671.0 MB
nomic-ai/modernbert-embed-base embedding 768 8192 599.7 MB
sentence-transformers/all-MiniLM-L12-v2 embedding 384 128 133.9 MB
sentence-transformers/all-MiniLM-L6-v2 embedding 384 256 91.3 MB
sentence-transformers/all-mpnet-base-v2 embedding 768 384 438.4 MB
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 embedding 384 128 479.7 MB
sentence-transformers/paraphrase-multilingual-mpnet-base-v2 embedding 768 128 1.1 GB
Snowflake/snowflake-arctic-embed-l embedding 1024 512 1.3 GB
Snowflake/snowflake-arctic-embed-m-v1.5 embedding 768 512 436.3 MB
Alibaba-NLP/gte-reranker-modernbert-base reranker - 8192 602.0 MB
BAAI/bge-reranker-v2-m3 reranker - 512 2.3 GB
cross-encoder/ms-marco-MiniLM-L12-v2 reranker - 512 134.2 MB
cross-encoder/ms-marco-MiniLM-L6-v2 reranker - 512 91.6 MB
ibm-granite/granite-embedding-reranker-english-r2 reranker - 1124 602.0 MB

The multilingual-e5, bge-m3, bge-reranker-v2-m3 and paraphrase-multilingual models are multilingual; the others are English. kodamaembed.list_models() returns the same list. A model downloads on first use; kodamaembed.download(name) fetches it ahead of time.

Reranking

from kodamaembed import Reranker

reranker = Reranker("cross-encoder/ms-marco-MiniLM-L6-v2")
documents = ["Bananas are yellow.", "Berlin is the capital of Germany."]
for index, score in reranker.rerank("capital of Germany", documents, top_k=1):
    print(documents[index], score)

Large collections

embed_passages_stream embeds any iterable, yielding arrays of up to batch_size vectors in order:

for vectors in model.embed_passages_stream(lines_of_a_large_file, batch_size=1024):
    index.add(vectors)

Devices and precision

Embedder(name, device="auto")       # CUDA, else a discrete Vulkan GPU, else the CPU
Embedder(name, device="cuda:1")     # also "cpu", "cuda", "vulkan", "vulkan:N"
Embedder("intfloat/e5-large", precision="quantized")  # the same INT8 vectors on the CPU and CUDA
Embedder(name, threads=4)           # the CPU, with four threads

One model can be shared between threads; calls release the GIL while they compute.

Command line and server

kodamaembed models
kodamaembed embed sentence-transformers/all-MiniLM-L6-v2 "first text" "second text"
kodamaembed download intfloat/e5-large
kodamaembed serve sentence-transformers/all-MiniLM-L6-v2 cross-encoder/ms-marco-MiniLM-L6-v2

kodamaembed serve answers POST /v1/embeddings in the OpenAI format and POST /v1/rerank in the Cohere and Jina format:

from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="unused")
response = client.embeddings.create(
    model="sentence-transformers/all-MiniLM-L6-v2", input=["Berlin is the capital of Germany."]
)

Offline use

HF_HUB_OFFLINE=1 or offline=True loads from the cache. HF_HOME, HF_HUB_CACHE and HF_ENDPOINT work as they do for other Hugging Face tools.

The Python guide covers every option, and the quickstart notebook embeds, searches and reranks in a few cells. The migration guide covers moving from sentence-transformers, FastEmbed or an OpenAI-compatible server, and the benchmarks cover latency and accuracy.

Licensed under Apache-2.0.

Metadata

Release files for kodamaembed 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kodamaembed 0.1.0
File Size Uploaded Provenance Actions
kodamaembed-0.1.0.tar.gz 4.0 MB With provenance Details for kodamaembed-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for kodamaembed 0.1.0
File Actions
kodamaembed-0.1.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for kodamaembed-0.1.0-cp311-abi3-win_amd64.whl
kodamaembed-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for kodamaembed-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl
kodamaembed-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for kodamaembed-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl
kodamaembed-0.1.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for kodamaembed-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
kodamaembed-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for kodamaembed-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 35.3 MB

Release files / kodamaembed-0.1.0.tar.gz

Download URL kodamaembed-0.1.0.tar.gz
Size 4.0 MB
Tags Source
SHA-256 checksum
How to use checksums
589df78b51a8cc1e08edd319282c18df9ed1a462f07634f13760c64aa027a55d
BLAKE2b-256 checksum
How to use checksums
2ad424dc80bb365a0bc756b133a7af9c3ebf0ffba2d19f793869a0aa60897964
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kodamaembed-0.1.0-cp311-abi3-win_amd64.whl

Download URL kodamaembed-0.1.0-cp311-abi3-win_amd64.whl
Size 6.9 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ddddc0df71132c2f8682e150f9c1eb6bdcb8f53d445afd813ac1ab9cca08c849
BLAKE2b-256 checksum
How to use checksums
71ae3ac2925f1ea745a7df8722a5a91cc9f8a33f0020aed9b2a6197f1bcc9160
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kodamaembed-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL kodamaembed-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 7.1 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
333f6723f8664ed07736e1868eb0e9df0db0846d51aa53923014c591d1072708
BLAKE2b-256 checksum
How to use checksums
bf3728faa517e42b4449e0782c1320c60780c4c4cc7b7866431ca0ba29810f06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kodamaembed-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL kodamaembed-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 5.3 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
8c7d088fab0307b03726fd52919faeae8ac8af5184e9ed798a1685265bed4517
BLAKE2b-256 checksum
How to use checksums
28ab0bcaf8d27d89dadd2e12780c12f44acad888f6ea91afb868f7f5b12c3084
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kodamaembed-0.1.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL kodamaembed-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
Size 5.2 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1b041984cc55a4bf730c4948931ab24bb55489271be88d1af1be09af5a090215
BLAKE2b-256 checksum
How to use checksums
1b8e827ebf0b14ab6abc93ac0c3a1806d7da33f2979f89fbc003a19714f57238
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kodamaembed-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL kodamaembed-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 6.9 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
72047b25dd56ec81cac47664c102fd163bfdfc74bc8ceb9400881ee4cacac977
BLAKE2b-256 checksum
How to use checksums
8de6424992ebe51312de86ff07c0fe245f33015845e52b2ddc26628eeb2ce639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for kodamaembed 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for kodamaembed-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files Full provenance

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