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.2.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.2.0
File Size Uploaded Provenance Actions
kodamaembed-0.2.0.tar.gz 4.0 MB With provenance Details for kodamaembed-0.2.0.tar.gz

Built distributions (wheels)

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

Total release size: 35.4 MB

Release files / kodamaembed-0.2.0.tar.gz

Download URL kodamaembed-0.2.0.tar.gz
Size 4.0 MB
Tags Source
SHA-256 checksum
How to use checksums
1f1de63db9c4d1863206253ac88fcebc3ba2e7a2d17aa7c2656054fa28bf3f31
BLAKE2b-256 checksum
How to use checksums
7af184aec8186297e93b3198130100c417711bb8d5eef0fe89427dcbc77940bd
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 Dec 2, 2026.

Transparency log

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

Download URL kodamaembed-0.2.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
42af93b9f5aefdc886d9b61deaeff281a23de2d149e46085edf4ff9c0b58b3b9
BLAKE2b-256 checksum
How to use checksums
bc4af311d4c722414a6c032407bec3b33be5600807f71b02253d5745eb32409e
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 Dec 2, 2026.

Transparency log

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

Download URL kodamaembed-0.2.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
de64c503dcb8f72528d7ed65c591d30f3624bac4b56f7c9894e4abdfdd9cf197
BLAKE2b-256 checksum
How to use checksums
fd0038c62584d8dc791959bc12caef32dd8916d871a2af89dd85188c679fe217
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 Dec 2, 2026.

Transparency log

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

Download URL kodamaembed-0.2.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
55d8e9b63dda8405a09de9c58e5a6e40eb5d96681a45b13686b4714d5c2edb6b
BLAKE2b-256 checksum
How to use checksums
d1eb2eb9008021d57ea2f33e2620cb4d6254128d11f3fb5cb797c4206895ab12
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 Dec 2, 2026.

Transparency log

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

Download URL kodamaembed-0.2.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
8282158e139e36ab7427ad84a21e9545755bb68394d684ab674d90166788a18a
BLAKE2b-256 checksum
How to use checksums
0bfb7a6f1901e56749da4bf37287f9f91807ab07cae530d5280734bb7991a829
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 Dec 2, 2026.

Transparency log

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

Download URL kodamaembed-0.2.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
991b1e813a977d1b2d162684f0b66bcdc009d5b4e8edaefc63700239824c8ad9
BLAKE2b-256 checksum
How to use checksums
111dcb68e383543b4206347470cf8b148e1f7b3d5daaac8d17083536ff24cf57
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 Dec 2, 2026.

Transparency log

Security for kodamaembed 0.2.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.2.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 Dec 2, 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.2.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