Logo
The Agent Engineer
Home
Articles
About
Search
Subscribe
Logo
Search

Articles

Dive into a collection of past posts and rediscover timeless content.
The biggest speedup in local inference is one you never turned on

Jul 1, 2026

•

2 min read

Optimization techniques

+2

The biggest speedup in local inference is one you never turned on

To work through your prompt, attention compares every token with every other token. A thousand tokens means a thousand-by-thousand grid of comparisons. Flash attention just refuses to build the grid.

Yatharth Lakhera
Yatharth Lakhera
Speculative decoding isn't free. It's a bet you can lose.

Jun 28, 2026

•

2 min read

Optimization techniques

+2

Speculative decoding isn't free. It's a bet you can lose.

Best case, several tokens for the price of one. Worst case, slower than doing nothing. And what you're wagering on is how predictable your output is.

Yatharth Lakhera
Yatharth Lakhera
The runtime is the new API. You already picked one.

Jun 27, 2026

•

2 min read

LLM Concepts

The runtime is the new API. You already picked one.

I went local to stop letting a company quietly decide things for me. My third command was ollama run. And just like that, something was quietly deciding everything again.

Yatharth Lakhera
Yatharth Lakhera
Your bandwidth is fixed. Your speed isn't.

Jun 24, 2026

•

2 min read

Optimization techniques

+2

Your bandwidth is fixed. Your speed isn't.

Pop-up wardrobes, tape-to-stream labs, and story prompts powering this week’s experiments.

Yatharth Lakhera
Yatharth Lakhera
How models get smarter without getting slower

Jun 22, 2026

•

2 min read

Optimization techniques

+2

How models get smarter without getting slower

Bigger means slower: more weights to drag out of memory for every token. Want more capability? Pay for it in speed. By now it feels like physics. But there is a hack!

Yatharth Lakhera
Yatharth Lakhera
Your model has two kinds of slow

Jun 18, 2026

•

2 min read

LLM Concepts

Your model has two kinds of slow

When I quantized the cache and dropped the context, two numbers got better at once. The wait before the first word, and the speed of the words after it. I filed it under "faster" and moved on.

Yatharth Lakhera
Yatharth Lakhera
I fixed every memory problem. It was still slow.

Jun 18, 2026

•

2 min read

LLM Concepts

I fixed every memory problem. It was still slow.

I did everything the last three posts told me to. Quantized the KV cache down to q8. Dropped the context from maxed-out to 8k. TTFT dropped, tokens per second climbed, the SSD stopped thrashing

Yatharth Lakhera
Yatharth Lakhera
The model fit in memory. The conversation didn't.

Jun 18, 2026

•

2 min read

LLM Concepts

+1

The model fit in memory. The conversation didn't.

The 9B model was 6.6GB. It sat inside the Mac Mini's 16GB of memory with room to spare. So what dragged "hello" down to one word a second?

Yatharth Lakhera
Yatharth Lakhera
What a layer in an LLM actually is

Jun 14, 2026

•

2 min read

LLM Concepts

What a layer in an LLM actually is

How do you put part of a model anywhere? You can't load half a brain. Turns out you can. Because a model isn't one object. It's a stack.

Yatharth Lakhera
Yatharth Lakhera
Load more

The Agent Engineer

Deep dives on building AI agents that actually ship — Claude Code internals, production LLM patterns, and the stuff that breaks between a clean demo and real users.

© 2026 The Agent Engineer.
beehiivPowered by beehiiv