Machines

Experimental alpha. Expect breaking changes and major bugs. Your feedback is much appreciated.

Machines

Each machine performs one operation of a model, with the same arithmetic as PyTorch. A machine takes its main input on its back and, if it has one, its side input on any other face, and sends its result out of its front: see Machines and Cables. Right-click a machine to change its settings and see what it computes.

Every machine comes out of the Fabricator. The simple ones need no design; the rest need a photomask of the spec that describes them, verified on a Bench or salvaged from the ruins.

A machine's screen, part by part.

No design needed

From a design

  • Matrix Multiplier, from Matrix Multiply: grids multiplied, keys compared with queries.
  • Softmax, from Softmax: scores turned into weights.
  • Linear Layer, from Linear Layer: a learned matrix, the workhorse of every model.
  • Activation, from GELU: a nonlinear function on every number.
  • Normalizer, from Layer Norm: vectors kept at a steady size.
  • Attention Head, from Attention: multi-head attention in one machine.
  • Feed-Forward Block, from Feed-Forward Block: widen, bend, project back.
  • Transformer Block, from Transformer Block: a whole transformer layer.
  • Two-Token Head, from Multi-Token Prediction: scores for the next token and the one after it.

The modern block

Every one of these from a design too: see The Modern Block.