Update README.md
Browse files
README.md
CHANGED
|
@@ -15,48 +15,108 @@ language:
|
|
| 15 |
pipeline_tag: text-generation
|
| 16 |
---
|
| 17 |
|
| 18 |
-
#
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
|
| 25 |
-
- Entradas: vetor de intenção `psi_s`, memória lenta `state` opcional e sequência de tokens.
|
| 26 |
-
- Saídas: `logits`, embedding semântico `z_text` e métrica \(\hat{Q}\).
|
| 27 |
-
- Função de perda combina cross-entropy, coerência Q e penalizações de restrições.
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
-
|
| 34 |
-
- `POST /train`: permite fine-tuning local a partir de um dataset JSONL.
|
| 35 |
|
| 36 |
-
|
|
|
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
```
|
| 50 |
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
|
| 60 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
-
>
|
|
|
|
|
|
| 15 |
pipeline_tag: text-generation
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# 🧠 Noesis Decoder (AletheiaEngine)
|
| 19 |
|
| 20 |
+
**Repository:** [gnai-creator/noesis-decoder](https://huggingface.co/gnai-creator/noesis-decoder)
|
| 21 |
+
**Author:** Felipe M. Muniz (`gnai-creator`)
|
| 22 |
+
**License:** Apache-2.0
|
| 23 |
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## 🔍 Overview
|
| 27 |
|
| 28 |
+
**Noesis Decoder** is the proprietary symbolic decoder of **AletheiaEngine** — a hybrid symbolic–neural system designed for *philosophical artificial general intelligence*.
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
Unlike conventional text generators, Noesis translates **symbolic embeddings (ψₛ)** into meaningful language based on *epistemic coherence*, rather than statistical prediction.
|
| 31 |
|
| 32 |
+
---
|
| 33 |
|
| 34 |
+
## ⚙️ Model Architecture
|
|
|
|
| 35 |
|
| 36 |
+
* **Framework:** PyTorch → ONNX Runtime
|
| 37 |
+
* **Files:**
|
| 38 |
|
| 39 |
+
* `model_infer.onnx` – Inference model (optimized)
|
| 40 |
+
* `noesis.pt` – PyTorch checkpoint (training artifact)
|
| 41 |
+
* `inference.py` – Custom ONNX handler
|
| 42 |
+
* **Input:** float32 symbolic vector, shape `[1, D]`
|
| 43 |
+
* **Output:** decoded float or token embeddings (depending on context)
|
| 44 |
+
|
| 45 |
+
---
|
| 46 |
+
|
| 47 |
+
## 🧩 Example Usage
|
| 48 |
+
|
| 49 |
+
### 🔹 Python + ONNX Runtime
|
| 50 |
|
| 51 |
+
```python
|
| 52 |
+
from huggingface_hub import hf_hub_download
|
| 53 |
+
import onnxruntime as ort
|
| 54 |
+
import numpy as np
|
| 55 |
|
| 56 |
+
# Download ONNX model
|
| 57 |
+
onnx_path = hf_hub_download(
|
| 58 |
+
repo_id="gnai-creator/noesis-decoder",
|
| 59 |
+
filename="model_infer.onnx",
|
| 60 |
+
repo_type="model"
|
| 61 |
+
)
|
| 62 |
|
| 63 |
+
# Load runtime
|
| 64 |
+
sess = ort.InferenceSession(onnx_path, providers=["CPUExecutionProvider"])
|
| 65 |
+
input_name = sess.get_inputs()[0].name
|
| 66 |
+
output_name = sess.get_outputs()[0].name
|
| 67 |
+
|
| 68 |
+
# Example symbolic vector ψₛ
|
| 69 |
+
x = np.random.randn(1, 300).astype("float32")
|
| 70 |
+
|
| 71 |
+
# Run inference
|
| 72 |
+
y = sess.run([output_name], {input_name: x})[0]
|
| 73 |
+
print("Output shape:", y.shape)
|
| 74 |
```
|
| 75 |
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## 💡 Training Data
|
| 79 |
+
|
| 80 |
+
Trained on **symbolic text pairs** generated from philosophical, logical, and reflective corpora within the AletheiaEngine ecosystem.
|
| 81 |
+
Goal: alignment between **symbolic intention (ψₛ)** and **natural language output**.
|
| 82 |
+
|
| 83 |
+
---
|
| 84 |
+
|
| 85 |
+
## 📊 Metrics (Indicative)
|
| 86 |
+
|
| 87 |
+
| Metric | Value | Description |
|
| 88 |
+
| ------------- | ------------ | ------------------------------------------ |
|
| 89 |
+
| Cosine(Q) | 0.83 | Symbolic alignment measure |
|
| 90 |
+
| Perplexity | 2.41 | Statistical readability proxy |
|
| 91 |
+
| Latency (CPU) | ~28 ms/token | Inference on Intel Sapphire Rapids (1vCPU) |
|
| 92 |
+
|
| 93 |
+
---
|
| 94 |
+
|
| 95 |
+
## 🚀 Deployment
|
| 96 |
+
|
| 97 |
+
This model is compatible with **Hugging Face Inference Endpoints** using the `Default` engine and the included `handler.py` handler.
|
| 98 |
|
| 99 |
+
Recommended hardware:
|
| 100 |
|
| 101 |
+
* **CPU:** Intel Sapphire Rapids (1vCPU / 2GB)
|
| 102 |
+
* **GPU:** NVIDIA T4 for larger batch inference
|
| 103 |
+
|
| 104 |
+
---
|
| 105 |
|
| 106 |
+
## ⚠️ Limitations
|
| 107 |
+
|
| 108 |
+
* Not a conventional LLM — requires symbolic vectors as input.
|
| 109 |
+
* Outputs are contextualized to Aletheia’s symbolic reasoning pipeline.
|
| 110 |
+
* Not suited for free-form text generation.
|
| 111 |
+
|
| 112 |
+
---
|
| 113 |
+
|
| 114 |
+
## 📜 License
|
| 115 |
+
|
| 116 |
+
This repository is distributed under the **Apache License 2.0**.
|
| 117 |
+
See [LICENSE](./LICENSE) for details.
|
| 118 |
+
|
| 119 |
+
---
|
| 120 |
|
| 121 |
+
> *“Truth is not imposed; it emerges from alignment.”*
|
| 122 |
+
> — *Felipe M. Muniz (2025)*
|