Skip to main content

embroider

Frozen embedding, rerank, and decision vectors over ONNX Runtime (Rust core, PyO3)

CI crates.io docs.rs PyPI Python License Website

What it is

embroider turns text — and images — into vectors, scores, and typed decisions: embeddings, cross-encoder rerank, and Choice/Score/Noul gates served through ONNX Runtime from a Rust core, with optional PyO3 bindings. Two embedding families live in the registry — Jina v5 (non-commercial) and EmbeddingGemma 2 (Apache-2.0) — alongside rerankers, GLiClass deciders, Laya marker-layout gates, and the Decider-2B slot engine. No torch, transformers, or optimum in the hot path, so every vector in an index stays directly comparable — or the encode fails loudly instead of silently forking the space.

Two consumers share it differently: okfgraph uses the text + vision contracts for its graph; bobine (PDF/Office → Markdown) reuses only the ONNX plumbing — session policy, provider fallback, CUDA probe — while owning its converter-model sessions.

Engines

Capability Loader (Python / Rust) Registry ids Precisions
Text embeddings (Jina v5, Gemma 2) JinaV5 / jina jinaai/jina-embeddings-v5-*, google/embeddinggemma-2 fp32, fp16 (nano also int8)
Vision → text space (Jina, Gemma) JinaV5Vision, GemmaVision / vision, gemma jina-v5-omni-nano-retrieval-vision, google/embeddinggemma-2-vision fp32, fp16
Cross-encoder rerank Reranker / rerank cross-encoder/ms-marco-MiniLM-L-6-v2, cross-encoder/mmarco-mMiniLMv2-L12-H384-v1 fp32, q8
Typed decisions (GLiClass) Decider / decide knowledgator/gliclass-small-v1.0, knowledgator/gliclass-v4-edge fp32 (v4-edge also q8)
Typed decisions (Laya markers) LayaDecider / laya convaiinnovations/laya-{typed-decisions,english,multilingual} fp32 (CUDA fp16 variants)
Typed decisions (decider-2B slots) Decider2B / decider2b Mapika/decider-2b fp32, q8
Custom models under known kinds register_task / register_model, load_registry_file caller-supplied owner/name ids caller-declared, flagged-unmeasured unless validated

Full artifact repos and per-entry licences live in docs/compat.md (Jina weights are non-commercial, EmbeddingGemma 2 and the rerank/decide entries Apache-2.0); the registry design (builtin + overlay, flagged-unmeasured tiers, revision pins) in docs/model-registry-record.md.

