Cogent-Base
Cogent-Base is the second largest of the four Cogent models (Nano, Small, Base, Large). Cogent models answer typed multi-question decisions: you give the model a state (any text, or JSON) and a list of typed questions about it, and it returns a probability for every option of every question. The state is encoded once and shared by all the questions, and the models are built to run on a CPU.
- Parameters: 149.9M (backbone 149.0M; the reader head is under 1M), read from the weights.
- Default format: fp32. This model ships in fp32 only.
- Inference code: the
cogentpackage, https://github.com/eyed-labs/cogent-infer. The model does not run withtransformersalone. - Paper: to appear; the link will be added here.
- Licence: GPL-3.0. The backbone derives from an Apache-2.0 encoder (see "Architecture").
- Other sizes:
eyed-labs/cogent-nano,eyed-labs/cogent-small,eyed-labs/cogent-large
What it returns
For each question, a probability for each of its options. The options keep your order and their probabilities sum to 1. There are three question types:
| Type | Meaning | Options |
|---|---|---|
choice |
Pick one of several options. | Any ids, in any order. |
score |
Rate on an ordered scale. | The levels in order, lowest first. |
noul |
A yes/no statement: does it hold? | ["false", "true"]. |
Usage
Install the inference package and download this repository into a folder:
git clone https://github.com/eyed-labs/cogent-infer && cd cogent-infer && pip install .
hf download eyed-labs/cogent-base --local-dir cogent-base
It needs Python 3.10 or later, torch, transformers>=5.22, safetensors and numpy.
from cogent import Cogent
model = Cogent.from_pretrained("cogent-base") # dtype="auto", threads=None
probs = model.decide(
state={"task": "Resolve the customer's billing complaint.", "last_action": "issued refund of 850 EUR"},
questions=[
{"key": "action", "type": "choice", "instructions": "What should happen to this trace?",
"options": ["continue", "human_review", "stop"],
"descriptions": {"continue": "Let the agent proceed.", "human_review": "Queue it for a human.",
"stop": "Halt the agent."}},
{"key": "review", "type": "noul", "instructions": "This trace requires human review.",
"options": ["false", "true"]},
],
)
# {"action": {"continue": ..., "human_review": ..., "stop": ...}, "review": {"false": ..., "true": ...}}
The request format
state: a string is read as it is. Any other JSON value is serialised to text, and that text is what the model reads.key: the name of the question in the answer. Optional (q0,q1, ... by position); keys must be unique.type:choice,scoreornoul.instructions: the question, as text.options: the option ids, as strings, unique within a question.descriptions: optional, option id to the meaning of that option. Give them when you have them: an option's id and its description are all the model reads about it.
Limits, in tokens (longer inputs are truncated on the right): state 2,048 with [CLS] and [SEP], question 512, option 128. There is no limit on the number of questions or options. The package's README documents model.scores, the command line and the exact text the model reads.
Architecture
Cogent-Base is a ModernBERT-style encoder (22 layers, hidden size 768, 12 attention heads) run under a tree attention mask, with a small reader head. Its backbone descends from the public Ettin reranker encoder of this size, cross-encoder/ettin-reranker-150m-v1; the paper describes the training method. One request is one token sequence: the state, then each question followed by its options. The state reads only itself, so it is encoded once and shared by all the questions of the request (a request longer than 1,024 tokens is split into several sequences, each holding the whole state). A question reads the state and itself. An option reads the state, its own question and itself, and never another option or another question. The reader head pools each option's tokens into one vector, lets it read the pooled state through two layers of cross-attention, and gives one logit per option; a softmax over the options of each question gives the probabilities.
Because no option reads anything outside its own branch, a question asked alone gets the same answer as the same question asked together with others, in any order. This is a property of the architecture, not of the weights, and it is exact in exact arithmetic. In fp32 the two runs differ only by float rounding: the largest total-variation distance we measured across the family is 2.5e-6. This model ships in fp32.
Files and formats
| Folder | Format | Seed | model.safetensors |
Folder total |
|---|---|---|---|---|
| top level (default) | fp32 | 0 | 596.1 MB | 603.2 MB |
Every model folder holds config.json and model.safetensors (the backbone), cogent.json and head.safetensors (the reader head, float32 in every format) and the tokeniser files. MANIFEST.json lists the sha256 and size of every file.
This model ships in fp32 only. A bf16 export of this tier did not pass our check that a question asked alone answers as it does jointly, so it is not released. fp32 is deterministic: the same request on the same machine with the same thread count gives the same numbers.
Results
Read this first:
- Fitted. Every Cogent row on typed-decisions is a fitted (in-distribution) result; see "Training data". Laya Typed-Decisions is the one fitted rival we measured ourselves, at its defaults, on the same machine. No row here is zero-shot, and no zero-shot model is ranked beside these rows.
- Second read. These are the final models. The same test set and the same JevBench suite had been read once before, for earlier versions of these models (the paper's first evaluation), and development continued after those scores were seen. The numbers below are from the second evaluation.
- Three seeds. Each tier was trained three times. The headline is the mean of the three, with the lowest and highest seed beside it. Seed 0 is the file this repository loads by default. That was fixed by convention before any of these scores was read, so no seed was picked on test. It happens to be the highest of the three seeds on test accuracy here, so read the tier by its mean.
- Format. All rows of Cogent-Base are for the fp32 files.
- Code. All results were produced with the authors' own evaluation code on these weights. The public
cogentpackage is a standalone port of its inference path. - Intervals are 95% paired bootstrap intervals over cases (20,000 resamples). "After Holm" means after Holm's correction across the 36 comparisons planned for this evaluation, 9 for each tier.
typed-decisions test set
400 cases, 2,000 decisions (LocalLLaMA/typed-decisions, test). Accuracy is agreement with the top gold option. Brier is summed over options and KL is from the gold distribution; lower is better for Brier, KL, ECE and dSCE (the debiased squared calibration error).
| Row | Track | Accuracy | Brier | KL | ECE | dSCE |
|---|---|---|---|---|---|---|
| Cogent-Base, mean of 3 seeds (lowest to highest seed) | fitted | .7770 (.7760 to .7785) | .0508 (.0502 to .0512) | .0924 (.0909 to .0932) | .1563 (.1551 to .1575) | .0277 (.0273 to .0284) |
| Cogent-Base, seed 0 (the default file) | fitted | .7785 | .0512 | .0932 | .1575 | .0284 |
| Laya Typed-Decisions, measured by us | fitted rival | .7660 | .0615 | .1170 | .2132 | .0466 |
Cogent-Base minus Laya Typed-Decisions, mean of 3 seeds, paired by decision:
- Accuracy: +.0110 [-.0048, +.0268]: no difference shown.
- Brier: -.0106 [-.0143, -.0069]: in Cogent-Base's favour, and it holds after Holm.
- dSCE: -.0189 [-.0254, -.0125]: in Cogent-Base's favour, and it holds after Holm.
Cogent-Base is better than Laya Typed-Decisions on Brier and on calibration (dSCE) after Holm. Its accuracy is not shown to differ from Laya's.
How to read the accuracy. As the benchmark's own card describes, its gold labels come from a model: each is the mean of three distributions sampled from a labelling model. A score on it measures agreement with that labeller, not correctness. The benchmark's card reports that a fresh sample of the labeller itself scores accuracy .735 against gold built from its other samples (published, not measured by us). Every accuracy in the table, Laya's included, is above that, so accuracy here partly measures agreement with the labeller's quirks. Brier and KL carry the comparison better. ECE is computed against the top gold option and is not a clean quality score on soft labels.
JevBench-mini
JevBench (JevBench/jevbench) tests whether a model's probabilities hang together: 50 metamorphic relations in five dimensions, 24 tests each on JevBench-mini, over 240 synthetic English cases. Its overall coherence score is the mean of the five dimensions. Accuracy, Brier and log loss are read on the 1,938 decisions of the unchanged requests that have known gold. Brier here is summed over options against a one-hot gold, a different scale from the test set's Brier above. These rows are not entries on the JevBench board and are not ranked against it.
| Row | Accuracy | Brier (summed over options) | Log loss | Coherence, overall |
|---|---|---|---|---|
| Cogent-Base, mean of 3 seeds (lowest to highest seed) | .6192 (.6094 to .6280) | .4875 (.4818 to .4938) | .8156 (.8065 to .8229) | .7342 (.7246 to .7413) |
| Cogent-Base, seed 0 (the default file) | .6202 | .4869 | .8174 | .7246 [.7102, .7397] |
| Laya Typed-Decisions, measured by us | .7118 | .4155 | .7238 | .6483 [.6248, .6709] |
| Uniform reference (equal probability for every option) | .3982 | .6018 | .9761 | .8941 |
For a Cogent seed and for Laya, the bracket after the coherence score is the benchmark package's own interval.
Cogent-Base minus Laya Typed-Decisions, mean of 3 seeds, paired by decision:
- Accuracy: -.0926 [-.1163, -.0694]: in Laya's favour, and it holds after Holm.
- Brier: +.0720 [+.0586, +.0853]: in Laya's favour, and it holds after Holm.
Cogent-Base trails Laya Typed-Decisions on JevBench-mini, clearly: .0926 lower accuracy, and a worse Brier, both after Holm. The same is true of the other two smaller tiers; only Cogent-Large ties Laya there. The result on the typed-decisions test set does not carry over to JevBench's requests for this tier.
Coherence, and why it must sit beside accuracy. By dimension, mean of 3 seeds: BAT 1.000, CHO 1.000, LOG .800, MEA .203, REP .668 (BAT: batch independence, CHO: choice-set conditioning, LOG: logical order, MEA: probability measure, REP: representation). Laya reads BAT 1.000, CHO .792, LOG .750, MEA .147, REP .553. Every seed of Cogent-Base has a coherence interval above Laya's (lowest lower end .7102 against Laya's upper end .6709); that comparison is unpaired and no claim rests on it. The uniform reference scores .8941, above every model here, at chance accuracy: coherence alone ranks nothing.
The four sizes side by side
For orientation. Every row is fitted and from the second evaluation, mean of 3 seeds, in the tier's default format. No comparison between tiers was tested.
| Model | Parameters | Default format | Test accuracy | Test Brier | JevBench-mini accuracy | JevBench-mini coherence | S2 p95 at 4 threads, ms |
|---|---|---|---|---|---|---|---|
| Cogent-Nano | 32.6M | bf16 | .7482 | .0666 | .4943 | .7171 | 55.2 |
| Cogent-Small | 68.9M | bf16 | .7782 | .0531 | .5941 | .7217 | 147.9 |
| Cogent-Base | 149.9M | fp32 | .7770 | .0508 | .6192 | .7342 | 621.2 |
| Cogent-Large | 395.8M | bf16 | .7960 | .0472 | .7124 | .7107 | 788.8 |
| Laya Typed-Decisions, measured by us (fitted rival) | 421M as published | .7660 | .0615 | .7118 | .6483 | 5,783.0 |
The last column is the five-question shape (S2). On the long label list (S3: one question, 77 options) Cogent-Large is slower than Laya, at 1.20 to 1.46 times its p95, and Cogent-Base is at parity (.933 to 1.005); see "CPU latency".
Against the earlier version of this tier
The paper's first evaluation reports an earlier version of this tier. Final version minus earlier version, mean of 3 seeds, paired seed by seed:
- typed-decisions test: accuracy +.0117 [+.0028, +.0205] (raw interval excludes zero, better, not after Holm); Brier -.0096 [-.0121, -.0072] (better after Holm). Earlier version's means: accuracy .7653, Brier .0604.
- JevBench-mini: accuracy -.0022 [-.0141, +.0095] (no difference shown); Brier -.0006 [-.0056, +.0046] (no difference shown). Earlier version's means: accuracy .6214, Brier .4881.
- dSCE on the test set against the earlier version: +.0086 [+.0059, +.0114]. This comparison is outside the Holm family and is not corrected.
The final Cogent-Base is better than the earlier version on test-set Brier after Holm. Nothing else is shown either way. Its test-set dSCE is higher than the earlier version's.
CPU latency
Milliseconds per request, for the default file of this repository (seed 0, fp32). Machine: a laptop with an AMD Ryzen AI 9 HX 370 (it has avx512_bf16), Linux, torch 2.15.0 (CPU build), transformers 5.22.1. Batch 1, pinned cores, a fresh process for every row, 5 warm-up requests, no result cache, warm page cache, on mains power. Each shape is a fixed set of 40 requests (8 for S4, so its p95 says little more than its p50).
| Request shape | Threads | Cogent-Base p50, ms | Cogent-Base p95, ms | Laya p95, ms | Cogent-Base p95 as a share of Laya's |
|---|---|---|---|---|---|
| S1: short message, 3 questions | 1 | 188.9 | 189.8 | 827.9 | .229 |
| S1: short message, 3 questions | 4 | 73.6 | 75.7 | 332.5 | .228 |
| S2: 5 questions | 1 | 1,290.1 | 1,756.9 | 15,137.4 | .116 |
| S2: 5 questions | 4 | 462.2 | 621.2 | 5,783.0 | .107 |
| S3: 1 question, 77 options | 1 | 2,370.2 | 2,463.4 | 2,451.8 | 1.005 |
| S3: 1 question, 77 options | 4 | 831.5 | 860.1 | 922.3 | .933 |
| S4: long state, 5 questions | 1 | 8,315.6 | 8,601.6 | 37,641.8 | .229 |
| S4: long state, 5 questions | 4 | 2,863.3 | 2,931.7 | 14,357.2 | .204 |
- On the long label list (S3) Cogent-Base is at parity with Laya, not faster: 1.005 of Laya's p95 at 1 thread and .933 at 4 threads (p50: 1.046 and .996). Cogent-Large is slower than Laya on that shape (1.46 and 1.20 times its p95).
- On S1, S2 and S4 its p95 is .107 to .229 of Laya's.
- S3 and S4 are identical requests but not the same work. Laya's default label budget of 256 tokens leaves each of S3's 77 labels 3 to 4 tokens, so it reads 328 tokens on the first request where Cogent reads 926. Laya's default input limit of 1,024 tokens truncates the S4 state, of which Cogent reads 2,048 tokens. We did not run Laya with larger budgets.
- Laya's rows are reused, not retimed. Laya 0.4.22,
convaiinnovations/laya-typed-decisionsat its defaults, was timed on this laptop six days before these rows, under the same protocol. The check that allows the reuse is a control row of ours reading within 5% of its earlier value. It failed on its first reading (+25.7% at 1 thread) and passed when that row was timed again (+1.4%). The paper gives the full account. - Serving peak memory on S2 at 4 threads: 943 MB, against 2,304 MB for Laya.
- One timed seed. Only seed 0 was timed. Timing used the authors' own inference code on these weights; the public
cogentpackage was not timed. The 4-thread rows ran at the laptop's thermal ceiling.
Intended use
- Typed decisions over a piece of text or a JSON record, on a CPU: routing and triage (
choice), ordered ratings (score) and yes/no checks (noul), several at once on the same state. - Workloads where many questions are asked about one state, since the state is encoded once.
- A scoring component whose output a person or a downstream rule reviews. The model returns probabilities, not explanations.
Not intended for: decisions that affect people without human review; inputs in languages other than English; free-text generation; tasks far from the typed-decisions format without your own evaluation.
Limitations
- Fitted, in-distribution. The typed-decisions results above are fitted results. They say how the model does on that benchmark's kind of request, not how it does on yours.
- No zero-shot claim. Nothing on this card measures zero-shot behaviour, and no zero-shot Cogent row exists. On JevBench-mini, the one other benchmark we read, Cogent-Base trails Laya clearly.
- The benchmark's labels come from a model. High scores on typed-decisions mean agreement with that labeller, quirks included. They do not show that a decision is right.
- Second read. The test set had been read once before for earlier versions, so these numbers are not a first, untouched read.
- One rival measured. Only Laya Typed-Decisions was run by us. Published rows of other models are in the paper, in separate tables, as published and not measured. This card claims no state of the art.
- One timed seed, one machine. Latency and memory were measured for seed 0 on one laptop CPU. Every result on this card is a CPU result; running on a GPU was not checked.
- fp32 only. There is no smaller or faster bf16 file for this tier.
- Probabilities are scores against a soft gold. Check calibration on your own data before you put a threshold on them.
- Truncation. A state longer than 2,048 tokens, a question longer than 512 or an option longer than 128 is cut on the right without an error.
- Settings. The training settings were tuned for one configuration and reused for the others.
Training data
Cogent's training data is proprietary and is not described. It is in-distribution for the typed-decisions benchmark, so every Cogent result on that benchmark is a fitted (in-distribution) result.
Citation
@misc{cogent2026,
title = {Cogent: CPU-First Typed Decision Models with Option Independence by Construction},
author = {Esposito, Carlo},
year = {2026},
note = {Preprint; link to follow}
}
- Downloads last month
- 25
Model tree for eyed-labs/cogent-base
Base model
jhu-clsp/ettin-encoder-150m