The Go package binds the stable C ABI in c/uform/ through cgo and links the precompiled static library, so no tower is compiled in your build.
It needs Go 1.24 or newer with cgo enabled and a C toolchain, and answers every call as (T, error).
Building libuform_static from a checkout needs a C++23 compiler: GCC 15, Clang 22 with libstdc++ 15 or libc++ 22, Xcode 26 or VS 2026; CUDA code needs nvcc 13.5.
Every verb is a batch, and every output whose length the call decides lands in an arena you reuse.
Modelencodes text, images, video and audio into pooled embeddings, per-token states and token vectors, and scores calibrated choices over text.Trainertrains one on GPUs, joined across hosts by aMesh.Executorowns the threads or streams every call runs on, apart from any model.
Topics
| Installation2 | The Go package is a cgo layer over the C library, fetched as a module. |
|---|---|
| Quickstart1 | Encode two captions and a photo into one space, then pick the caption closest to the photo. |
| Receivers and Deferred Calls30 | The receiver decides where a verb runs and how it completes, while the verb and its arguments stay the same. |
| Executors26 | An executor owns host threads or device streams, the activation scratch, and the pinned buffers staging passes through, grown to a high-water mark. |
| Arenas7 | Every 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. |
| Encoding43 | One verb per input form, each spelled as in C, and each taking its inputs, the EncodeOutputs to keep, the scalar every output lands as, the arena, and last a config, nil for none. |
| Choices2 | TextChoose(texts, choices, ..) scores each item's legal choices, one byte each, through one forward, and answers a TapeView of one float32 probability per choice that sums to one per item. |
| Models20 | ModelLoadRam(path, config) and ModelLoadVram(path, config) copy a safetensors checkpoint into host memory or onto GPUs, and ModelLoadRamBuffer and ModelLoadVramBuffer take the checkpoint's bytes instead. |
| Training37 | Training is GPU-only. |
| Errors7 | Every fallible call answers an error whose *Error carries a Status and the library's static Message, and a bare Status is an error too, so errors.Is matches either. |
| Design | The architecture and conventions behind the library. |