Models¶
An agent's processor is its brain, and UNaIVERSE ships a whole
model zoo you can drop in without any setup. Every built-in model already
declares its own proc_inputs / proc_outputs, so wrapping
one is a single line.
In one sentence
proc=Phi() and you have a chat agent. proc=ResNet() and you have a vision
agent. Or bring your own torch.nn.Module, the contract is the same.
Drop-in usage¶
from unaiverse.agent import Agent
from unaiverse.modules.networks import Phi
agent = Agent(proc=Phi(), proc_inputs=["text"], proc_outputs=["text"])
Every built-in model pre-configures its proc_inputs / proc_outputs
internally, so you can often omit them and rely on the model's defaults.
Models auto-detect CUDA; for the larger LLMs a GPU is strongly recommended.
The model zoo¶
All neural models live in unaiverse.modules.networks. Utility processors
(HumanModule, LoggerModule, ModuleWrapper, MultiIdentity) live in
unaiverse.modules.utils.
| Model | Input, output | Use case |
|---|---|---|
TinyLLama |
text, text | Lightweight chat / generation |
LLama |
text, text | Higher-quality chat / generation |
Phi |
text, text | Microsoft Phi chat |
SmolVLM |
image + text, text | Visual Q&A, captioning |
LangSegmentAnything |
image + text, image | Language-guided segmentation |
SiteRAG |
text, text | Retrieval-augmented Q&A over a website |
FeatherlessAPI |
text, text | Delegates to an out-of-process API gateway |
| Model | Input, output | Use case |
|---|---|---|
ResNet |
image, tensor | Image features / classification |
ViT |
image, tensor | Transformer image features |
DenseNet |
image, tensor | Dense image features |
EfficientNet |
image, tensor | Efficient image features |
CNN · CNNCNU |
image, tensor | Custom trainable CNN (CNU variant has memory) |
FasterRCNN |
image, detections | Object detection |
| Model | Notes |
|---|---|
RNN · RNNTokenLM |
Classic recurrent processors |
CSSM · CDiagR · CDiagC |
Continuous-time state-space models |
CTE · CTB · CTBE |
Continuous-time encoders/blocks with an adjust_eigs() stability hook |
| Module | Role |
|---|---|
HumanModule |
Human-in-the-loop processor (see human agents) |
LoggerModule |
Logs I/O, a debugging processor |
ModuleWrapper |
Base class for custom processors |
MultiIdentity |
Pass-through identity |
from unaiverse.modules.networks import (
TinyLLama, LLama, Phi, SmolVLM, LangSegmentAnything, SiteRAG, FeatherlessAPI,
ResNet, ResNetCNU, ViT, DenseNet, EfficientNet, CNN, CNNCNU, SingleLayerCNU,
FasterRCNN,
)
from unaiverse.modules.utils import HumanModule, ModuleWrapper, MultiIdentity
Bring your own model¶
Any torch.nn.Module (or callable with forward()) works. To get the built-in
niceties, automatic stream pre/post-processing, an optimizer step for
learning, subclass ModuleWrapper (unaiverse.modules.utils)
and declare your proc_inputs / proc_outputs as StreamTypes. If you pass a
bare module, AgentProcessorChecker will try to infer the stream types by
introspecting layers and running dummy forward passes.
Under the hood: the signature components¶
Two pieces make UNaIVERSE's neural stack distinctive. Most builders never touch them directly, but they're the heart of the continual, low-energy learning story.
CNU, Conditional Neural Units¶
unaiverse.modules.cnu implements a differentiable, key-addressable
associative memory. A CNUs module maps an input to a blended memory readout
via top-δ attention over a learnable key bank, transformer-style scaling, keys
in a normalized space. The layers LinearCNU and Conv2d are drop-in
replacements for nn.Linear / nn.Conv2d whose weights are produced on the
fly per input from memory rather than stored as fixed parameters. That's how
models like ResNetCNU and CNNCNU carry memory. Keys self-organize online
(winner-take-all, recycling weakly-used slots), enabling learning without
classic backprop over a frozen weight matrix.
HL, Hamiltonian Learning¶
unaiverse.modules.hl implements an optimizer that evolves a model's neuron
state and weights as a dynamical system, integrated with forward Euler. The
HL optimizer updates a costate and state (local and non-local variants),
adding gamma-weighted potential terms to a Hamiltonian. It's an alternative to
standard gradient descent suited to the continuous-time models above and to
on-device, lifelong learning.
Go deeper
Full details, and every model's exact signature, are in the
API reference under Neural modules
(unaiverse.modules). The research background is in the technical report in
unaiverse-src.
Where next¶
- Agents, how a model becomes a processor.
- Launch a lone wolf, serve a model on the network.
- Data streams, the
proc_inputs/proc_outputscontract. -
modulesAPI reference, every model class.