Onarex
Onarex is an ontology-conditioned information extraction model with exclusive NER / REL / EMB trunks and phased training (rel_only β ner_only β emb_only).
This Hub repo contains a trained checkpoint exported via OnarexModel.save_pretrained (config.yaml + pytorch_model.bin).
Model summary
| Field | Value |
|---|---|
| Encoder | answerdotai/ModernBERT-large |
| Hidden size | 1024 |
| BiLSTM | True |
| Checkpoint phase | emb_only |
| Selection metric | triple_emb_cosine = 0.957874 (step 120000) |
Architecture (high level)
- Shared ModernBERT encoder (+ optional BiLSTM)
- Exclusive trunks: separate span/pair modules for NER, REL, and triple embedding
- Ontology-conditioned NER / REL scoring (typed label inventory at train/infer)
- Phased training: relation path first (encoder FT), then NER, then emb alignment
- Train is GT-fed for REL/EMB; inference uses the NER β REL β emb cascade
Files
config.yamlβ model / training / eval hyperparameterspytorch_model.binβ fullstate_dictbest.jsonβ optional metadata for the best validation checkpointREADME.mdβ this model card
Loading
A public onarex Python package is not published yet. With the research repo installed:
from onarex.model import OnarexModel
model = OnarexModel.from_pretrained("cb-ai/onarex")
# or from a local download of this folder
# model = OnarexModel.from_pretrained("./onarex_model_emb_only_best")
Inference helpers live in the Onarex repository (inference.py); they are not bundled as a standalone Hub pipeline here.
Intended use
- Ontology-conditioned NER + relation extraction
- Research / experimentation on typed IE and triple embedding alignment
Limitations
- English-focused training data
- Requires an ontology / label inventory (entity types + relation inventory) at inference
- Cascade errors: NER mistakes propagate to REL/EMB
- Not a drop-in Hub
pipelinewithout the Onarex codebase
Training notes
Phased exclusive-path training:
rel_onlyβ REL trunk (+ encoder / BiLSTM when enabled)ner_onlyβ NER trunk (encoder frozen)emb_onlyβ emb trunk (encoder frozen); this upload is typically the final emb best ckpt
Teacher triple embeddings used during emb_only are ModernBERT-pooled description vectors (see training config data.* paths).
Citation
If you use this checkpoint, please cite the related GLiREL / ModernBERT lines of work as appropriate for your paper, and credit the Onarex project.
@misc{onarex2026,
title={Onarex: Ontology-conditioned NER, Relation Extraction, and Triple Embedding},
year={2026},
howpublished={Hugging Face model card: cb-ai/onarex},
}
Model card contact
Uploaded from an Onarex exclusive-path training run. Replace this section with your org / author contact as needed.
- Downloads last month
- 7