Documentation

llamay

The AZMX inference engine: a local-first runtime for GGUF models, written from scratch in Go, whose distinguishing idea is that a model's context is an object you can fork, save and move — not a buffer that dies with the process.

What llamay is

One static binary. It runs a model on your machine, serves an OpenAI-, Anthropic- and Ollama-compatible API on 127.0.0.1:11435, and never sends anything anywhere unless you configure a provider yourself. The default build has no cgo and no dependency outside the Go standard library; each GPU backend is one build tag.

The shape of the thing

Six packages carry the weight, each with one job. A file is memory-mapped rather than read; a loader decides which block shape the file describes; the model runs the forward pass; a backend does the multiplies; the KV cache holds what has been computed; the server turns HTTP into all of it.

ON DISK model.gguf mmap, not read READ pkg/gguf 23 tensor formats tensor audit on load IDENTIFY pkg/arch 17 architectures 39 declared names RUN pkg/model the forward pass prefill ≡ decode State: one conversation Batcher: several at once no allocation in the loop MULTIPLY CPU — NEON · i8mm · AVX2 · VNNI Metal — the whole pass CUDA — dlopen, no toolkit Vulkan — transcribed ABI REMEMBER pkg/kv paged · copy-on-write radix prefix tree SERVE pkg/serve OpenAI · Anthropic · Ollama · contexts scheduler, continuous batching, bounded queue
The dashed line is the server driving the model directly for a single request; every solid one is a dependency. The architecture page walks each box.

The three claims, and where each is checked

ClaimWhat it meansWhere it is checked
A context is an object Fork it, snapshot it, restore it on another machine. A fork of a 32-page context eight ways allocates zero pages. State engine — a reference implementation run in lockstep under randomised operations
It is deterministic The same input gives the same output regardless of thread count or batch composition, and a fork continues with a logit difference of zero. llamay verify, in CI on every push
It is correct against llama.cpp Identical token counts on eight real models, and within 1.3% of its perplexity on eleven of thirteen measured. The matrix — greedy text and perplexity on pinned files

What it does not do

Named here rather than discovered later. Each of these is expanded on the page it belongs to.

Conventions in these pages