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
For CUDA/GPU support:
pip install jammi-ai-cu12
Quickstart
import jammi
# Connect (pass gpu_device=-1 to force CPU)
db = jammi.connect()
# Register a local data source
db.add_source("patents", path="patents.parquet", format="parquet")
# Query with SQL — returns a pyarrow.Table
table = db.sql("SELECT id, title, year FROM patents.public.patents WHERE year > 2020 LIMIT 5")
print(table.to_pandas())
# Generate and persist embeddings (with an ANN index)
db.generate_text_embeddings(
source="patents",
model="sentence-transformers/all-MiniLM-L6-v2",
columns=["title"],
key="id",
)
# Semantic search
query_vec = db.encode_text_query("sentence-transformers/all-MiniLM-L6-v2", "quantum computing applications")
search = db.search("patents", query=query_vec, k=5)
search.sort("similarity", descending=True)
results = search.run() # pyarrow.Table
print(results.to_pandas())
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
- SearchBuilder — fluent API for
.filter(),.sort(),.join(),.annotate(),.limit(),.select(),.run() - Evidence provenance —
retrieved_byandannotated_bytracking on every search result - 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
SearchBuilder
search = db.search("patents", query=query_vec, k=20)
search.filter("year >= 2020")
search.sort("similarity", descending=True)
search.limit(5)
search.select(["id", "title", "similarity"])
results = search.run() # pyarrow.Table
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.
Documentation
Full documentation, including guides for SQL queries, embeddings, search, fine-tuning, and evaluation:
https://f-inverse.github.io/jammi-ai/
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.3.0-cp39-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: jammi_ai-0.3.0-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 52.8 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 |
52124fc20b8db45a097cecc2675e85a4d3a54530ffd21cead80f334ed9c80cc6
|
|
| MD5 |
d6f7da6416e1d78753c667c7c4564868
|
|
| BLAKE2b-256 |
a4477263785f6250b5a6284a813fee21254fee3d7c2fe5d45e97fdc69da37450
|
Provenance
The following attestation bundles were made for jammi_ai-0.3.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.3.0-cp39-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
52124fc20b8db45a097cecc2675e85a4d3a54530ffd21cead80f334ed9c80cc6 - Sigstore transparency entry: 1576150122
- Sigstore integration time:
-
Permalink:
f-inverse/jammi-ai@affa2f76e5eefd053dc077087082f479bb53a60f -
Branch / Tag:
refs/tags/py-v0.3.0 - Owner: https://github.com/f-inverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@affa2f76e5eefd053dc077087082f479bb53a60f -
Trigger Event:
push
-
Statement type:
File details
Details for the file jammi_ai-0.3.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: jammi_ai-0.3.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 44.9 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 |
da2d074ea9129f6c06aecb664aa3c18839c0e8b0351a3c755698fcc3937ff418
|
|
| MD5 |
d49b90f1c2f01f45f092f01ec938d8b0
|
|
| BLAKE2b-256 |
2966465b2c8f7c40d56fb56e788bffdcf17f0de9d9ada1d4f0bba006c945041b
|
Provenance
The following attestation bundles were made for jammi_ai-0.3.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.3.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
da2d074ea9129f6c06aecb664aa3c18839c0e8b0351a3c755698fcc3937ff418 - Sigstore transparency entry: 1576150100
- Sigstore integration time:
-
Permalink:
f-inverse/jammi-ai@affa2f76e5eefd053dc077087082f479bb53a60f -
Branch / Tag:
refs/tags/py-v0.3.0 - Owner: https://github.com/f-inverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@affa2f76e5eefd053dc077087082f479bb53a60f -
Trigger Event:
push
-
Statement type:
File details
Details for the file jammi_ai-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: jammi_ai-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 47.6 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 |
7593f3427e27710d59cdf02926c955b89465ef24d4a85ddb46d1cc6da93de2b8
|
|
| MD5 |
b48f8fafb54a156e5e1359be1f332392
|
|
| BLAKE2b-256 |
216fe8fce35e4d3f2fb83f090d8dc24b1ec25575518acb67569d7f7e6479cb49
|
Provenance
The following attestation bundles were made for jammi_ai-0.3.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.3.0-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
7593f3427e27710d59cdf02926c955b89465ef24d4a85ddb46d1cc6da93de2b8 - Sigstore transparency entry: 1576150140
- Sigstore integration time:
-
Permalink:
f-inverse/jammi-ai@affa2f76e5eefd053dc077087082f479bb53a60f -
Branch / Tag:
refs/tags/py-v0.3.0 - Owner: https://github.com/f-inverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@affa2f76e5eefd053dc077087082f479bb53a60f -
Trigger Event:
push
-
Statement type: