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

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 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.

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


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.5.7-cp39-abi3-manylinux_2_28_x86_64.whl (55.9 MB view details)

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

jammi_ai-0.5.7-cp39-abi3-macosx_11_0_arm64.whl (47.8 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

jammi_ai-0.5.7-cp39-abi3-macosx_10_12_x86_64.whl (50.6 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for jammi_ai-0.5.7-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e18bd715e158d321df83517659fda5313f316293e6b5e052610716958be7721e
MD5 5554060726e65905ee7d5021a0626931
BLAKE2b-256 66046f0f2f3bdab5b747d046bdfc09bb0354827781be6f14171435f46bdfc15d

See more details on using hashes here.

Provenance

The following attestation bundles were made for jammi_ai-0.5.7-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.5.7-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jammi_ai-0.5.7-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d98db117860a13fa016bee722c4b63fdbf16cbc3a7c98cd04b2ec842fca72858
MD5 b99865d0e70ef4aac1f99254bb59f080
BLAKE2b-256 23c366bd21c815411d969fd2d08e5a6f7d82c40849cd0b0aafb84ea76eae9003

See more details on using hashes here.

Provenance

The following attestation bundles were made for jammi_ai-0.5.7-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.5.7-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jammi_ai-0.5.7-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9f1861b5bd0c25c8d1b0d9e7dc4bbfbe6ca6094c1fbd9c8b0c52cec420c13a4c
MD5 eddbfe7abc093a917df0600f2d66df42
BLAKE2b-256 de25d04d282a257ede060f65e310814e47a91b030d0cd83150f43eda661c7bdf

See more details on using hashes here.

Provenance

The following attestation bundles were made for jammi_ai-0.5.7-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