Andrej Karpathy spent 8 years at OpenAI and Tesla
Last week, he condensed everything he knows into one free 2-hour lecture
Agents → Loops → Harness → Self-Improving Systems
People pay $14K for bootcamps that teach less than this
This lecture beats most paid AI engineering courses
You probably don't have 2 hours right now
Don't let this disappear from your feed
Watch it
Then read the article below
Anthropic hired this engineer at $250K–$750K a year because he knows how to build harnesses for multi-agent systems
In a 15-minute workshop, he shows exactly how to build one from scratch
AI → Agents → Harness → Loops → Graphs
step 1 → start with the Claude Agent SDK — the harness handles loops, context, and sandboxing
step 2 → separate the brain from the hands — reasoning in one place, tools in a sandbox, 60% faster to first token
step 3 → run it server-side and log every step — close your laptop and it keeps running, crashes resume from the log
step 4 → make failure cheap — retry dead sandboxes and replay lost context instead of starting over
step 5 → turn yesterday's logs into new memory and skills — the harness wakes up smarter
Anthropic calls this "dreaming"
Most people spend weeks building this by hand
You don't have to
Bookmark and watch it
Then read the full Opus 5.5 harness engineering guide below ↓
Understanding algorithms changes how you code. This playlist teaches understanding.
Pavel Mavrin. 61 lectures. Free.
Here's the difference:
Before understanding algorithms:
- You use hash tables for everything
- You write code first, optimize later
- You guess at time complexity
After understanding algorithms:
- You choose the right data structure for the problem
- You think about complexity before writing code
- You recognize which pattern fits
What you'll learn =>
→ Time complexity and sorting
→ Dynamic Programming
→ Advanced trees (Segment, Fenwick, Splay, Link-Cut)
→ Graph algorithms (traversal, shortest paths, flows)
→ String algorithms (pattern matching, suffix structures)
→ FFT, Linear Programming, Cryptography
found this free Harness Engineering course on GitHub with 14 lectures + 8 hands-on projects. it covers:
> how Claude Code, Codex, DeepSeek build their harness
> loop & graph engineering
> automated agent loops
> observability, testing and verification
really good source for learning harness essentials by doing.
https://t.co/ebOTeIRKuy
Understanding GPUs will change your AI Engineering journey beyond agents and LLM.
Rise of LLMs and deep learning introduced dedicated GPU hardware which serves your models for training and inference.
You don't need to start with C++, CUDA, and Maths, but:
> Components of a GPU and roles
> How a token flows through hardware
> Compute vs memory, the two limits
> What FLOPS means in practice
> Training vs inference hardware needs
> What is CUDA Kernels
> Calculating GPU memory from model size
> Quantization to fit bigger models
> Multi-GPU and splitting large models
@huggingface has the feature of calculating FLOps and recommending GPUs for your use case. You must explore.
In terms of inference engineering, GPU understanding are much helpful your platform performance and handling multiple requests.
Read this article for complete breakdown of GPUs for AI Engineers doesn't require any pre-requisite.
this is pure f*cking gold for anyone running coding agents
Jev founder Diogo Amogo wrote a PDF on building a Jev harness
what it claims:
> 200x faster
> 400x cheaper
the model stopped being the bottleneck a while ago
the speed and the bill both live in the harness around it
• how to use it
> hand this PDF and the article below to Claude Code or Codex
> tell it to rebuild its own setup
one evening of Jev engineering
and next week your agent runs on a harness most teams haven't built yet 👇
Jev Founder, Diogo Amogo, just released a PDF on building a Jev Harness for coding agents
this is a blueprint on how to make your coding agents 200× faster and 400× cheaper
Send this PDF and the article below to your Claude
Code or Codex instance and start shipping 200× faster 👇
@SwiggyCares i placed an order and that order was automatically cancelled and I am charged the cancellation fee please look into the matter how can I be charged for cancellation fee if I haven't cancelled the order
I have been using LLMs in production for over 2.5 years now!
Here are 12 KV cache reduction techniques every AI engineer should understand:
KV cache memory grows with the number of layers, KV heads, retained tokens, dimensions, bytes per value, and concurrent requests.
The techniques below reduce different parts of that cost. Some require a model built around a different attention architecture. Others work inside the serving engine.
1. GQA and MQA
Multiple query heads share fewer key and value heads. The model stores fewer KV vectors for every token and layer.
2. Cross-layer sharing
Several transformer layers reuse the same KV cache instead of storing independent copies. Native support usually requires a model trained for this layout.
3. Sliding-window attention
Local layers retain only the latest window of tokens. Their cache stops growing beyond that window, although global layers may still retain the full sequence.
4. Multi-head latent attention
MLA stores a compressed latent representation instead of full keys and values. The attention layer reconstructs what it needs during decoding.
5. Hybrid Mamba models
Mamba layers keep fixed-size recurrent states instead of growing KV caches. Hybrid models need KV memory only for their remaining attention layers.
6. Compressed attention
The model stores compact summaries of older context and combines them with selected tokens and a recent window. This can reduce memory and attention work.
7. Query-aware sparse reads
The engine scores KV pages for the current query and reads only the most relevant ones. The complete cache remains stored, so this mainly reduces memory traffic and computation.
8. KV quantization
Every cached value remains present, but each uses fewer bits. An 8-bit cache has the same shape as a 16-bit cache with a smaller byte footprint.
9. Token eviction
The engine permanently removes tokens judged less useful. Memory falls, but an evicted token cannot help a later query.
10. Paged allocation
KV memory is divided into fixed-size blocks allocated on demand. This reduces fragmentation and allocation waste without deleting cached values.
11. Prefix reuse
Requests with an identical prefix share already-computed KV blocks. This removes duplicate storage and skips repeated prefill computation.
12. Offloading
Inactive KV blocks move from GPU memory to CPU memory or disk. GPU capacity increases, but cache misses now pay a transfer cost.
The important distinction is that these methods do not all compress the cache. Some shrink it, and some reduce reads, duplicated computation, fragmentation, or GPU residency.
If you want to learn more, I wrote a full article about it, covering how these techniques work, what each technique actually saves, and the trade-offs to decide which one would fit your workload.
Read it below.
@SwiggyCares
I had placed the order on Instamart and couple of items were missing so I checked with delivery partner he told me that whatever was given to him he delivered I contacted the support staff they are not helpfull as well.
Please help me with this situation
Why KV cache stores K and V vectors but never Q?
(a popular technical LLM interview question)
LLMs are autoregressive so each token is predicted from every token before it, one at a time.
This autoregressive nature has a direct consequence inside the model.
A forward pass over <n> tokens produces <n> hidden states, but only the last one is projected to logits and is required to generate the next token.
So to understand why KV cache just stores K and V vector, we must back track to see how exactly is the last hidden state produced.
Let's walk through this with a 10-token prompt.
1) Prefill:
All 10 tokens go through the model in one forward pass, in parallel (with causal masking), since the whole prompt is already known.
At every layer, each of the 10 positions produces a query, a key and a value vector, and attention at each position runs against all positions up to it.
This pass is compute-heavy, and it's why the first token takes noticeably longer than the ones after it. TTFT is mostly prefill.
2) The first output token:
To generate the 11th token, only the 10th token's hidden state is needed. So this is projected from the hidden-dim to vocab-dim to generate logits over vocab.
These logits then go through softmax and sampling to generate token 11.
3) Back-track the hidden state:
The last hidden state is the last row of the feedforward block's output. The feedforward block is position-wise (it's applied to each row independently) so that row comes from the last row of the attention output before it.
So now we need to see how the last row of attention is computed.
4) Attention matrix:
QKᵀ for a 10-token prompt will give a 10 × 10 matrix.
Row <i> will have the dot product of query <i> with every key.
Row 10 is therefore Q₁₀·K₁, Q₁₀·K₂, all the way to Q₁₀·K₁₀.
Notice that only Q₁₀ appears in it. Q₁ through Q₉ only belong to their corresponding rows 1-9, and those rows' hidden states we already discarded because they were never needed.
The last row of attention goes through softmax and multiplies the full stack of value vectors, V₁ through V₁₀, to give the last row of the attention output.
So the last hidden state depends on exactly three things: Q₁₀, every key, and every value.
5) Generating token 12:
Token 11 is appended, and this time, we need row 11's hidden state to generate token 12.
Mathematically, attention operation turns out to be Q₁₁ against K₁ through K₁₁, then multiplied by V₁ through V₁₁.
K₁ through K₁₁ and V₁ through V₁₁ are bit-for-bit what prefill + first token produced since under causal masking, a token's key and value depend on that token and the ones before it, never on anything after, so appending token 11 cannot change anything at position 3.
6) The cache state:
Overall, this implies that you just need to retain the keys and values at each decoding step, and compute only the new position's Q, K and V.
Each decode step requires one query vector, which is never used again, so they are never cached across the decoding process.
The visual below explains the entire process.
That said, KV cache is only one of four separate caching layers in an LLM stack.
The other three are prefix caching on the server, prompt caching billed by a provider, and a semantic cache that skips the model entirely.
I wrote a full breakdown of all four caches in LLM serving that you should know as an AI engineer, with code for each.
Read it below.