Using a Transformer Model: From Training to Inference
This chapter is divided into four parts; they are: • Autoregressive Generation • Prefill and Decode • A Simple KV Cache • Memory Usage of the KV Cache A decoder-only transformer model predicts the next token from the tokens that came before it.
We haven't written up this one. Machine Learning Mastery has the full story — the link below goes straight to it.