unaiverse.modules¶
The package holds the processors that ship with the SDK and the code that turns any PyTorch module or Python callable into the processor of an agent. A processor is the model of an agent: it reads the samples of its input streams and writes the samples of its output streams (see Models and Agents).
modules
¶
Importing the package imports its four subpackages and modules, in this order:
| Name | Content |
|---|---|
cnu |
Continual Neural Units: the base class CNUs, the layers LinearCNU and Conv2d and the projections psi. |
hl |
HL, the integration steps of Hamiltonian Learning for state-space networks. |
networks |
The ready-made processors: recurrent and state-space networks, image classifiers, local language and vision models and the clients of hosted language models. |
utils |
The wrapper of every processor (ModuleWrapper), the checker that completes its description (AgentProcessorChecker), HumanModule, the image transforms and the local gateway of FeatherlessAPI. |
import unaiverse imports this package too. Because the import of networks loads torchvision and transformers at module level, every program that imports the SDK loads these two libraries even when it uses no ready-made processor. The weights of a ready-made model, on the other hand, are downloaded only when its class is instantiated.