Compiler engineer. I find out why optimizers produce wrong code and fix it at the root,
in LLVM and the Julia compiler. I also build compilers and AI agent tools of my own.
Train a GPT in your browser · LinkedIn · Open to contract and consulting work
16 PRs merged upstream, 7 of them LLVM miscompile and crash fixes · Previously Head of AI Initiatives at Third Bridge · US patent · 4 books
frugl: a compiler that trains GPT models on a laptop CPU
You write the model, the loss and the optimizer. frugl derives the backward pass, plans every buffer of the training step ahead of time and emits C. This is the whole attention layer of its GPT-2:
fn attention(qkv: f32[B, T, 3*C]) -> f32[B, T, C] {
let q = qkv[:, :, 0:C ].reshape(B, T, NH, HS).permute(0, 2, 1, 3);
let k = qkv[:, :, C:2*C ].reshape(B, T, NH, HS).permute(0, 2, 1, 3);
let v = qkv[:, :, 2*C:3*C].reshape(B, T, NH, HS).permute(0, 2, 1, 3);
let p = softmax(causal_mask(q @ k.T * (1.0 / sqrt(HS))), -1);
return (p @ v).permute(0, 2, 1, 3).reshape(B, T, C);
}- Trained a 7.6M-param GPT on TinyStories in 85 minutes on a MacBook CPU. Validation loss fell from 10.85 to 2.13 and it writes short children's stories.
- Plans a GPT-2 124M training step in 1.93 GiB of memory. With the GPT-2 weights loaded, it matches the logits, loss and gradients that llm.c checks its own trainer against.
- Give it a memory budget and it recomputes activations to fit, picking the plan with the least extra work, or tells you exactly why the step does not fit and what would make it fit.
- About 18,000 lines of Rust with no third-party crates. It also trains on Apple GPUs with Metal. Working on now: GPT-2 124M on the GPU.
irsmith: an MCP server that lets coding agents debug compiler crashes
It runs your own LLVM, MLIR or CIRCT build, shrinks a crash to a small reproducer, shows which pass broke the IR, checks transforms with Alive2, bisects to the commit and finds duplicate issues. One run on a real InstCombine crash, sped up:
uvx irsmith · listed in the official MCP registry
Most of my upstream work is compiler correctness: finding why an optimization produces wrong code or crashes, and fixing it at the root with a small regression test. In LLVM that meant three miscompiles (a cached negation that could add poison, a switch lookup table one entry short, and a vector logic op widened so one poison lane spread to others) and four crashes, most of them when a value comes from an invoke or callbr.
17 pull requests merged by maintainers in 8 projects (updated 2026-12-05)
- [InstCombine] Fix phi slicing for inputs defined by a terminator
- [FunctionAttrs] Check for overflow when shifting callee initializes ranges
- [InstCombine] Don't widen lanes when moving logic op out of bitcasts
- [SimplifyCFG] Count the maximum index when growing a full-range lookup table
- [SimplifyLibCalls] Fix the insertion point of sincospi calls
- [InstCombine] Fix scalarizePHI for phi inputs defined by a terminator
- [InstCombine] Cache Negator results per nsw flag
- Make
sizeof(Type{T})throw again - Fix segfault in
which(Tuple{}) - codegen: fix ccall returning a field-less mutable struct
- fix(setup): follow the registration Copilot, Codex, and Kiro load
- fix(setup): do not persist versioned launcher paths
JuliaSymbolics/SymbolicUtils.jl
- Independent AI engineer and open-source contributor (Nov 2026 – present): the work above, plus contract and consulting work.
- Founder, GenMB (2026): an AI app builder with a multi-stage LLM code-generation pipeline and self-healing error recovery, reaching 95% first-generation success. GenMB's assets were acquired.
- Head of AI Initiatives, Third Bridge (2021–2026): RAG search over 65,000+ company records, cutting research time by an estimated 55%. Agent observability that cut incident investigation time by 70%. Co-inventor of a patented value-chain graph.
- Founder and CEO, ZappyAI (2017–2021): process-mining ML, from prototype to 8 enterprise clients.
- Front Office Developer, Citi (2016–2017): a real-time pricing and risk engine for multi-asset derivatives.
- LLVM Compiler Engineer, Blu Wireless (2015): a MIPS cross-compiler with custom instructions on the LLVM backend and Clang front end.
- U.S. patent US12242521B2, Dynamic interactive graphing for attributes (co-inventor)
- Books: Building Software with Vibe Coding (2026), LLM Development and AI Ethics (2025), No-Code Artificial Intelligence (2023) and Enterprise Automation with Python (2022). See my author page.
- Winner, Localhost On-Device Agent Competition (2026) with offline-app-doctor, an agent that repairs broken web apps fully offline
- Winner, OpenClaw Buildathon (2026)
- UK Exceptional Talent Visa in Digital Technology, for machine learning and compiler design
- Most Disruptive Award, UK Ministry of Justice, for algorithms that help courts deliver justice faster
- University of Bristol, BEng Computer Science and Electronics: First Class Honours, ranked first in the course
- Speaker, Money20/20 Europe (2019)

