Downloads · 30 days
0
gary23w/gary-mesh
gary-mesh is a machine learning model from gary23w. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for numpy. The card lists the license as mit.
A Mesh-NCA-style graph cellular automaton in pure numpy, plus a short design paper on growing a neural net wide (more neurons) instead of deep (more parameters).
Downloads · 30 days
0
Access
Public
Updated Jun 12, 2026
Repo size
20.4 KB
Likes
0
Public
Click a slice to open those files.
.png98 KB · 69%
From the Hugging Face model README
A Mesh-NCA-style graph cellular automaton in pure numpy, plus a short design paper on growing a neural net wide (more neurons) instead of deep (more parameters).
One small shared update rule is run on every cell of a graph. Because every cell runs the same rule, the parameter count is set by the rule, not by the number of cells. So you can scale the population without scaling the training bill. This is the idea behind Mesh Neural Cellular Automata (Pajouheshgar et al., TOG 2024), applied to the Gary family of tiny numpy models.
A 2,364-parameter shared rule, trained by backpropagation-through-time (gradient verified against finite differences to 1.4e-8):

| cells | trainable params | ms / cell |
|---|---|---|
| 64 | 2,364 | 0.012 |
| 1,024 | 2,364 | 0.006 |
| 16,384 | 2,364 | 0.010 |
| 65,536 | 2,364 | 0.006 |
gary_mesh.py — the model: ring graph, direction-aware message passing (the 1/cos/sin 2D shadow of MeshNCA's spherical harmonics), shared 2-layer MLP, Bernoulli async masking, hand-derived BPTT, Adam.demo.py — reproduces the headline (trains in ~2 s, then prints the scaling table).gary_mesh_rule.npz — the trained 2,364-parameter rule.PAPER_million_neurons.md — the design note: how a million Gary neurons could learn from each other cheaply, and how to graft a mesh layer into the chat cortex.pip install numpy matplotlib
python demo.py
Pajouheshgar, E., Xu, Y., Mordvintsev, A., Niklasson, E., Zhang, T., Süsstrunk, S. Mesh Neural Cellular Automata. ACM TOG 43(4), 2024. arXiv:2311.02820. Mordvintsev, A., et al. Growing Neural Cellular Automata. Distill, 2020.