Metadata-Version: 2.4
Name: seraph-db-onnx
Version: 0.1.2
Summary: SERAPH with ONNX Runtime backend — maximum encoder throughput on NVIDIA GPUs
Author-email: Tree D Interactive LLC <contact@tree-d-interactive.net>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://www.seraph-db.com
Project-URL: Source, https://github.com/Tree-D-Interactive-LLC/seraph
Keywords: semantic-memory,agent-memory,provenance,vector-database,onnx
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md
Dynamic: license-file

# SERAPH — ONNX Runtime Backend

**Maximum encoder throughput on NVIDIA GPUs.**

This is the ONNX Runtime variant of SERAPH. It uses the ONNX Runtime CUDA Execution Provider for encoding, delivering ~3x faster ingest throughput compared to the standard GPU (candle) build.

> For the standard build that works everywhere (GPU with CPU fallback), install [`seraph-db`](https://pypi.org/project/seraph-db/) instead.

---

## Install

```bash
pip install seraph-db-onnx
```

### ONNX Runtime Dependency

This package ships the SERAPH engine compiled against ONNX Runtime, but does **not** bundle the ORT shared libraries. You must provide them:

**Option 1 — pip (recommended):**
```bash
pip install onnxruntime-gpu
```

**Option 2 — system install:**
Download from [ONNX Runtime releases](https://github.com/microsoft/onnxruntime/releases) and ensure the libraries are on your library search path.

**Option 3 — manual placement:**
Place `onnxruntime.dll` (Windows) or `libonnxruntime.so` (Linux) alongside the installed `seraph.pyd`/`seraph.so`, or set `ORT_DYLIB_PATH` to point to them.

### Requirements
- NVIDIA GPU with compute capability >= 7.0 (Volta or newer)
- NVIDIA driver >= 520
- cuDNN 9.x (`cudnn64_9.dll` / `libcudnn.so.9`) on the library search path
- ONNX Runtime 1.26+ with CUDA EP

If the CUDA EP fails to initialize (missing cuDNN, incompatible driver), the ONNX build falls back to CPU inference automatically.

## Quick Start

```python
import seraph

store = seraph.SeraphStore("my_store.sfg")
store.put("The quick brown fox jumps over the lazy dog.")
hits = store.search("fast animal", k=5)
for hit in hits:
    print(f"{hit.score:.3f}  {hit.text}")
store.close()
```

The API is identical to `seraph-db` — only the encoder backend differs.

## API Reference

- [Python API Reference](https://github.com/Tree-D-Interactive-LLC/seraph/blob/main/PYTHON_API.md)
- [Product overview](https://seraph-db.com)

---

## Licensing

SERAPH is proprietary software licensed by [Tree D Interactive LLC](https://tree-d-interactive.net).
See the [License Agreement](https://www.seraph-db.com/license-agreement) and [Pricing Schedule](https://www.seraph-db.com/pricing) for full terms.

---

Copyright (c) 2025-2026 Tree D Interactive LLC. All rights reserved.
