I’ve been working on an open-source framework for training bots for Super Smash Bros. Melee in Elixir (ExPhil). Along the way I got thoroughly distracted by the plethora of architectures to try, benchmarks to run, and optimizations to make.
What came out of that is Edifice – a library of 92 neural network architectures built on Nx and Axon, covering 16 families.
def deps do
[{:edifice, “~> 0.1.1”}]
end
The idea is simple: every architecture follows the same Module.build(opts) pattern and returns an Axon model. There’s also a unified registry so you can do things like:
model = Edifice.build(:mamba, embed_size: 256, hidden_size: 512, num_layers: 4)
Or compare architectures in a loop
for arch ← [:mamba, :retnet, :griffin, :gla] do
model = Edifice.build(arch, embed_size: 256, hidden_size: 512, num_layers: 4)
# … train and evaluate
end
Edifice.list_architectures()
# => [:attention, :bayesian, :capsule, :deep_sets, :densenet, :diffusion, …]
What’s in it:
- State Space Models: Mamba, Mamba-2 (SSD), S4, S4D, S5, H3, Hyena, BiMamba, GatedSSM, Jamba, Zamba
- Attention: Multi-Head, GQA, Perceiver, FNet, Linear Transformer, Nystromformer, Performer, RetNet, RWKV-7, GLA, HGRN-2, Griffin/Hawk
- Recurrent: LSTM, GRU, xLSTM, MinGRU, MinLSTM, DeltaNet, TTT, Titans, Reservoir
- Vision: ViT, DeiT, Swin, U-Net, ConvNeXt, MLP-Mixer
- Convolutional: ResNet, DenseNet, TCN, MobileNet, EfficientNet
- Generative: VAE, VQ-VAE, GAN, DDPM, DDIM, DiT, Latent Diffusion, Consistency Model, Score SDE, Flow Matching, Normalizing Flow
- Contrastive: SimCLR, BYOL, Barlow Twins, MAE, VICReg
- Graph: GCN, GAT, GIN, GraphSAGE, Graph Transformer, PNA, SchNet, DeepSets, PointNet
- Energy/Probabilistic/Memory: EBM, Hopfield, Neural ODE, Bayesian NN, NTM, Memory Networks
- Meta/Specialized: MoE, Switch MoE, Soft MoE, LoRA, Adapter, Hypernetwork, Capsule, Liquid NN, SNN, ANN2SNN
- Building Blocks: RMSNorm, SwiGLU, RoPE, ALiBi, PatchEmbed, AdaptiveNorm, CrossAttention, FFN
Pure Elixir, no Python, no ONNX imports. GPU-ready with EXLA. Ships with 17 guides covering ML foundations through architecture theory, plus runnable examples.
Where it’s at:
This is v0.1.1. Every module has been audited against its canonical paper and is backed by 1660+ tests. The architectures I’ve actually used in ExPhil and tried to train on I’m most confident in. I’m sure there are problems I haven’t found yet – the goal is to iron them out and make this something people can reach for when they want to try out a neural net architecture in Elixir.
It’s also just useful as reference. If you want to see how a specific architecture works, the source is there. Point a coding agent at it and ask why you might use a given architecture for whatever you’re working on (I’ve used claude code on various versions of opus to make this jsyk). Or go through a reference implementation and see if you can recreate it: edifice/notebooks/training_mlp.livemd at main · blasphemetheus/edifice · GitHub is an example using the Multi Layer Perceptron (MLP) architecture (a starting point architecture).
PRs, issues, criticisms, praise, and all feedback welcome.






















