Mojo

UForm for Mojo

uform_mojo = { git = "https://github.com/unum-cloud/UForm", subdirectory = "mojo", tag = "v4.0.0-rc.1" } 4.0.0-rc.1 · 3ee5e534

It needs Mojo 1.2 through pixi, on Linux x86-64, Linux AArch64 or macOS on Apple silicon. It binds every exported verb: the model and its encode verbs, the mesh and the trainer, and the executors and arenas they run on and write into.

Topics

InstallationLet Pixi build the package from source, with no channel to add and no linker flag to pass; the engine arrives as its run dependency, in the environment prefix mojo build bakes as runpath.
QuickstartA model owns its weights; an Executor owns the threads or streams a call runs on; an Arena owns the outputs a call writes.
Receivers and Deferred Calls27The receiver chooses where a verb runs and how it completes, and the verb stays the same.
Executors29One executor serves any number of models of its residency.
Arenas5Every output whose length only the call knows, embeddings, states, token vectors and probabilities, lands in an Arena you pass, and the verb answers a view over it without copying.
Encoding38
Choices4
Models21
Training44
Errors5Every fallible entry point raises Error and nothing else, since Mojo allows one error type per function.
Design26Blocking stays simple: a verb on the model or on model.on(executor) reads as it would if asynchrony did not exist.