Rust

UForm for Rust

cargo add uform 4.0.0-rc.1 · 3ee5e534

It needs Rust 1.100 or newer, CMake 3.27 and a C++23 compiler, Clang by default. Every verb is a batch, and every output whose length the call decides lands in an arena you reuse.

  • Model encodes text, images, video and audio into pooled embeddings, per-token states and token vectors, and scores calibrated choices over text.
  • Trainer trains one on GPUs, joined across hosts by a Mesh.
  • Executor owns the threads or streams every call runs on, apart from any model.

Topics

Installation1CMake builds the library from the crate's sources into Cargo's output directory and links it as a static archive, along with the system image, video and audio codecs.
Quickstart
Receivers and Deferred Calls20
Executors24An executor owns host threads or device streams, the activation scratch, and the pinned buffers staging passes through, grown to a high-water mark.
Arenas5Every output whose length only the call knows, the embeddings, the states and their offsets, lands in an Arena you pass, and the verb answers views over it without copying.
Encoding52
Choices3
Models18Model::loadram(path) and Model::loadvram(path) copy a safetensors checkpoint into host memory or onto GPUs, and loadrambuffer and loadvrambuffer take the checkpoint's bytes instead.
Training30Training is GPU-only.
Errors3Every fallible call returns uform::Result, whose Error carries a Status and a static message, so nothing allocates on the failure path.
Design