To generate each token, a model executes an attention step comparing the newest token against earlier tokens using key and value vectors. Recomputing these vectors for every preceding token at each step is computationally wasteful because their values remain static. The KV cache resolves this inefficiency by storing computed key and value vectors so that onl…
Reading
Deep reads
Section-by-section takeaways from 7 newsletters (ByteByteGo, Daily Dose of DS, Berkeley RDI, ExplainThis, Latent Space, The Batch, DataTalks.Club Weekly); 228 articles in the last 120 days, 82 of them from ByteByteGo.
ByteByteGo Original ↗
Why An LLM’s Memory Gets Expensive and How to Fix It ByteByteGo Original ↗
LLM Security Basics: The Full Threat Model Almost all LLM vulnerabilities originate from the architectural reality that models receive instructions and external data in a single token sequence with no structural boundary between them. While traditional software relies on parameterization to strictly separate executable commands from user data (such as in SQL queries), no such mechanism exists for nat…