Skip to main content

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

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

db = jammi_ai.connect(gpu_device=-1)
db.add_source("corpus", url="cookbook/fixtures/tiny_corpus.parquet", format="parquet")

MODEL = "sentence-transformers/all-MiniLM-L6-v2"
db.generate_text_embeddings(source="corpus", model=MODEL, columns=["content"], key="id")

query_vec = db.encode_text_query(MODEL, "quantum computing applications")
results = db.search("corpus", query=query_vec, k=5).run()
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
  • SearchBuilder — fluent API for .filter(), .sort(), .join(), .annotate(), .limit(), .select(), .run()
  • Evidence provenanceretrieved_by and annotated_by tracking 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.

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"}

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

jammi_ai-0.14.0-cp39-abi3-manylinux_2_28_x86_64.whl (59.2 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ x86-64

jammi_ai-0.14.0-cp39-abi3-macosx_11_0_arm64.whl (50.7 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

jammi_ai-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl (53.7 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file jammi_ai-0.14.0-cp39-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for jammi_ai-0.14.0-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0fd44f11ab2ca7852b6d046fe3c6832a5d90eb5d3d50c8d7bcdb0476eba6fb63
MD5 50cd3ca79fec7807e67bc3cebd659364
BLAKE2b-256 a2a69d14384445639ed1b5cbf49c679a3709964800314803d44d243afe6c0382

See more details on using hashes here.

Provenance

The following attestation bundles were made for jammi_ai-0.14.0-cp39-abi3-manylinux_2_28_x86_64.whl:

Publisher: pypi.yml on f-inverse/jammi-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jammi_ai-0.14.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jammi_ai-0.14.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fd2594ea6094d4f1db0487fefead3d51e2f3194248775eddf7e73ecfc50bf76a
MD5 20007aa4dc231cabbe441df04911475e
BLAKE2b-256 684e8bcb7a3db137dc4bc145c6a02b1aefb20f503bf1d4385b8d1e6b1f4c888d

See more details on using hashes here.

Provenance

The following attestation bundles were made for jammi_ai-0.14.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: pypi.yml on f-inverse/jammi-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jammi_ai-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jammi_ai-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e511ff99f79366754400734adcbebc0ce738744f8a8b918d74ee1b706c7ee1e5
MD5 616a5825884788560d9cba043f36c593
BLAKE2b-256 4f28496c8b56e6633af9cee1b57d5635c945bd4e9b3dc90cb2e2b953cde20ea3

See more details on using hashes here.

Provenance

The following attestation bundles were made for jammi_ai-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: pypi.yml on f-inverse/jammi-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page