Expand description
Qualia-unique hybrid inference: graph + manifold + modes + deontic.
Most engines only optimise GEMV. QualiaDB can also:
- Graph-grounded speculative draft — encode fact-table repairs as draft
tokens and verify with the same batch path as prompt-lookup (bit-exact when
accepted; force-emit when
QUALIA_GRAPH_FORCE=1). - Graph route mask — hash prompt tokens into the U1
AttentionRouteMaskso sparse attention can bias toward graph-linked KV provenance slots. - 10D query publish — fold prompt word hashes into a
Tensor10Dquery anchor for the continuous U1→U0 context-inject path. - Graph logit bias — boost tokenizer ids for known answer strings mid-decode (neuro-symbolic sampling, not post-hoc string replace only).
- Deontic obligation — when a high-stakes fact matches the prompt, compile
an
OP_OBLIGATEnorm Quin so the Rights/Webizen layer can audit the duty to ground (unique to Qualia’s logic stack).
These are first-class companions to portable/cuda/quant-graph modes — not a second engine.
Constants§
- GRAPH_
LOGIT_ BIAS - Logit boost applied to graph answer-token ids (nats; soft guidance).
Functions§
- apply_
graph_ logit_ bias - Soft-boost logits for graph answer strings (first matching token id per string).
- force_
fact_ tokens - If quant-graph + force, return full repair token sequence for immediate emit.
- graph_
force_ enabled - Whether to force-emit graph repair without model verify (high-stakes capitals, etc.).
- prepare_
hybrid_ decode - Prepare hybrid hints before a decode turn (safe no-ops when inactive).
Call after any default
publish_query_tensorso route/query are not wiped. FastVerify skips mid-decode hybrid work (post-turn verify owns quality). - propose_
best_ draft - Prefer fact draft when quant-graph; else prompt-lookup n-gram draft.
- propose_
fact_ draft - Draft tokens from the quant-graph fact table (repair text encoded by caller).
- publish_
graph_ route_ from_ prompt - Map prompt words → attention route bits (tensor/KV provenance indices). Novel: uses the same U1 mask path as 10D kNN routing, fed from language not GPU. When quant-graph matches a fact, also route bits from subject/object quin hashes so attention can prefer KV slots co-located with grounding provenance.
- publish_
grounding_ obligation - Compile a deontic obligation Quin for a matched grounding fact (audit trail).
- publish_
prompt_ query_ tensor - Fold prompt into a 10D query for continuous graph–tensor inject.