Skip to content
NEWBudgetBench: memory strategy evaluation under a fixed token budget (arXiv:2609.13149) →
Aditya Karnam

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.

Research · Writing · Live · About · Contact

Wins

4.9 GB
Ornith build that beats the 8.9 GB release
+5.5
MMLU points over that 8.9 GB release
119%
Decode speedup, speculative decoding on Apple Silicon
~80x
GEMM over GEMV throughput on an M5 Pro
0.646
LongMemEval at a 2K token budget (BudgetBench)
15+
Vector backends behind one embenx API
~1.3 MB
Quecto agent core, two direct dependencies
7.8K
Stars on mlx-lm (1.2K forks), where my merged PR fixed LoRA on 3 MoE models
The stack in numbers · scroll
01 Hardware02 Inference03 Models04 Agents05 Retrieval06 Evals
01 / Hardware
80x

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
Ask about the work
Ask about projects, research direction, or what a recruiter, engineer, or researcher should know about this work.

Research areas

Hardware and inference

What serving stacks do on real silicon: roofline limits, batching, memory walls and numerical reproducibility on Apple Silicon.

Models and distillation

Small-model fine-tuning and distillation, measured against the larger models they are meant to replace.

Agents and software factories

Harnesses, runtimes and orchestration for coding agents, built so their behavior can be inspected.

Retrieval and memory

Vector backends, temporal memory and context budgets: how agents remember within a fixed cost.

Evaluation

Protocols and harnesses that score behavior under constraints, including the null results.

Applied ML

Machine learning for healthcare and evolutionary methods for network analysis, from earlier published work.

Research

All research
  • Paper
    BudgetBench: memory strategy evaluation under a fixed token budget2026

    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

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

01
Measure first

Write down the number before changing anything, then change one thing.

02
Publish the nulls

Negative results and bugs in my own measurements go in the write-up.

03
Small and inspectable

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

Now

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

Explore the site

Research →Papers, experiments, questionsWriting →Agents, memory, local inferenceSystems →Runtimes, retrieval, toolingLive →Try paper search and running toolsQuecto →A 1.3 MB agent harness in RustToolkit →Prompt tools, memory frameworksAbout →From genetics to AI systems

Contact

Find me on GitHub, LinkedIn or Twitter.

© 2026 Aditya Karnam