SyFox / docs /ENGINE_PORT.md
Mr-DS-ML-85's picture
v3.9.1: engine port, 3 novel-gated fabrics (sst2/agnews/amazon), refreshed libsyfox_core.so
d61eb28 verified
|
Raw History Blame Contribute Delete
4.99 kB
# Engine port — v3.2.0 → v3.9.1
## What changed
The C++ SI substrate core in `engine/` was ported from
`syfox-train` (v3.9.1 code, v3.9.2 module set). `engine/core` had no files
unique to this repo — it was a strict subset of the upstream `core/`, so the
port was a whole-tree replacement rather than a merge:
| | before | after |
|---|---:|---:|
| `core/*.hpp` | 10 files | 16 files |
| `core/si_substrate.hpp` | 1,390 lines | 2,415 lines |
| `engine` string | `syfox-3.2.0` | `syfox-3.9.1` |
Newly present: `reason.hpp` (the typed provenance graph and reasoner — M1/M2/
M4/M10), `roles.hpp` (clause segmentation), `jas.hpp`, `distvec.hpp`,
`calc.hpp`.
New substrate capabilities: hippocampal/cortical lane split (`--cls-split`),
NTDA voltage gating (`--ntda`), the local Oja/GHL encoder interface
(`--encoder-dim/--encoder-chans/--encoder-eta`), and persistence tails
(`CLS1` / `NTDA` / `ENC1` / `ORD1`) that the v3.2 engine had no reader for.
## Verified
| check | result |
|---|---|
| `make all` | clean, 0 errors |
| `./build/syfox-test` | **all tests passed** |
| exported C ABI (`libsyfox_core.so`) | **17 symbols, unchanged** — the ctypes bridge is source-compatible |
| all 6 shipped fabrics load | ✅ giant-latin 43,420 nodes · bengali 579 · devanagari 546 · cyrillic 680 · b77-sem 1,648 · router16 4,742 |
| `core_version()` via ctypes | `3.9.1` |
| `inference.SyFox().decide(...)` end-to-end | ✅ response shape unchanged (`choice` / `confidence` / `deferred` / `probabilities`) |
## One thing that had to be fixed to make this work
`server/syfox_bridge.py` loads `../build/libsyfox_core.so` — the **repo-root**
copy, not `engine/build/`. That copy was stale (dated 27 Sep) and predated
`syfox_engine_set_semantics`, so after the port the Python path failed with:
```
undefined symbol: syfox_engine_set_semantics
```
`build/libsyfox_core.so` has been refreshed. **If you rebuild the engine,
refresh this file too**, or the Space and `inference.py` will silently run an
old core:
```bash
cp engine/build/libsyfox_core.so build/libsyfox_core.so
```
This is the same split-build layout the `Dockerfile` relies on
(`make build/libsyfox_core.so` then `COPY ... /app/build/libsyfox_core.so`),
so the two build paths must be kept in step.
## ⚠ Behaviour changed — the headline numbers are from the v3.2 engine
The v3.9 engine applies **stricter honesty gates** than v3.2. The most visible:
```
question: "why did my payment fail" (router16, valid rt00–rt15 criteria)
v3.2.0 : choice rt13, confidence 0.013, deferred false
v3.9.1 : choice "", deferred true, reason "unknown_candidates"
```
and on inputs both engines are unsure about, v3.9 defers with `honest_silence`
where v3.2 returned a low-confidence guess.
Two caveats on how far this evidence goes:
- The v3.2 answer it replaced was at **confidence 0.013** — effectively a tie.
Turning a coin-flip into a deferral is the intended direction, not a
regression, but it does change answered-accuracy.
- A 16-anchor probe set scored **0.0000 under both engines**, so it had no
discriminating power and cannot be used to claim equivalence. Equivalence on
*real* signal was not established here.
**Therefore: every measured number in `README.md` and `docs/EVALUATION.md`
(tickets 0.904, bank77 0.158, router16 cal 0.444, the 16-domain table) was
measured with the v3.2.0 engine and has NOT been re-measured under v3.9.1.**
Those cal/hidden rows were not shipped in this repo, so they could not simply
be re-scored. Anyone using those figures must re-run the evaluation against the
ported engine first.
This is left as a known, explicit gap rather than quietly presenting v3.2
numbers under a v3.9.1 banner.
## Tagging — two requested tags were not applied
The model card was updated with accurate tags that are genuinely rare on the
Hub. Two that were requested were **deliberately omitted because they are not
true of this model**:
- **`multimodal` — not applicable.** There is no image, audio, or video path
anywhere in the system. The four substrates (`giant-latin`, `-bengali`,
`-devanagari`, `-cyrillic`) are *scripts*, i.e. writing systems — that is
**`multilingual`**, which is applied and which the card already declares via
`language: [en, bn, hi, ru]`. The tag would route users to `from_pretrained`
expecting image input.
- **`conversational` — not applicable.** SyFox selects from a closed candidate
set and can abstain. It does not generate text and does not hold dialogue.
The tag implies a chat model.
The real differentiator on this Hub is rare and *true*, so it carries the
weight instead: **`abstention` / `uncertainty-quantification` /
`selective-prediction`**, alongside `no-transformer` / `no-neural-network` /
`no-pattern-matching`. A decision engine that can say "I don't know", with no
neural network anywhere, is a more defensible claim than a multimodal one, and
it is the one this repo actually demonstrates.