A transformer language model rebuilt on predictive coding. Embeddings, attention, MLP and
output layers each hold a latent state, predict the next layer, and update from their own
error over T inference steps. I led the research and built the training stack:
multi-GPU DDP, FlashAttention, KV caching, and a two-phase Optuna search over a combined
energy and perplexity objective.
Case study·Code
An independent replication of the NGC framework from Ororbia and Kifer's
Nature Communications paper. I rebuilt the evaluation around reconstruction,
likelihood and downstream classification, added a masked-MSE pattern completion probe,
benchmarked against backpropagation-trained baselines, and packaged the whole comparison
so it can be re-run from a clean machine.
Case study·Code·Paper
A JAX library from SingularityNET for building predictive coding networks, where the same
architecture can be trained with either predictive coding or backpropagation for direct
comparison. I contributed the transformer components and BPE tokenisation.
Code