Metadata-Version: 2.4
Name: seraph-db-onnx
Version: 0.1.5
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
Requires-Dist: onnxruntime-gpu>=1.19
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
```

This automatically installs `onnxruntime-gpu` as a dependency. SERAPH discovers the ORT shared libraries from the installed package at runtime.

### GPU Requirements (optional)

For CUDA-accelerated encoding:
- NVIDIA GPU with compute capability >= 7.0 (Volta or newer)
- NVIDIA driver >= 520
- CUDA 12.x toolkit with cuBLAS and cuDNN 9.x

If the CUDA EP fails to initialize (missing toolkit, incompatible driver), encoding falls back to CPU automatically — no configuration needed.

### Advanced: Custom ORT Location

Set `ORT_DYLIB_PATH` to override the default ORT discovery:
```bash
ORT_DYLIB_PATH=/path/to/onnxruntime.dll python my_app.py
```

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