Pithos - Model-Isomorphic Vector Database (MIDB)
Pithos is a high-performance Model-Isomorphic Database (MIDB) and Ahead-of-Time (AOT) compiled vector search engine designed for Matryoshka-structured binary embeddings, compiled into a standalone native shared library (.dylib / .so) via GraalVM Native Image.
What is a Model-Isomorphic Database (MIDB)?
Traditional vector databases treat embeddings as generic high-dimensional arrays. A Model-Isomorphic Database (MIDB) structurally mirrors the latent geometry and spectral energy distribution of the neural embedding model:
- Row-Energy Prefix Pruning (Φ(k)): Cumulative row L2 energy (
||W_{i,:}||_2^2) derived from projection/LoRA weights (TransformOperator.computeCumulativeEnergy), preserving Matryoshka coordinate alignment without SVD axis permutation. - Isometric Preconditioning & Rotation: Eliminates spatial burstiness via Rademacher sign flipping and spreads embedding energy uniformly using block-diagonal Fast Walsh-Hadamard Transforms (
H_BD) for power-of-two blocks, Kronecker-factorized orthogonal rotations (H_u ⊗ Ω_vwith DCT-II) for arbitrary non-power-of-two dimensions, and exact sub-64-bit tier bit-masking. - 4-Gate Read-Path Cascade: Gate 0 (
4x8-BitMIH CSR prefix routing) → Gate 1 (64-bit liveliness & tombstone metadata bitmask) → Gate 2 (Matryoshka tiered SIMD Hamming scan via Java Vector API AVX-512 / ARM NEON) → Gate 3 (Asymmetric Distance Computation with FP8 E4M3, NVFP4 E2M1, FP16, or rotated binary/ternary L2 fallback + monotonic early cutoff). - Zero-GC Off-Heap Memory: Bypasses garbage collection entirely using the Java Foreign Function & Memory (FFM) API (Project Panama) and POSIX memory-mapped I/O (
mmap). - Hardware SIMD & CUDA: Vectorized with Java Vector API (
jdk.incubator.vector) and optional native NVIDIA CUDA kernels for batch distance computation, Walsh-Hadamard transforms, FP8 reranking, and multi-family resonant voting. - Pythonic Zero-Copy FFI: Seamless integration with NumPy arrays via
pithosdb(orpithos).
Python Quickstart
Install the official Python package:
pip install pithosdb
# or with uv:
uv pip install pithosdb
import numpy as np
from pithosdb import VectorDb, SidecarMode, QuantizationMode
# 1. Generate normalized embeddings
rng = np.random.default_rng(42)
records = rng.standard_normal((10_000, 384)).astype(np.float32)
records /= np.linalg.norm(records, axis=1, keepdims=True)
# 2. Compile into a universal self-contained .pithos container (FP8 E4M3 + 4x8 MIH)
VectorDb.compile_container(
path="temp/sample_index.pithos",
records=records,
tiers=[64, 128, 256, 384],
q_mode=QuantizationMode.ONE_BIT,
sidecar_mode=SidecarMode.FP8,
)
# 3. Memory-map off-heap & run zero-copy k-NN search + real-time LSM writes
with VectorDb() as db:
index = db.load_index("sample", "temp/sample_index.pithos")
queries = records[:10]
# Object search or zero-copy flat NumPy FFI views
results = index.search(queries, k=5)
out_ids, out_dists = index.search_numpy(queries[0], k=5)
print(f"Top-5 IDs: {out_ids}, Scaled Distances: {out_dists}")
# Real-time ingestion & tombstone-aware merged search via LSM DeltaBuffer + WAL
delta = db.create_delta_buffer("sample", flush_threshold=1000)
delta.insert(record_id=42, vector=records[0])
merged_hits = index.search_merged(queries[0], k=5)
print(f"Merged Top Matches: {merged_hits}")
Precompiled Native Binaries
Precompiled native libraries are automatically published on GitHub Releases:
Download Latest Release Assets
| Artifact | Platform | Acceleration |
|---|---|---|
libpithos-macos-aarch64.dylib |
macOS (Apple Silicon / ARM64) | NEON SIMD |
libpithos-linux-x86_64.so |
Linux (x86_64) | AVX2 / AVX-512 |
libpithos-linux-aarch64.so |
Linux (ARM64 / Graviton) | NEON SIMD |
libpithos-linux-cuda-x86_64.so |
Linux (x86_64) | NVIDIA CUDA GPU |
libpithos-linux-cuda-aarch64.so |
Linux (ARM64 / Grace) | NVIDIA CUDA GPU |
pithos.h / graal_isolate.h |
C/C++ Headers | Standalone C-ABI |
System Architecture & Features
┌─────────────────────────────────────────────────────────────────────────┐
│ Client Layer (Python / C / C++) │
│ pithosdb (ctypes Zero-Copy NumPy / C-FFI) │
└───────────────────┬─────────────────────────────────┬───────────────────┘
│ C-ABI Read Path (vdb_*) │ Write Path (vdb_insert / WAL)
┌───────────────────▼────────────────────┐ ┌─────────▼───────────────────┐
│ Parallel Read Workers (IntStream) │ │ LSM DeltaBuffer + _wal.bin │
│ ┌──────────────────────────────────┐ │ │ LMAX Disruptor 4.0.0 │
│ │ 4-Gate Read-Path Cascade │ │ │ Lock-Free Ring Buffer + │
│ │ Gate 0: 4x8-Bit MIH CSR Routing │ │ │ Shadowed IDs & Tombstones │
│ │ Gate 1: 64-Bit Liveliness Mask │ │ └─────────┬───────────────────┘
│ │ Gate 2: Tiered SIMD Hamming Scan│ │ │
│ │ Gate 3: FP8 / NVFP4 / FP16 / L2 │ │ │ Unified
│ │ Reranking (Early Cutoff)│ │ │ search_merged
│ └────────────────┬─────────────────┘ │ │
└───────────────────┼────────────────────┘ │
▼ ▼
┌─────────────────────────────────────────────────────────────────────────┐
│ Project Panama Off-Heap Storage (POSIX mmap) │
│ • Single-File Container (.pithos, DIOGENES v2): │
│ Superblock (128 B), IDs, Matryoshka Tiers, Sidecar (FP8/NVFP4/FP16), │
│ 4x8 MIH CSR Prefix Table, Metadata (Arrow IPC / JSONL), TOC, Trailer │
│ • Or Multi-File Layout (<name>, <name>_tier_*.bin, <name>_fp{16,8,4}) │
└─────────────────────────────────────────────────────────────────────────┘
Documentation
Detailed architectural guides, mathematical specifications, and C-API references:
- Universal Single-File Container (.pithos): Binary specification of the schema-agnostic
DIOGENESv2 container format, 4x8 MIH CSR tables, and Arrow IPC metadata. - Architectural Principles & Core Innovations: Mathematical foundations, Kronecker/Walsh-Hadamard rotations, row-energy prefix pruning, and the 4-gate cascaded read-path.
- Mathematical Foundations: Isometric transforms, Kronecker composite-dimension proofs, sub-Gaussian energy flattening, MIH collision bounds, and Gate 3 early cutoff.
- C-API Reference & Runtime Configuration: Complete C-ABI entry points (
pithos.h), FFI mappings, sidecar configuration, and FPGA/DMA co-design interfaces. - CUDA GPU Acceleration Guide: CUDA kernels (
pithos_kernels.h), host-device wrappers (pithos_cuda.h), and Docker build setup. - Release Notes: Detailed changelog through Pithos v2.2.6.
Building from Source
Prerequisites
- GraalVM JDK 25 (with
native-image) - Apache Maven 3.9+
- Python 3.9+ with
numpy(andpytestfor tests) - (Optional) NVIDIA CUDA Toolkit 12+ for GPU kernels
1. Compile Native Library (macOS & Linux)
export JAVA_HOME=/path/to/graalvm-jdk-25
export PATH=$JAVA_HOME/bin:$PATH
mvn clean package -DskipTests
The compiled shared library is generated in target/pithos.dylib (macOS) or target/pithos.so (Linux).
2. Run Test Suites
mvn clean test
pytest -v
3. Build with CUDA Support (Linux)
mvn clean package -Pcuda -Dcuda.enabled=true
License
Licensed under the Apache License, Version 2.0.
Metadata
Release files for pithosdb 2.2.6
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 |
|---|---|---|---|---|
| pithosdb-2.2.6.tar.gz | 66.6 kB | With provenance | Details for pithosdb-2.2.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pithosdb-2.2.6-py3-none-any.whl | Python 3 | none | any | Details for pithosdb-2.2.6-py3-none-any.whl |
Total release size: 113.3 kB
Release files / pithosdb-2.2.6.tar.gz
| Download URL | pithosdb-2.2.6.tar.gz |
|---|---|
| Size | 66.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a51a6407ebfddc6b1641a4246f9b46a13de662ebf2b3fc8c0dc14a31f86d7de
|
|
BLAKE2b-256 checksum How to use checksums |
dfb61990caa8cc653b1b465569f547e95c51bd8e00f9141bf8c2846cffe61dfb
|
| 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 14, 2026.
Transparency logRelease files / pithosdb-2.2.6-py3-none-any.whl
| Download URL | pithosdb-2.2.6-py3-none-any.whl |
|---|---|
| Size | 46.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfc3b5f1315c385a1cd30b7553f074e1103d08e18cb70cd250cf35576c714811
|
|
BLAKE2b-256 checksum How to use checksums |
7cb48496cfdd939ceca77ac9c2b7e7f80b179dde7ed741be362a034538b016be
|
| 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 14, 2026.
Transparency logSecurity for pithosdb 2.2.6
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
Both files in this release have been uploaded with provenance metadata.
Attestation for pithosdb-2.2.6.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 14, 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.