I work across the AI stack, from silicon to software factories.
I am an AI research engineer. I work on the full path from hardware to product: inference performance on Apple Silicon, small-model training and distillation, agent systems and harnesses, retrieval and memory, evals, and the software factories that put them to work.
Most of it is measured on a laptop: fixed budgets, small models, and numbers I can reproduce. I publish the harnesses and the null results alongside the wins, and fix upstream when I find a bug.
Wins
Batched matmul holds a flat ~80x throughput edge over matrix-vector ops on an M5 Pro. That gap is why decode is the bottleneck.
Roofline study →Ask my work
Research areas
What serving stacks do on real silicon: roofline limits, batching, memory walls and numerical reproducibility on Apple Silicon.
Small-model fine-tuning and distillation, measured against the larger models they are meant to replace.
Harnesses, runtimes and orchestration for coding agents, built so their behavior can be inspected.
Vector backends, temporal memory and context budgets: how agents remember within a fixed cost.
Protocols and harnesses that score behavior under constraints, including the null results.
Machine learning for healthcare and evolutionary methods for network analysis, from earlier published work.
Research
All research- Paper
On LongMemEval (500 questions), retrieval at a 2K budget scored 0.646; truncation needed 8K to reach 0.650. arXiv:2609.13149.
- Distillation
A 4.9 GB build scores +5.5 MMLU and +3.0 HumanEval over the 8.9 GB release it replaces; the gain comes from reasoning termination, not knowledge.
- Inference
Qwen3.8-27B with a 0.8B draft model peaks at a 119% decode speedup, after patching mlx_lm to accept its hybrid attention cache.
- Inference
On an M5 Pro, GEMM holds a flat ~80x throughput advantage over GEMV, which is why batching helps prefill and barely touches decode.
- Retrieval
DocLang costs 2.7x markdown tokens on a stock tokenizer and loses on retrieval; 38% of the paper was bibliography and boilerplate.
- Numerics
Batch-invariance tests from 512 to 4096 matrices, with bfloat16, float16 and float32 error behavior.
Selected writing
All posts- 2026-10
- 2026-09
- 2026-09
- 2026-08
- 2026-07
- 2026-07
Open source and systems
- mlx-lm
Added mx.stop_gradient to MoE router indices so LoRA training no longer crashes on granitemoe, granitemoehybrid and lfm2_moe.
- embenx
One Collection API across 15+ vector backends, with hybrid search, temporal memory and an MCP server.
- subagent-fleet
Routes coding-agent subagents across local Ollama machines with health checks, warmup and a live dashboard.
- quecto
A ~1.3 MB synchronous core with two direct dependencies, SQLite-backed sessions and an approval-gated sandbox.
- awesome-agentic-memory
mem0, Letta, Zep, A-MEM and others compared by memory type, backend and MCP support.
Principles
Write down the number before changing anything, then change one thing.
Negative results and bugs in my own measurements go in the write-up.
Prefer systems whose traces, tool calls and evals someone else can read.
Off the clock
I love old NES games and I cook. Both are lessons in constraints: a few kilobytes of RAM, one pan, whatever is in the fridge. I bring the same habit to benchmarks.
Currently
NowMaking local agent runtimes observable (subagent-fleet), turning retrieval into durable memory infrastructure (embenx), and keeping the agent-memory map current. Next up: a write-up on why agent memory is not just retrieval.