MidMan AI

A coding and game-development language model built from scratch in Rust: its own tensors, its own autograd, its own training loop. No pretrained weights and no ML framework.

Lab

Run the real model in your browser, compiled to WebAssembly. Train it, and watch the loss, the gradients and the attention.

Docs

How each crate works, why it was built that way, and what is still open.

Tests

The latest test, lint and training-smoke results from CI.

Benchmarks

Criterion results, with a reference implementation next to every kernel.

Where it stands

Working and tested: the tensor library with reverse-mode autodiff, the transformer layers (grouped-query attention, rotary embeddings, SwiGLU), the model, AdamW, and an end-to-end training loop that memorizes a task. Not started yet: the tokenizer, the data pipeline, checkpoints, and everything after them.