Intelligence

Fly Brain LM

A language model based on the fruit fly connectome, running entirely in the browser on WebGPU.

For a software development class, a few friends and I had two weeks to build something. We built a language model based on the MaleCNS connectome of the Drosophila fruit fly, plus a chat harness that tracks which neurons fire.

None of us had worked with connectome data. None of us had done much ML, much less LLMs, and none of us had built a harness before. We did insanely brief studying of the connectome’s structure, selected the neuron groups we wanted, designed a minimum working architecture, and prayed it trained decently enough while we built the rest of the software stack.

We ended up with a Mamba-like state-space model, after substituting some biological features for mathematical approximations. Its wiring graph has 1,959 nodes and 19,037 edges. It runs on a React website that renders and runs inference entirely on WebGPU.