Embeddable AI engine for inference, embeddings, vector search, and fine-tuning
Project description
Jammi AI
Jammi is an embeddable AI engine that brings model inference into your data pipeline. Register data sources, run SQL queries, generate embeddings, search with vector similarity, fine-tune models on your domain, and evaluate results — all without leaving your application.
Install
pip install jammi-ai
The embed wheel runs the engine in-process and bundles
jammi-client for remote targets. For a lean,
engine-free deploy footprint that talks to a remote server, install the client
on its own:
pip install jammi-client
(GPU/CUDA lives on the server image — the CUDA variant
jammi-ai-server-cu12 —
not the embed wheel.)
Quickstart
The 5-minute walkthrough — install, connect, register a source, generate
embeddings, search — lives in cookbook/quickstart/
with a runnable quickstart.py
gated by CI. The condensed version:
import jammi_ai
# One front door. `file://` runs the in-process engine; flip to a
# `https://` / `grpc://` target — no code change — to talk to a remote server.
db = jammi_ai.connect("file://.jammi")
db.add_source("corpus", url="cookbook/fixtures/tiny_corpus.parquet", format="parquet")
MODEL = "sentence-transformers/all-MiniLM-L6-v2"
db.generate_embeddings(source="corpus", model=MODEL, columns=["content"], key="id", modality="text")
query_vec = db.encode_query(model=MODEL, query="quantum computing applications")
results = db.search("corpus", query=query_vec, k=5) # pyarrow.Table
print(results.to_pandas())
For runnable end-to-end recipes — mutable tables, trigger streams, eval,
fine-tuning, Flight SQL — see cookbook/.
Features
- SQL over local files — query Parquet, CSV, and JSON via DataFusion
- Federated queries — join local files with PostgreSQL or MySQL
- Text embeddings — load any BERT-family model from Hugging Face Hub (or local safetensors / ONNX) and persist results to Parquet with ANN indexes
- Image embeddings — CLIP-style vision encoders
- Vector search — ANN similarity search with automatic brute-force fallback;
searchreturns a table directly, same shape embedded or remote - Similarity graphs —
build_neighbor_graphmaterializes the whole k-nearest-neighbour edge set of an embedding table as a queryable relation, for dedup, clustering, and graph-aware training-data prep - Compound query —
join/filter/selectand model inference (theannotateSQL table function) over your data, in-process or over the Flight SQL lane in one round-trip - Evidence provenance —
retrieved_byandannotated_bytracking on the fluent Rust query builder's results - Fine-tuning — LoRA / deep LoRA adapters with contrastive loss to improve embeddings for your domain
- Evaluation — recall@k, precision@k, MRR, nDCG, accuracy, F1, and A/B model comparison
- Model caching — LRU eviction, ref-counted guards, single-flight loading
- GPU scheduling — memory-budget admission control with RAII permits
- Crash recovery — recovers embedding tables stuck in "building" state on restart
Search and compound query
search is the bounded primitive — nearest-neighbor top-k with optional filter / select, returning a pyarrow.Table directly (the same call, embedded or remote):
results = db.search(
"patents", query=query_vec, k=20,
filter="year >= 2020", select=["id", "title", "similarity"],
) # pyarrow.Table
For open, compound retrieval + inference — join, filter, and running a model over a relation — use SQL. The annotate(...) table function runs a model over a relation's columns; it works identically in-process (embed wheel) and over the Flight SQL lane (remote engine via jammi-client):
results = db.sql("""
SELECT p.title, a.vector
FROM annotate('all-MiniLM-L6-v2', 'text_embedding',
'patents.public.patents', 'id', 'abstract') AS a
JOIN patents.public.patents AS p ON a._row_id = arrow_cast(p.id, 'Utf8')
""")
All results are returned as pyarrow.Table — zero-copy from the Rust engine.
Fine-tuning
job = db.fine_tune(
source="patents",
model="sentence-transformers/all-MiniLM-L6-v2",
triplets="triplets_train.parquet",
)
job.wait()
Requirements
- Python 3.9+
- Linux (x86_64) or macOS (Apple Silicon or Intel)
Windows is not yet supported due to a dependency on POSIX memory-mapping APIs.
Running the OSS server
For deployments that need a long-running Flight SQL + gRPC service rather than an embedded library, the workspace ships a Docker image:
docker run --rm \
-p 8080:8080 -p 8081:8081 \
-v jammi_data:/var/lib/jammi \
ghcr.io/f-inverse/jammi-ai-server:latest
curl http://localhost:8080/healthz
# {"status":"ok","version":"0.8.0"}
For GPU-accelerated inference, pull the CUDA variant ghcr.io/f-inverse/jammi-ai-server-cu12:latest and run it with --gpus all on a host with the NVIDIA Container Toolkit.
The OSS server is single-tenant — the deployer's network is the auth boundary. See Deploy as a Server for the full guide.
Documentation
Full documentation, including guides for SQL queries, embeddings, search, fine-tuning, and evaluation:
https://f-inverse.github.io/jammi-ai/
For the engine's design philosophy — what belongs in Jammi versus a consumer's own repo, how embeddings are consumed, and how it deploys — see Design Philosophy.
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jammi_ai-0.24.0-cp39-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: jammi_ai-0.24.0-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 60.4 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fff65af456f5d366a932b16b2f6e94ca277d62f4363ccbd9c42e213107f9916
|
|
| MD5 |
bc5508ab37888539f5938efec19b9045
|
|
| BLAKE2b-256 |
97610303b0fab5ac24764916ba6be222dbddfd144183a9f5fa5e470113144bcf
|
Provenance
The following attestation bundles were made for jammi_ai-0.24.0-cp39-abi3-manylinux_2_28_x86_64.whl:
Publisher:
pypi.yml on f-inverse/jammi-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jammi_ai-0.24.0-cp39-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
4fff65af456f5d366a932b16b2f6e94ca277d62f4363ccbd9c42e213107f9916 - Sigstore transparency entry: 1754183223
- Sigstore integration time:
-
Permalink:
f-inverse/jammi-ai@989fc625cc80c35d60baaaf266f215ad99d265cb -
Branch / Tag:
refs/tags/py-v0.24.0 - Owner: https://github.com/f-inverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@989fc625cc80c35d60baaaf266f215ad99d265cb -
Trigger Event:
push
-
Statement type:
File details
Details for the file jammi_ai-0.24.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: jammi_ai-0.24.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 51.6 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
627f940f665d1ca08ad7f95421761231f141a34f815d0c57d689473a73db0254
|
|
| MD5 |
e57a3cd23f83c99926370c7a1b366e9e
|
|
| BLAKE2b-256 |
509dd63b78538241ddcb28e8b37e1fe05c565fdfde37addea45197870ec4b635
|
Provenance
The following attestation bundles were made for jammi_ai-0.24.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
pypi.yml on f-inverse/jammi-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jammi_ai-0.24.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
627f940f665d1ca08ad7f95421761231f141a34f815d0c57d689473a73db0254 - Sigstore transparency entry: 1754183298
- Sigstore integration time:
-
Permalink:
f-inverse/jammi-ai@989fc625cc80c35d60baaaf266f215ad99d265cb -
Branch / Tag:
refs/tags/py-v0.24.0 - Owner: https://github.com/f-inverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@989fc625cc80c35d60baaaf266f215ad99d265cb -
Trigger Event:
push
-
Statement type:
File details
Details for the file jammi_ai-0.24.0-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: jammi_ai-0.24.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 54.7 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa2b675ffb6e4a1b0f49d4e824871dba222055f50347e778d753136912b650d7
|
|
| MD5 |
88a735e13f75a8a51d2f66fa93a3630d
|
|
| BLAKE2b-256 |
2910d06be68d6a4c9d76dd8c14f7a6ad352c4248d79c0441c3276684936cd164
|
Provenance
The following attestation bundles were made for jammi_ai-0.24.0-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
pypi.yml on f-inverse/jammi-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jammi_ai-0.24.0-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
aa2b675ffb6e4a1b0f49d4e824871dba222055f50347e778d753136912b650d7 - Sigstore transparency entry: 1754183156
- Sigstore integration time:
-
Permalink:
f-inverse/jammi-ai@989fc625cc80c35d60baaaf266f215ad99d265cb -
Branch / Tag:
refs/tags/py-v0.24.0 - Owner: https://github.com/f-inverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@989fc625cc80c35d60baaaf266f215ad99d265cb -
Trigger Event:
push
-
Statement type: