# MacMind – A transformer neural network in HyperCard on a 19…

I trained a transformer in HyperCard. 1,216 parameters. 1989 Macintosh. And yes, it took a while. MacMind is a complete transformer neural network, embeddings, positional encoding, self-attention, backpropagation, and gradient descent, implemented entirely in HyperTalk, the scripting language Apple…

- **Page:** https://magpie.gallery/i/macmind-a-transformer-neural-network-in-hypercard-tegt
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Runs on:** macos
- **Tags:** transformer, hypercard, neural-network, retro

## Source

Web · hammer32: MacMind – A transformer neural network in HyperCard on a 1989 Macintosh

- **Original:** https://news.ycombinator.com/item?id=47792525

> I trained a transformer in HyperCard. 1,216 parameters. 1989 Macintosh. And yes, it took a while. MacMind is a complete transformer neural network, embeddings, positional encoding, self-attention, backpropagation, and gradient descent, implemented entirely in HyperTalk, the scripting language Apple shipped with HyperCard in 1987. Every line of code is readable inside HyperCard's script editor. Option-click any button and read the actual math. The task: learn the bit-reversal permutation, the opening step of the Fast Fourier Transform. The model has no formula to follow. It discovers the positional pattern purely through attention and repeated trial and error. By training step 193, it was oscillating between 50%, 75%, and 100% accuracy on successive steps, settling into convergence like a ball rolling into a bowl. The whole "intelligence" is 1,216 numbers stored in hidden fields in a HyperCard stack. Save the file, quit, reopen: the trained model is still there, still correct. It runs on anything from System 7 through Mac OS 9. As a former physics student, and the FFT is an old friend, it sits at the heart of signal processing, quantum mechanics, and wave analysis. I built this because we're at a moment where AI affects all of us but most of us don't understand what it actually does. Backpropagation and attention are math, not magic. And math doesn't care whether it's running on a TPU cluster or a 68030 from 1989. The repo has a pre-trained stack (step 1,000), a blank stack you can train yourself, and a Python/NumPy reference implementation that validates the math. https://github.com/SeanFDZ/macmind

## GitHub projects

- https://github.com/SeanFDZ/macmind

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
