Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,44 +8,207 @@ colorTo: green
|
|
| 8 |
pinned: true
|
| 9 |
short_description: API de evaluación conceptual resonante para LLM
|
| 10 |
---
|
| 11 |
-
|
| 12 |
|
| 13 |
-
Savant RRF Φ12.0
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
-
- **CRRF** – Coherent Resonant Score (SRRF modulado por alineación semántica).
|
| 19 |
-
- **E_phi** – Resonant Health Score (promedio entre SRRF y entropía resonante normalizada).
|
| 20 |
-
- **p_good** – probabilidad directa del meta-logit binario.
|
| 21 |
-
- Features físicos: entropía, energía, chirality de una **shell de Dirac icosaédrica**.
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
| 30 |
-
.
|
| 31 |
-
├── main.py # Código de la API (FastAPI + Savant RRF ��12.0 core)
|
| 32 |
-
├── requirements.txt # Dependencias Python
|
| 33 |
-
└── Dockerfile # Imagen Docker de la API
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
-
|
| 38 |
-
It combines:
|
| 39 |
|
| 40 |
-
|
| 41 |
-
- `antonypamo/RRFSavantMetaLogit` → `logreg_rrf_savant.joblib` (meta-logit classifier)
|
| 42 |
-
- A Dirac operator on an icosahedral lattice (Φ12.0 resonant shell)
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
|
|
|
| 8 |
pinned: true
|
| 9 |
short_description: API de evaluación conceptual resonante para LLM
|
| 10 |
---
|
| 11 |
+
🧠 Savant RRF Φ12.0 — Meta-Logic & Rerank API
|
| 12 |
|
| 13 |
+
Savant RRF Φ12.0 is a production-ready FastAPI service that exposes:
|
| 14 |
|
| 15 |
+
A meta-logic quality evaluator based on the Resonance of Reality Framework (RRF)
|
| 16 |
|
| 17 |
+
A batched semantic reranker using a custom icosahedral-resonant embedding model
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
A deterministic Φ-node ontology mapping layer
|
| 20 |
|
| 21 |
+
The system combines SentenceTransformer embeddings, spectral / resonance features, and a 15-dimensional meta-logit classifier to evaluate reasoning quality and rank documents efficiently.
|
| 22 |
+
|
| 23 |
+
🔗 Live API
|
| 24 |
+
Base URL: https://antonypamo-apisavant2.hf.space
|
| 25 |
+
|
| 26 |
+
📦 Models Used
|
| 27 |
+
Component Model
|
| 28 |
+
Embedder antonypamo/RRFSAVANTMADE
|
| 29 |
+
Meta-Logic antonypamo/RRFSavantMetaLogicV2/logreg_rrf_savant.joblib
|
| 30 |
+
Feature Dim 15 features
|
| 31 |
+
Runtime CPU (GPU optional if available)
|
| 32 |
+
🧩 Φ-Node Ontology
|
| 33 |
+
|
| 34 |
+
The system maps inputs to one of 8 deterministic Φ-nodes:
|
| 35 |
+
|
| 36 |
+
Index Φ Node
|
| 37 |
+
0 Φ0_seed
|
| 38 |
+
1 Φ1_geometric
|
| 39 |
+
2 Φ2_gauge_dirac
|
| 40 |
+
3 Φ3_log_gravity
|
| 41 |
+
4 Φ4_resonance
|
| 42 |
+
5 Φ5_memory_symbiosis
|
| 43 |
+
6 Φ6_alignment
|
| 44 |
+
7 Φ7_meta_agi
|
| 45 |
+
|
| 46 |
+
This mapping is rule-based and reproducible, derived from spectral coherence, energy, and phase features.
|
| 47 |
+
|
| 48 |
+
🚀 Endpoints Overview
|
| 49 |
+
GET /
|
| 50 |
+
|
| 51 |
+
Root discovery endpoint.
|
| 52 |
+
|
| 53 |
+
{
|
| 54 |
+
"status": "ok",
|
| 55 |
+
"model": "RRFSavantMetaLogicV2",
|
| 56 |
+
"version": "Φ12.0",
|
| 57 |
+
"docs": "/docs",
|
| 58 |
+
"endpoints": ["/manifest", "/health", "/evaluate", "/quality", "/v1/rerank"]
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
GET /health
|
| 62 |
+
|
| 63 |
+
Lightweight health check.
|
| 64 |
+
|
| 65 |
+
{ "status": "ok" }
|
| 66 |
+
|
| 67 |
+
GET /manifest
|
| 68 |
+
|
| 69 |
+
Static manifest describing the model.
|
| 70 |
+
|
| 71 |
+
{
|
| 72 |
+
"model": "RRFSavantMetaLogicV2",
|
| 73 |
+
"version": "Φ12.0",
|
| 74 |
+
"encoder": "antonypamo/RRFSAVANTMADE",
|
| 75 |
+
"features": 15,
|
| 76 |
+
"phi_nodes": [...]
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
🧪 Quality Evaluation API
|
| 80 |
+
POST /evaluate
|
| 81 |
+
|
| 82 |
+
Evaluates the conceptual quality of a (prompt, answer) pair.
|
| 83 |
+
|
| 84 |
+
Request
|
| 85 |
+
{
|
| 86 |
+
"prompt": "Explain what a smoke test is",
|
| 87 |
+
"answer": "A smoke test is a minimal validation..."
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
Response
|
| 91 |
+
{
|
| 92 |
+
"p_good": 0.87,
|
| 93 |
+
"scores": {
|
| 94 |
+
"SRRF": 0.87,
|
| 95 |
+
"CRRF": 0.79,
|
| 96 |
+
"E_phi": 0.82
|
| 97 |
+
},
|
| 98 |
+
"features": {
|
| 99 |
+
"phi": 0.61,
|
| 100 |
+
"omega": 0.22,
|
| 101 |
+
"coherence": 0.83,
|
| 102 |
+
"S_RRF": 0.81,
|
| 103 |
+
"C_RRF": 0.77,
|
| 104 |
+
"hamiltonian_energy": 48.3,
|
| 105 |
+
"dominant_frequency": 12
|
| 106 |
+
},
|
| 107 |
+
"phi_node": "Φ4_resonance"
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
POST /quality
|
| 111 |
+
|
| 112 |
+
Alias of /evaluate. Same input, same output.
|
| 113 |
+
|
| 114 |
+
🔍 Semantic Reranking API
|
| 115 |
+
POST /v1/rerank
|
| 116 |
+
|
| 117 |
+
Ranks documents by semantic similarity to a query using batched embedding inference.
|
| 118 |
+
|
| 119 |
+
Request
|
| 120 |
+
{
|
| 121 |
+
"query": "What is a smoke test?",
|
| 122 |
+
"documents": [
|
| 123 |
+
"A smoke test is a minimal system check",
|
| 124 |
+
"Load tests measure concurrency",
|
| 125 |
+
"Benchmarks compare systems"
|
| 126 |
+
],
|
| 127 |
+
"alpha": 0.2
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
alpha is reserved for future hybrid scoring (currently unused).
|
| 132 |
+
|
| 133 |
+
Response
|
| 134 |
+
{
|
| 135 |
+
"model_id": "antonypamo/RRFSAVANTMADE",
|
| 136 |
+
"results": [
|
| 137 |
+
{ "id": 0, "score": 0.92, "rank": 1 },
|
| 138 |
+
{ "id": 2, "score": 0.51, "rank": 2 },
|
| 139 |
+
{ "id": 1, "score": 0.21, "rank": 3 }
|
| 140 |
+
]
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
⚙️ Runtime Constraints
|
| 144 |
+
Parameter Limit
|
| 145 |
+
Max prompt length 8,000 chars
|
| 146 |
+
Max answer length 12,000 chars
|
| 147 |
+
Max documents 50
|
| 148 |
+
Max document size 6,000 chars
|
| 149 |
+
|
| 150 |
+
Payload violations return HTTP 413.
|
| 151 |
+
|
| 152 |
+
🧠 Feature Vector (15D)
|
| 153 |
+
|
| 154 |
+
The meta-logic classifier consumes:
|
| 155 |
+
|
| 156 |
+
Spectral / resonance features:
|
| 157 |
+
|
| 158 |
+
phi, omega, coherence, S_RRF, C_RRF
|
| 159 |
+
|
| 160 |
+
hamiltonian_energy, dominant_frequency
|
| 161 |
+
|
| 162 |
+
Φ-node one-hot encoding (8 dimensions)
|
| 163 |
+
|
| 164 |
+
Total = 15 features
|
| 165 |
+
|
| 166 |
+
🛠 Running Locally
|
| 167 |
+
pip install fastapi uvicorn sentence-transformers huggingface_hub joblib numpy
|
| 168 |
+
|
| 169 |
+
export HF_TOKEN=your_token_here
|
| 170 |
+
uvicorn app:app --host 0.0.0.0 --port 8000
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
Open:
|
| 174 |
+
|
| 175 |
+
http://127.0.0.1:8000/docs
|
| 176 |
+
|
| 177 |
+
📈 Performance Notes
|
| 178 |
+
|
| 179 |
+
Optimized for batched inference on /v1/rerank
|
| 180 |
+
|
| 181 |
+
Stable under load (0% error rate in benchmarks)
|
| 182 |
+
|
| 183 |
+
CPU-based by default; GPU reduces latency significantly
|
| 184 |
+
|
| 185 |
+
Tail latency (p95/p99) depends on concurrency and hardware
|
| 186 |
+
|
| 187 |
+
🧩 Design Philosophy
|
| 188 |
+
|
| 189 |
+
Savant RRF is not a generic classifier.
|
| 190 |
+
|
| 191 |
+
It encodes:
|
| 192 |
+
|
| 193 |
+
Discrete resonance physics
|
| 194 |
+
|
| 195 |
+
Icosahedral symbolic structure
|
| 196 |
|
| 197 |
+
Deterministic ontology mapping
|
| 198 |
|
| 199 |
+
Meta-logic scoring beyond surface semantics
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
|
| 201 |
+
This makes it suitable for:
|
| 202 |
|
| 203 |
+
AI evaluation & judging
|
|
|
|
| 204 |
|
| 205 |
+
RAG reranking
|
|
|
|
|
|
|
| 206 |
|
| 207 |
+
Cognitive profiling
|
| 208 |
|
| 209 |
+
Research-grade reasoning analysis
|
| 210 |
|
| 211 |
+
📄 License & Attribution
|
| 212 |
|
| 213 |
+
© 2025 Antony Padilla Morales
|
| 214 |
+
Resonance of Reality Framework (RRF)
|