Skip to content
PROTOWORKS

04 · Models · transformers at the seams

Text in. Statements out.

Most evidence arrives as prose. We put small, specialised transformers where text enters the system: encoders that find and link entities in one pass, decoders held to a grammar for relations. What comes out is not a summary. It is typed statements, appended to the ledger with the span that justifies each one.

Principles

The smallest model that can be right, held to a schema.

01

Encoders before decoders

Finding entities is span classification. An encoder labels every span in one pass and cannot produce a name that is not in the text.

02

Link before you trust

Exact, then fuzzy, then dense. Each stage is cheaper and more certain than the next. Whatever none of them resolves becomes a new entity, never a guess.

03

Constrain the decoder

Relations come from an open-weight model under grammar-constrained decoding. The output parses against the schema or it does not exist.

04

Every claim is replayable

Model and version ride on every statement. Tests run on recorded fixtures, never live endpoints. Swap a model and replay to see exactly what changed.

Simulation · recorded model outputs, fictional text

One sentence, five stages, a graph.

Five questions asked of one fictional sentence, one for each stage of the pipeline. Pick one and watch it answered step by step, with the recorded score behind every step. The labels under the machine are inputs, not training: switch one off and the encoder stops looking for it. Raise the threshold and weaker spans drop out, taking their links, relations and statements with them.

The question

Who and what does this sentence name?

Method · GLiNER · zero-shot spans. The encoder is handed the labels and scores every stretch of the sentence against them. Spans at or over the threshold are kept.

step 0 / 12
01 · Extract · doc_7f3a · zero-shot span labelling

On 14 March 2026 Kestrel Holdings paid R4.2 million to Halyard Trading LLC of Dubai. Tomas Vrede, Halyard’s sole director, also signs for Osprey Nominess in Tortola.

The reasoningIn progress
  1. The questionWho and what does this sentence name?
  2. The recordOne fictional sentence. The scores are recorded fixtures, the way our tests run: nothing on this page calls a model.
9 spans · 6 entities · 5 relations · 11 statements · 5 edges at 0.50▬ kept┄ under the threshold· label not asked▢ this step

The text, names and scores in the simulation are fictional fixtures; nothing is sent to a model from this page.

The toolbox

Specialists beat generalists at the seams.

The transformer is the shared idea. What changes is what it is trained to emit: spans, links, relations, ranks, forecasts or transcripts. These are the specialised models we watch, use, or build around.

Spans · in useNAACL 2024

GLiNER

A compact bidirectional encoder that takes entity types as input and extracts spans in parallel. In zero-shot NER evaluations it outperforms ChatGPT and fine-tuned LLMs. We run it through ONNX Runtime inside Rust services.

Source · Zaratiana et al. ↗
Relations2025

GLiREL

The same idea applied to relation extraction: relation types supplied at inference, classified between entity pairs in a single pass, zero-shot.

Source · arXiv 2501.03172 ↗
LinkingACL 2024

ReLiK

A retriever proposes candidate entities or relations; a reader sees them alongside the text and links everything in one forward pass. Up to 40 times faster than comparable systems, trained on an academic budget.

Source · Orlando et al. ↗
Decoding · in use2024

XGrammar

A structured-generation engine: the decoder may only emit tokens that keep the output valid against a grammar or JSON schema. How a large model becomes a dependable parser.

Source · Dong et al. ↗
RetrievalSIGIR 2020

ColBERT

Late interaction: documents are encoded token by token ahead of time and matched against the query at the token level. The precision of a cross-encoder at close to the cost of a vector lookup.

Source · Khattab and Zaharia ↗
Time series2024

Chronos

Values are scaled and quantised into a vocabulary, then modelled like language with T5-family models from 20M to 710M parameters. Competitive zero-shot forecasts across a 42-dataset benchmark: anomaly baselines for event streams.

Source · Ansari et al. ↗
Speech2022

Whisper

An encoder-decoder trained on 680,000 hours of weakly supervised audio. Radio, calls and video become text, and text enters the same pipeline as everything else.

Source · Radford et al. ↗
Graphs over time2020

Temporal Graph Networks

Learning directly on a stream of timed edges with per-node memory. When the ledger is the graph, this is how a model learns from it without a batch export.

Source · Rossi et al. ↗