NandhaKishorM/vegaml
Typed decisions from a frozen language model and a small physics engine: calibrated probabilities, conformal sets, 73k context, images.
What it solves
vegaml answers fixed-type questions about a given state (text, image, or audio) without generating any text. Instead of producing free-form language, it returns a structured answer your code can use directly: a choice from your list, a true/false boolean, or a score on an ordered scale. Each answer comes with a calibrated probability, a conformal prediction set, and an explicit abstain flag so you know when the model is not confident enough.
How it works
vegaml pairs a frozen language model (the "reader") with a tiny 14.3M-parameter decision engine. You give it a state (e.g., an email, an image, or a call recording) and a set of questions whose answer types are defined in advance. The reader extracts features from the state and the engine turns those features into calibrated answers. No text is generated anywhere in the path.
You can attach your own reader (any instruction-tuned causal language model) without retraining the engine or fine-tuning the reader. The alignment is self-supervised: the shipped root reader generates feature targets for your corpus, and a linear map is fitted to make your reader's features match. This porting step is label-free and runs on your own text.
After attaching or using a shipped reader, you can calibrate the probabilities on your own labelled examples. This updates the temperature, conformal set thresholds, and abstain thresholds so the outputs match your distribution and business logic.
The library also supports images (via a frozen vision encoder) and audio (via a local transcriber that feeds the text path). It runs on CUDA, Apple Silicon (MPS), and CPU, with a small enough footprint to work on a single T4 in a browser via Colab.
Who it's for
Developers and teams who want reliable, machine-checkable decisions from language models inside their applications—for example, automating support ticket routing, transaction risk assessment, or document classification. It suits anyone who has a state and a set of predefined decision types, and who values calibrated probabilities and explicit abstention over free-form answers. Because you can plug in your own reader and bring your own labels, it works across many domains without training data beyond your own historical examples.
Highlights
- No text generation – decisions are produced as typed values, not language, so they are directly usable in code.
- Calibrated probabilities – each answer includes a probability that is well-calibrated to your data after optional calibration.
- Conformal answer sets and abstain flags – the model tells you when it is not sure, and provides a set of plausible answers instead of a single guess.
- Reader-agnostic – a single 14.3M engine works with frozen 0.8B to 27B language models, including your own attached readers.
- Self-supervised porting – attach a new reader without retraining or fine-tuning, using your own text corpus.
- Multimodal – handles text, images, and audio through the same decision interface.
- Runs on modest hardware – works on a single GPU, MPS, or CPU, with a small memory footprint.
Related
- Project
- Project
- Project
- Project