embroider
Frozen embedding, rerank, and decision vectors over ONNX Runtime (Rust core, PyO3)
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
- docs/quickref.md — the complete user manual: every loader, every parameter, copy-paste Python and Rust.
- docs/ARCHITECTURE.md — how it works: module layout, session policy and measurements, runtime discovery, the frozen-contract rules, registry and precision design, conformance.
- docs/compat.md — release matrix, model sizes and serving guidance, per-entry licences.
- docs/rerank-typed-decision-record.md — how the rerank and decide engines were chosen, measured, and gated.
- docs/model-registry-record.md — the registry design (builtin + overlay, revision pins).
- docs/model-conversion.md — the conversion playbook: weights to parity-gated ONNX.
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| embroider-0.14.1.tar.gz | 7.3 MB | With provenance | Details for embroider-0.14.1.tar.gz |
Built distributions (wheels)
Total release size: 69.0 MB
Release files / embroider-0.14.1.tar.gz
| Download URL | embroider-0.14.1.tar.gz |
|---|---|
| Size | 7.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5b409303cc399ef2795b645aa67b013391e4e11e92f7df9efd4d56228d5f99c
|
|
BLAKE2b-256 checksum How to use checksums |
be89b2ad37c8186fc671dda3a405aad7d3fe6e165de2b3884339711b74a7ef62
|
| 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 logRelease files / embroider-0.14.1-cp313-cp313-win_amd64.whl
| Download URL | embroider-0.14.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
30472183ad52a61b0ff915ef1bfb27c567af0229d78c92d52210887f81e8aa5d
|
|
BLAKE2b-256 checksum How to use checksums |
d02dbf24d569cec993b223f50359c4c8aecbdddc101fc945b754bde628d14fe6
|
| 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 logRelease files / embroider-0.14.1-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | embroider-0.14.1-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 |
7ac8f4a2ee91b1334cc21022ee50c642d0a350995482cb0f8e3b4e3a800d860d
|
|
BLAKE2b-256 checksum How to use checksums |
af605580342a8a6bdc430d21a1a933aa6af39d341eb8e0ed8d040b508ce7dec5
|
| 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 logRelease files / embroider-0.14.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | embroider-0.14.1-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 |
f42023ec54b5f33eb42499528b32f6b91a428164934e108e9132181adc15f8ac
|
|
BLAKE2b-256 checksum How to use checksums |
6dc0fb1bac4c6bb2659e456fbd8d1acf8639294c6cbb83bb4781066aac9b7d6a
|
| 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 logRelease files / embroider-0.14.1-cp312-cp312-win_amd64.whl
| Download URL | embroider-0.14.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
bc8ed0a1bc3f07f97df42802437119b4342110df2081c01b128616a367054aea
|
|
BLAKE2b-256 checksum How to use checksums |
2b0d566812f64d9e5f91536ee929fd232aab1d79368b47d172001df7bf922c43
|
| 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 logRelease files / embroider-0.14.1-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | embroider-0.14.1-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 |
aa458cff8b4bdbde977e11319aecd5b7ea2026d7f22b72309fc1281e955ec234
|
|
BLAKE2b-256 checksum How to use checksums |
2e09d19dd7720962c846b4b50f6ea1df4e69f3877bac3dbed7f3634c77c20f35
|
| 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 logRelease files / embroider-0.14.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | embroider-0.14.1-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 |
232d501ed41b00c2fff97719a600bdcc432dd36444b91e48ecac563c07a0ea92
|
|
BLAKE2b-256 checksum How to use checksums |
21f46c0ce332de0493f4de6fe59c1fc0147e09c886399254d84dfd53a2b0c541
|
| 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 logRelease files / embroider-0.14.1-cp311-cp311-win_amd64.whl
| Download URL | embroider-0.14.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ad380e2433fd9be1a3c25cfc57ddb9263f842bc9a3716a4cb837f954d35fb7fa
|
|
BLAKE2b-256 checksum How to use checksums |
10edfb1b825fcf5c873f720e40dab12606a36c6cf039ba6e4825caf0adc75a6b
|
| 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 logRelease files / embroider-0.14.1-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | embroider-0.14.1-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 |
0251d4b0f282761aa1eeff8b0c03feb3afa1ff2e97cc769cd7f9bf6cd2a169de
|
|
BLAKE2b-256 checksum How to use checksums |
cda02497a011473046e230e5483c91c88c5b47db45e4b67804b2810f6274b35f
|
| 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 logRelease files / embroider-0.14.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | embroider-0.14.1-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 |
4f23ef5a1e4fb29c07ac57214904b15ddfeef1e4173d0d31a285082213301888
|
|
BLAKE2b-256 checksum How to use checksums |
3cc2d21bf7c73b38a3a8a526d0656b54f1b25c5c61a7a3cc97fed653208c05ab
|
| 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 logSecurity for embroider 0.14.1
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.
Attestation for embroider-0.14.1.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 logA 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.