Cogito Estella β Latent Graph Engine (v0.7.0)
Non-autoregressive decoder heads that turn SONAR (Meta) sentence embeddings directly into knowledge-graph triples β no token decoding, structurally valid by construction, 0.013 ms per concept on an RTX 5070.
Code, tests, and quickstart: https://github.com/DeliVali/cogito-estella
Checkpoints
| File | Modality | Triple F1 | Params |
|---|---|---|---|
cogito-toolcalls-graphdecoder.pt |
tool-calls / API control | 1.000 | 24.3M |
cogito-code-lora-adapters.pt |
Python code (LoRA + decoder) | 0.781 | 20M + 26M |
cogito-prose-candidates-{ft,cal,base,s2,s3}.pt |
entity-conditioned prose (ensemble of 5) | 0.827 | 5 Γ 37M |
cogito-prose-openvocab{,-s4,-s5}.pt + cogito-prose-cascade-fallback.pt |
open-vocab prose stack | 0.6514 | 3 Γ 45M + 37M |
vocab-prose.json |
20k entities Β· 60 relations | β | β |
Held-out by combination (no duplicate leakage); prose numbers validated on virgin slices of a 119,911-sample pool never used for model, threshold, or ensemble selection.
Usage
import json, torch
from cogito_estella.model.candidate_decoder import (
CandidateDecoderConfig, CandidateGraphDecoder, decode_triples_coo)
from sonar.inference_pipelines.text import TextToEmbeddingModelPipeline
vocab = json.load(open("vocab-prose.json"))
rels = sorted(vocab["rel2id"], key=vocab["rel2id"].get)
dec = CandidateGraphDecoder(CandidateDecoderConfig(n_relations=len(rels))).cuda()
dec.load_state_dict(torch.load("cogito-prose-candidates-ft.pt")["dec"])
dec.eval()
pipe = TextToEmbeddingModelPipeline(encoder="text_sonar_basic_encoder",
tokenizer="text_sonar_basic_encoder",
device=torch.device("cuda"))
emb = pipe.predict(["The committee approved the new budget."], source_lang="eng_Latn")
cands = ["committee", "budget", "hospital"] # noun scan + graph nodes
ids = torch.tensor([[vocab["ent2id"][c] for c in cands]]).cuda()
mask = torch.ones(1, len(cands), dtype=torch.bool).cuda()
out = dec(emb.float().cuda(), ids, mask)
for i, r, j in decode_triples_coo(out["exist_logits"].cpu(), out["adj_logits"].cpu(),
mask.cpu(), threshold=0.15, force_top1=True)[0]:
print(cands[i], rels[r], cands[j]) # committee support budget
Intended use & limitations
Structured-knowledge extraction for GraphRAG ingestion, agent long-term memory,
tool-call observability, and codebase mapping. Entities are selected from
caller-supplied candidates (entity-conditioned head) or a 20k-lemma vocabulary
(open-vocab head); relations come from a 60-verb vocabulary β content outside those
spaces is not captured. Prose oracle is dependency-parse SVO; graphs on free prose
inherit its noise profile. The SONAR encoder is required at inference and is
distributed separately by Meta under CC-BY-NC 4.0; the LoRA adapters in
cogito-code-lora-adapters.pt modify that encoder and inherit its non-commercial
terms. All from-scratch decoder heads in this repository are Apache-2.0.


