Capabo
Sign in
A new way to learn

You are more capable than you think

Capabo recommends real projects, builds a path the minute you want to learn anything, then makes you learn by doing and gives you feedback on where you stand.

Get started
ALWAYS UP TO DATE · ALWAYS PERSONALIZED · ALWAYS ON
The learning loop
Your memory
01
Start with a goal
02
Learn by building
03
Prove what you can do
04
Compound it
01

Start with a goal

Tell Capabo what you want to learn, or simply start from one of our featured projects. Capabo reads what’s current across the field and generates an up-to-date learning path built only for you.

Capabo
Online
Chat with Capabo
Unit 04 · The KV cache
04 / 20
Part I · Foundations

The KV cache, and why decoding would crawl without it

A language model writes one token at a time, and each new token has to look back over everything already written. That backward glance is where almost all the cost of generating text hides. The KV cache is the single idea that keeps it from spiralling out of control.

What gets cached & why

Inside attention, each token becomes three vectors: a query, a key, and a value. To pick the next word, the model takes the newest token's query, checks it against the key of every earlier token to decide how much each one matters, then blends their values into the answer.

When the model generates token n, it attends over every token before it. Recomputing their keys and values at every step is the O(n²) trap. The KV cache stores each token's key and value once, so a new token only projects its own K and V and reads the rest straight from memory.

See it · one decode step, cache on vs. off
Interactive · KV cacheCache ON
Sequence
AGPUserves
KV cache
3 tokens · 3 cached
KV
k1A
k2GPU
k3serves
reusedwrittenrecomputed
Compute this step
3 tokens prefilled
O(n): each new token adds just one K/V row.

Turn the cache off and every earlier token lights up amber again: the model repeats work it already finished. Turn it on and only the newest row is written each step.

Memory-cost math

That speed is bought with memory. Every token adds one key and one value to the cache, in every attention head of every layer, and nothing is discarded mid-generation, so the footprint is completely predictable, and easy to underestimate.

Cache size
kv_bytes = 2 · layers · heads · d_head · seq_len · batch · dtype
Try the numbers · cache size
FP16FP8INT4
21 GB
70B-class · 64K context · batch 1 · FP16
Model weights140 GB
KV cache21 GB
Still smaller than the model. Push context or batch higher to see it flip.
Context length
64K tokens
Batch · in flight
× 1
Fixed: 80 layers · 8 KV heads · head-dim 128.

Cache layout

Physically, the cache is two tensors per layer, a K cache and a V cache, indexed by attention head and by position. A new token writes one slot per head, per layer, then reads the whole column back to attend over the past.

Prefill · once
Read the whole prompt
Every prompt token is processed together in a single pass, and its key and value are written into the cache up front.
Decode · every step
Add one token at a time
Each new token computes only its own K and V, appends one row to the cache, and attends over everything stored so far.

Eviction & paging

In a plain decode loop nothing is ever evicted, so the cache only grows. That is fine for a short chat. Push the context long enough and the bottleneck flips: the cache, not the model, is what runs you out of memory.

Real systems refuse to just let it grow. They hand out cache memory in fixed blocks so it does not fragment (paging), and they drop, compress, or offload the entries that matter least (eviction).

Capabo
Chat with Capabo
02

Learn by building

Every unit is built with interactive pieces you can push on until the idea lands. Ask Capabo anything as you read, it will adapt at your pace.

03

Prove what you can do

Start a live voice session to go deep on an idea, or to defend what you built. Capabo probes where you’re thin, then hands you a written debrief of what to improve next.

Mock on your FP8 serving project
voice · 08:00
Listening
Live transcript
Capabo
IdeaYou
maybe cache tool schemas per session could cut tokens a lot, let's try it later
QuestionYou
why does the agent loop need a step budget? what breaks if I remove it?
NoteYou
a good AI-engineer roadmap with 5 interesting projects, x.com/rohit4verse/status/2009663737469542875
WeaknessCapabo
ships agents before writing evals, 2nd time, I'll bake an eval harness into the next project
Voice memo0:07You
does vLLM serve omni models? remind me tomorrow to check, and compare with SGLang
InterestCapabo
keeps saving infra & serving links, leaning toward systems, I'll steer your projects that way
Capabo
You've got the core of agentic design down. The enterprise AI OS build from Rohit's engineer roadmap @rohit4verse is a production-grade next target with real infra. Shape your next learning path around it?
Plan my next pathMaybe later
04

Compound into
a second brain

Every idea, question, and saved link goes to one place. Capabo reads the pattern across them, notices what you keep avoiding and proposes what to build next.

You can hand the work to AI,
but you can’t hand off the learning.

Try it
Capabo© 2026 Humani Labs
Privacy PolicyTerms of ServiceContact