Savant Engine SDK
Deterministic Geometric Governance for Embedding Pipelines
Savant Engine is a lightweight Geometry Control SDK designed to stabilize, audit, and govern vector embeddings produced by modern neural models.
It introduces deterministic geometric guarantees without modifying model weights or semantic content.
This SDK is model-agnostic and can wrap any embedding generator (Transformers, SentenceTransformers, local LLMs, or custom encoders).
Why Savant?
Modern embedding models can silently produce vectors with near-zero norms, leading to:
- NaN / Inf cosine similarities
- Reciprocal Rank Fusion (RRF) collapse
- Silent numerical corruption in production systems
Savant solves this by owning the geometry, not the model.
Core Principles
🔹 Geometry-Owned Architecture
The embedding manifold is governed by deterministic constraints, independent of the model’s internal distribution.
🔹 Silent Math
Under nominal conditions, Savant introduces zero distortion.
It only intervenes when geometric safety is violated.
🔹 Auditability
All stabilization events are logged, converting silent failures into traceable engineering signals.
Modules
savant_wrapper.py
Core stabilization wrapper that:
- Intercepts embedding vectors
- Enforces a minimum geometric norm (
r_min)
- Logs stabilization events deterministically
geometry_audit.py
Lightweight audit utilities for:
- Recording stabilization events
- Inspecting geometric health
- Supporting safety-critical validation workflows
rrf_safe_similarity.py
Drop-in replacements for similarity operations:
- Safe cosine similarity
- RRF-compatible distance calculations
- Guaranteed finite outputs
Installation
1pip install savant-engine
2
3Or directly from Hugging Face:
4
5pip install git+https://huggingface.co/antonypamo/savant-engine
6
7Quick Start
8from savant_wrapper import SavantWrapper
9from sentence_transformers import SentenceTransformer
10
11model = SentenceTransformer("all-MiniLM-L6-v2")
12
13savant = SavantWrapper(
14 embedder=model,
15 r_min=1e-4
16)
17
18vec = savant.encode("Resonant Relational Framework")
19print(vec.shape)
20print(savant.audit_log)
21
22Design Intent
23
24Savant is not:
25
26a model
27
28a dataset
29
30a fine-tuned checkpoint
31
32Savant is:
33
34an SDK
35
36an infrastructure primitive
37
38a deterministic safety layer for AI systems
39
40Target Use Cases
41
42Reciprocal Rank Fusion (RRF)
43
44Vector databases
45
46Safety-critical AI pipelines
47
48Industrial / ISO-compliant ML systems
49
50Research validation and benchmarking
51
52License
53
54MIT License
55
56Author
57
58Antony Padilla Morales
59Costa Rica
60
61“The model generates meaning.
62Savant owns geometry.”