New models under known kinds need no source change — register_task / register_model or load_registry_file("models/extra.json") — but a new input contract needs a Rust loader. Rules: ids must be owner/name, builtin and duplicate ids are refused loudly, unlisted tiers fall back to fp32, and caller-supplied non-fp32 tiers run flagged-unmeasured (the drift is the caller's gate). Unknown ids fall through to the legacy path (the id as an HF repo holding onnx/model.onnx); fully local weights skip acquisition via open_files.

Install

pip install embroider                       # Linux / Windows / macOS-arm64, Python 3.11–3.13
pip install onnxruntime==1.31.1             # or -gpu[cuda,cudnn]==1.31.1 — exactly one, never both

okfgraph pulls it in automatically; standalone, install the wheel plus exactly one runtime as above (ORT_DYLIB_PATH overrides discovery).

From source: maturin build --release, then install the wheel (maturin develop needs pip, which uv venvs lack).

from embroider import JinaV5
m = JinaV5.open("jinaai/jina-embeddings-v5-text-small-retrieval")
v = m.encode("what do badgers eat?", task="query")   # 512-d unit vector, golden-pinned

Docs

Testing

cargo test --locked                      # 111 pure unit tests, no net/dylib

Engine parity is fixture-pinned and env-gated (tests/*_e2e.rs, ignored — needs the ORT dylib, weight files, ideally CUDA; see the Testing section in quickref). Python parity lives with okfgraph (tests/test_parity.py, slow; test_rust_backend.py / test_rust_e2e.py cover the wheel import, count-tokens contract, and real-model encodes): Rust output against a numpy/transformers replication at ≤ 1e-5. Regenerate goldens only on an intentional contract change — a new minor version plus a re-index-everything notice.

Failure policy

Level Behaviour
Install Missing wheel → clear RuntimeError with the install hint; never a silent fallback.
Device Accelerators are opportunistic: auto/cuda use CUDA when the loaded ORT registers the EP, else warn + CPU. used_cuda reports the outcome.
Encode Fail fast. No fallback — vectors must stay bit-comparable within one index.
Precision auto follows the landed device (CUDA→FP16, CPU→FP32); explicit fp16-on-CPU warns for text, errors for vision.

Same (model, precision, tuning, max_length) or re-embed — never mix precisions or tuning levels in one index.

Metadata

Release files for embroider 0.14.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 embroider 0.14.0
File Size Uploaded Provenance Actions
embroider-0.14.0.tar.gz 7.3 MB With provenance Details for embroider-0.14.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for embroider 0.14.0
File Actions
embroider-0.14.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for embroider-0.14.0-cp313-cp313-win_amd64.whl
embroider-0.14.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for embroider-0.14.0-cp313-cp313-manylinux_2_28_x86_64.whl
embroider-0.14.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for embroider-0.14.0-cp313-cp313-macosx_11_0_arm64.whl
embroider-0.14.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for embroider-0.14.0-cp312-cp312-win_amd64.whl
embroider-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for embroider-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl
embroider-0.14.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for embroider-0.14.0-cp312-cp312-macosx_11_0_arm64.whl
embroider-0.14.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for embroider-0.14.0-cp311-cp311-win_amd64.whl
embroider-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for embroider-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl
embroider-0.14.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for embroider-0.14.0-cp311-cp311-macosx_11_0_arm64.whl

Total release size: 68.9 MB

Release files / embroider-0.14.0.tar.gz

Download URL embroider-0.14.0.tar.gz
Size 7.3 MB
Tags Source
SHA-256 checksum
How to use checksums
a194f31599e6c0de1c653f8db791c2b2ab3d57f48c563d405aa886b7d6cbc7a5
BLAKE2b-256 checksum
How to use checksums
9b736f71cbe3140dc83dda4a3c505f4c88e1f92e7e96cf03277133cbb2690390
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 8, 2026.

Transparency log

Release files / embroider-0.14.0-cp313-cp313-win_amd64.whl

Download URL embroider-0.14.0-cp313-cp313-win_amd64.whl
Size 6.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
58704ef431e94798c947f2ff2a491b00366b51d10b06d07c0670748bf06bb8e7
BLAKE2b-256 checksum
How to use checksums
37183cc059c62c48e53d746ad044d81eee1d9c4a4c9612a3e04a82c558f92b6b
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 8, 2026.

Transparency log

Release files / embroider-0.14.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL embroider-0.14.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 7.7 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c66899d8f1624ac44f5684f6f5d074fc46330e6711db9375c124b113179a67c6
BLAKE2b-256 checksum
How to use checksums
a58a2b5eac4ba089e71017578ceb1f0a6cc47ecc330870be49d19ad1345ff3f8
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 8, 2026.

Transparency log

Release files / embroider-0.14.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL embroider-0.14.0-cp313-cp313-macosx_11_0_arm64.whl
Size 6.7 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
976b52b7c298ab731b6cff21b1e7d8567fffdc857e0a342a11a8ebdbd9bfeef2
BLAKE2b-256 checksum
How to use checksums
1d997fed3ff105c60b9573f8dd1f5626f3ec825d305e14e83511bbc3e803e1d1
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 8, 2026.

Transparency log

Release files / embroider-0.14.0-cp312-cp312-win_amd64.whl

Download URL embroider-0.14.0-cp312-cp312-win_amd64.whl
Size 6.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
4e4d9f4ea93d7934520541895fdc772752445a0c58c1706b8434cc124a917b69
BLAKE2b-256 checksum
How to use checksums
5fed9edcd5610c5e8711497dd90e2c62f05f4c4a0d7ff52ea92851a2aab40957
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 8, 2026.

Transparency log

Release files / embroider-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL embroider-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 7.7 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
fee1d4731ce35005048d9c6b475a2b084a47705c7057a8945ab7f34da852d8ad
BLAKE2b-256 checksum
How to use checksums
f12afdeeaf0149cc126618997c693f902dcc809592c5b4755a024cb6df708286
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 8, 2026.

Transparency log

Release files / embroider-0.14.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL embroider-0.14.0-cp312-cp312-macosx_11_0_arm64.whl
Size 6.7 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
92850b04969cb5c3fc2daa0cbfd1343f87d87ce8f62d32802a5ee0af638612cb
BLAKE2b-256 checksum
How to use checksums
b0a10a52b62abec5b5493a6f88e4011d6b5005f18d9b23c62ce2d662fb225538
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 8, 2026.

Transparency log

Release files / embroider-0.14.0-cp311-cp311-win_amd64.whl

Download URL embroider-0.14.0-cp311-cp311-win_amd64.whl
Size 6.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
96524c7e1b1e96f785f27866c7d714c9eff83639ce2aee6218258958e7973b0d
BLAKE2b-256 checksum
How to use checksums
75d36f0de3104f018ff9f823ccf42e6b9b720cc9f526f990989ddf55cbe51177
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 8, 2026.

Transparency log

Release files / embroider-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL embroider-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 7.7 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d1b74ea0a3d1f47b0aae02896ba350e8d3435cfed81470496334fc65e8838f82
BLAKE2b-256 checksum
How to use checksums
1e2ae440e7813a60cc2adbfee0f69045f6e1074bd0140e3cca21501e62de094b
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 8, 2026.

Transparency log

Release files / embroider-0.14.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL embroider-0.14.0-cp311-cp311-macosx_11_0_arm64.whl
Size 6.7 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d1c817dcc1292276236418ad69b5b81f58527119758e247fcba42cbf8944d594
BLAKE2b-256 checksum
How to use checksums
0ebcba1d22a21ab43f972b18d1f2839244f16ecd7207d400ebecc45975dbc5aa
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 8, 2026.

Transparency log

Security for embroider 0.14.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 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for embroider-0.14.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 8, 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.

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