Skip to content
View ambujone's full-sized avatar

Block or report ambujone

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
ambujone/README.md

Ambuj A.

AI and 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

17 PRs merged upstream, 7 of them LLVM miscompile and crash fixes · Previously Head of AI Initiatives at Third Bridge · US patent · 4 books

What I'm building

frugl: a compiler that trains GPT models on a laptop CPU

frugl training a 7.6M-parameter GPT on TinyStories: the loss falls from 10.85 to 2.10 over 12,000 steps and the model writes a short story. Real log, sped up.

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:

irsmith driven over MCP on llvm/llvm-project#248279, played 4x faster: run finds the InstCombine assertion, reduce shrinks the input from 154 to 53 lines in 40.0 s, diff_passes shows the last pass that finished and find_duplicates ranks #173177 at 0.91 and #248279 at 0.87

uvx irsmith · listed in the official MCP registry

Merged upstream

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)

llvm/llvm-project

JuliaLang/julia

morluto/rea

astral-sh/ruff

EnzymeAD/Enzyme.jl

JuliaSymbolics/SymbolicUtils.jl

NousResearch/hermes-agent

SciML/NonlinearSolve.jl

Before this

  • 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.

Patent, books and awards

Pinned Loading

  1. frugl frugl Public

    A small language for training LLMs that plans memory at compile time. Give a training step a memory budget and it picks what to recompute so the step fits, or explains why it can't. Rust with no th…

    Rust

  2. llvm/llvm-project llvm/llvm-project Public

    The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.

    LLVM 41.7k 20k

  3. JuliaLang/julia JuliaLang/julia Public

    The Julia Programming Language

    Julia 49.3k 6k

  4. morluto/rea morluto/rea Public

    Reverse engineer anything, Reimagine everything. RE anything from app behavior down to native binaries. Discord: https://discord.gg/reatools

    TypeScript 491k 119k

  5. irsmith irsmith Public

    An MCP server that helps coding agents debug LLVM, clang, MLIR and CIRCT crashes: run, shrink to a minimal reproducer, bisect to the commit and find duplicate issues.

    Python

  6. offline-app-doctor offline-app-doctor Public archive

    Autonomous on-device agent that heals broken web apps fully offline: render → see → recall → heal → verify → remember. Chromium + Ollama + Cognee. No internet, no cloud.

    Python